Lines Matching refs:mOut

99   GeneratedFile *mOut;  member in slang::RSReflectionJavaElementBuilder
354 mOut.indent() << "private static final String " RS_RESOURCE_NAME " = \"" in genScriptClassConstructor()
359 mOut.indent() << "// Constructor\n"; in genScriptClassConstructor()
365 mOut.indent() << "super(rs,\n"; in genScriptClassConstructor()
366 mOut.indent() << " " << RS_RESOURCE_NAME ",\n"; in genScriptClassConstructor()
367 mOut.indent() << " " << className << ".getBitCode32(),\n"; in genScriptClassConstructor()
368 mOut.indent() << " " << className << ".getBitCode64());\n"; in genScriptClassConstructor()
372 mOut.indent() << "this(rs,\n"; in genScriptClassConstructor()
373 mOut.indent() << " rs.getApplicationContext().getResources(),\n"; in genScriptClassConstructor()
374 mOut.indent() << " rs.getApplicationContext().getResources()." in genScriptClassConstructor()
376 mOut.indent() << " " RS_RESOURCE_NAME ", \"raw\",\n"; in genScriptClassConstructor()
377 mOut.indent() in genScriptClassConstructor()
385 mOut.indent() << "super(rs, resources, id);\n"; in genScriptClassConstructor()
398 mOut.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = new " in genScriptClassConstructor()
443 mOut.indent() << "private Element " RS_ELEM_PREFIX << *I << ";\n"; in genScriptClassConstructor()
449 mOut.indent() << "private FieldPacker " RS_FP_PREFIX << *I << ";\n"; in genScriptClassConstructor()
459 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = "; in genInitBoolExportVariable()
461 mOut << ((Val.getInt().getSExtValue() == 0) ? "false" : "true") << ";\n"; in genInitBoolExportVariable()
469 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = "; in genInitPrimitiveExportVariable()
471 mOut << ";\n"; in genInitPrimitiveExportVariable()
511 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = new " in genInitExportVariable()
551 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName in genInitExportVariable()
580 mOut.indent() << "private final static int " << RS_EXPORT_VAR_INDEX_PREFIX in genExportVariable()
613 mOut.indent() << "private final static int " << RS_EXPORT_FUNC_INDEX_PREFIX in genExportFunction()
632 mOut.indent() << "return createInvokeID(" << RS_EXPORT_FUNC_INDEX_PREFIX in genExportFunction()
645 mOut.indent() << "invoke(" << RS_EXPORT_FUNC_INDEX_PREFIX << EF->getName() in genExportFunction()
654 mOut.indent() << "invoke(" << RS_EXPORT_FUNC_INDEX_PREFIX << EF->getName() in genExportFunction()
664 mOut.indent() << "// Verify dimensions\n"; in genPairwiseDimCheck()
665 mOut.indent() << "t0 = " << name0 << ".getType();\n"; in genPairwiseDimCheck()
666 mOut.indent() << "t1 = " << name1 << ".getType();\n"; in genPairwiseDimCheck()
667 mOut.indent() << "if ((t0.getCount() != t1.getCount()) ||\n"; in genPairwiseDimCheck()
668 mOut.indent() << " (t0.getX() != t1.getX()) ||\n"; in genPairwiseDimCheck()
669 mOut.indent() << " (t0.getY() != t1.getY()) ||\n"; in genPairwiseDimCheck()
670 mOut.indent() << " (t0.getZ() != t1.getZ()) ||\n"; in genPairwiseDimCheck()
671 mOut.indent() << " (t0.hasFaces() != t1.hasFaces()) ||\n"; in genPairwiseDimCheck()
672 mOut.indent() << " (t0.hasMipmaps() != t1.hasMipmaps())) {\n"; in genPairwiseDimCheck()
673 mOut.indent() << " throw new RSRuntimeException(\"Dimension mismatch " in genPairwiseDimCheck()
676 mOut.indent() << "}\n\n"; in genPairwiseDimCheck()
683 mOut.indent() << "//private final static int " in genExportForEach()
689 mOut.indent() << "private final static int " << RS_EXPORT_FOREACH_INDEX_PREFIX in genExportForEach()
735 mOut.indent() << "return createKernelID(" << RS_EXPORT_FOREACH_INDEX_PREFIX in genExportForEach()
746 mOut.indent() << "forEach_" << EF->getName(); in genExportForEach()
747 mOut << "("; in genExportForEach()
750 mOut << "ain, "; in genExportForEach()
756 mOut << "ain_" << (*BI)->getName().str() << ", "; in genExportForEach()
761 mOut << "aout, "; in genExportForEach()
765 mOut << Args.back().second << ", "; in genExportForEach()
769 mOut << "null);\n"; in genExportForEach()
801 mOut.indent() << "Type t0, t1;"; in genExportForEach()
805 mOut.indent() << "Type t0, t1;"; in genExportForEach()
824 mOut.indent() << "forEach(" << RS_EXPORT_FOREACH_INDEX_PREFIX in genExportForEach()
828 mOut << ", ain"; in genExportForEach()
830 mOut << ", new Allocation[]{ain_" << Ins[0]->getName().str(); in genExportForEach()
833 mOut << ", ain_" << Ins[index]->getName().str(); in genExportForEach()
836 mOut << "}"; in genExportForEach()
839 mOut << ", (Allocation) null"; in genExportForEach()
843 mOut << ", aout"; in genExportForEach()
845 mOut << ", null"; in genExportForEach()
848 mOut << ", " << FieldPackerName; in genExportForEach()
850 mOut << ", null"; in genExportForEach()
853 mOut << ", sc);\n"; in genExportForEach()
855 mOut << ");\n"; in genExportForEach()
880 mOut.indent() << RS_ELEM_PREFIX << TypeName << " = Element." << TypeName in genTypeInstance()
889 mOut.indent() << RS_ELEM_PREFIX << ClassName << " = " << ClassName in genTypeInstance()
918 mOut.indent() << "// check " << VarName << "\n"; in genTypeCheck()
941 mOut.indent() << "if (!" << VarName in genTypeCheck()
944 mOut.indent() << " throw new RSRuntimeException(\"Type mismatch with " in genTypeCheck()
946 mOut.indent() << "}\n"; in genTypeCheck()
963 mOut.indent() << "public final static " << TypeName in genPrimitiveTypeExportVariable()
967 mOut << ";\n"; in genPrimitiveTypeExportVariable()
983 mOut.indent() << "if (" << FPName << "!= null) {\n"; in genPrimitiveTypeExportVariable()
984 mOut.increaseIndent(); in genPrimitiveTypeExportVariable()
985 mOut.indent() << FPName << ".reset();\n"; in genPrimitiveTypeExportVariable()
986 mOut.decreaseIndent(); in genPrimitiveTypeExportVariable()
987 mOut.indent() << "} else {\n"; in genPrimitiveTypeExportVariable()
988 mOut.increaseIndent(); in genPrimitiveTypeExportVariable()
989 mOut.indent() << FPName << " = new FieldPacker(" << EPT->getSize() in genPrimitiveTypeExportVariable()
991 mOut.decreaseIndent(); in genPrimitiveTypeExportVariable()
992 mOut.indent() << "}\n"; in genPrimitiveTypeExportVariable()
995 mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName in genPrimitiveTypeExportVariable()
998 mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName in genPrimitiveTypeExportVariable()
1004 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; in genPrimitiveTypeExportVariable()
1018 mOut << ((api.getSExtValue() == 0) ? "false" : "true"); in genInitValue()
1021 mOut << api.getSExtValue(); in genInitValue()
1023 mOut << "L"; in genInitValue()
1033 mOut << s.c_str(); in genInitValue()
1036 mOut << ".f"; in genInitValue()
1038 mOut << "f"; in genInitValue()
1073 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; in genPointerTypeExportVariable()
1074 mOut.indent() << "if (v == null) bindAllocation(null, " in genPointerTypeExportVariable()
1078 mOut.indent() << "else bindAllocation(v.getAllocation(), " in genPointerTypeExportVariable()
1081 mOut.indent() << "else bindAllocation(v, " << RS_EXPORT_VAR_INDEX_PREFIX in genPointerTypeExportVariable()
1118 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; in genMatrixTypeExportVariable()
1122 mOut.indent() << "setVar(" RS_EXPORT_VAR_INDEX_PREFIX << VarName << ", " in genMatrixTypeExportVariable()
1162 mOut.indent() << "private " << TypeName << " " << RS_EXPORT_VAR_PREFIX in genPrivateExportVariable()
1174 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; in genSetExportVariable()
1181 mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName in genSetExportVariable()
1186 mOut.indent() << "int []__dimArr = new int[1];\n"; in genSetExportVariable()
1187 mOut.indent() << "__dimArr[0] = " << ET->getSize() << ";\n"; in genSetExportVariable()
1188 mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName in genSetExportVariable()
1201 mOut.indent() << "return " << RS_EXPORT_VAR_PREFIX << VarName << ";\n"; in genGetExportVariable()
1212 mOut.indent() << "return createFieldID(" << RS_EXPORT_VAR_INDEX_PREFIX in genGetFieldID()
1225 mOut.indent() << "FieldPacker " << FieldPackerName << " = new FieldPacker(" in genCreateFieldPacker()
1238 mOut.indent() << FieldPackerName << "." in genPackVarOfType()
1250 mOut.indent() << FieldPackerName << ".addI32(" << VarName in genPackVarOfType()
1253 mOut.indent() << FieldPackerName << ".addI32(" << VarName in genPackVarOfType()
1259 mOut.indent() << FieldPackerName << ".addMatrix(" << VarName << ");\n"; in genPackVarOfType()
1282 mOut.indent() << "for (int " << IndexVarName << " = 0; " << IndexVarName in genPackVarOfType()
1284 mOut.startBlock(); in genPackVarOfType()
1290 mOut.endBlock(); in genPackVarOfType()
1314 mOut.indent() << FieldPackerName << ".skip(" << (FieldOffset - Pos) in genPackVarOfType()
1322 mOut.indent() << FieldPackerName << ".skip(" in genPackVarOfType()
1331 mOut.indent() << FieldPackerName << ".skip(" << ERT->getAllocSize() - Pos in genPackVarOfType()
1355 mOut.indent() << VarName << " = null;\n"; in genAllocateVarOfType()
1363 mOut.indent() << VarName << " = new " << GetTypeName(ElementType) << "[" in genAllocateVarOfType()
1368 mOut.indent() << "for (int $ct = 0; $ct < " << ECAT->getSize() in genAllocateVarOfType()
1370 mOut.startBlock(); in genAllocateVarOfType()
1376 mOut.endBlock(); in genAllocateVarOfType()
1383 mOut.indent() << VarName << " = new " << GetTypeName(T) << "();\n"; in genAllocateVarOfType()
1390 mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_NAME " == null) "; in genNewItemBufferIfNull()
1391 mOut << RS_TYPE_ITEM_BUFFER_NAME << " = new " << RS_TYPE_ITEM_CLASS_NAME in genNewItemBufferIfNull()
1394 mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_NAME << "[" << Index in genNewItemBufferIfNull()
1396 mOut << RS_TYPE_ITEM_BUFFER_NAME << "[" << Index << "] = new " in genNewItemBufferIfNull()
1402 mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " == null) "; in genNewItemBufferPackerIfNull()
1403 mOut << RS_TYPE_ITEM_BUFFER_PACKER_NAME " = new FieldPacker(" in genNewItemBufferPackerIfNull()
1423 mOut.indent() << "private " << RS_TYPE_ITEM_CLASS_NAME << " " in genTypeClass()
1425 mOut.indent() << "private FieldPacker " << RS_TYPE_ITEM_BUFFER_PACKER_NAME in genTypeClass()
1427 mOut.indent() << "private static java.lang.ref.WeakReference<Element> " in genTypeClass()
1453 mOut.indent() << "static public class " RS_TYPE_ITEM_CLASS_NAME; in genTypeItemClass()
1454 mOut.startBlock(); in genTypeItemClass()
1458 mOut.indent() << "public static final int sizeof = " << ERT->getAllocSize() in genTypeItemClass()
1463 mOut << "\n"; in genTypeItemClass()
1467 mOut.indent() << GetTypeName((*FI)->getType()) << " " << (*FI)->getName() in genTypeItemClass()
1472 mOut << "\n"; in genTypeItemClass()
1473 mOut.indent() << RS_TYPE_ITEM_CLASS_NAME << "()"; in genTypeItemClass()
1474 mOut.startBlock(); in genTypeItemClass()
1484 mOut.endBlock(); in genTypeItemClass()
1487 mOut.endBlock(); in genTypeItemClass()
1500 RSReflectionJavaElementBuilder builder("eb", ERT, RenderScriptVar, &mOut, in genTypeClassConstructor()
1504 mOut.indent() << "return eb.create();\n"; in genTypeClassConstructor()
1514 mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << " = null;\n"; in genTypeClassConstructor()
1515 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " = null;\n"; in genTypeClassConstructor()
1516 mOut.indent() << "mElement = createElement(" << RenderScriptVar << ");\n"; in genTypeClassConstructor()
1523 mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << " = null;\n"; in genTypeClassConstructor()
1524 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " = null;\n"; in genTypeClassConstructor()
1525 mOut.indent() << "mElement = createElement(" << RenderScriptVar << ");\n"; in genTypeClassConstructor()
1527 mOut.indent() << "init(" << RenderScriptVar << ", count);\n"; in genTypeClassConstructor()
1534 mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << " = null;\n"; in genTypeClassConstructor()
1535 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " = null;\n"; in genTypeClassConstructor()
1536 mOut.indent() << "mElement = createElement(" << RenderScriptVar << ");\n"; in genTypeClassConstructor()
1538 mOut.indent() << "init(" << RenderScriptVar << ", count, usages);\n"; in genTypeClassConstructor()
1545 mOut.indent() << getClassName() << " obj = new " << getClassName() << "(" in genTypeClassConstructor()
1547 mOut.indent() << "obj.mAllocation = Allocation.createSized(" in genTypeClassConstructor()
1549 mOut.indent() << "return obj;\n"; in genTypeClassConstructor()
1555 mOut.indent() << "return create1D(" << RenderScriptVar in genTypeClassConstructor()
1562 mOut.indent() << "return create2D(" << RenderScriptVar in genTypeClassConstructor()
1571 mOut.indent() << getClassName() << " obj = new " << getClassName() << "(" in genTypeClassConstructor()
1573 mOut.indent() << "Type.Builder b = new Type.Builder(rs, obj.mElement);\n"; in genTypeClassConstructor()
1574 mOut.indent() << "b.setX(dimX);\n"; in genTypeClassConstructor()
1575 mOut.indent() << "b.setY(dimY);\n"; in genTypeClassConstructor()
1576 mOut.indent() << "Type t = b.create();\n"; in genTypeClassConstructor()
1577 mOut.indent() << "obj.mAllocation = Allocation.createTyped(rs, t, usages);\n"; in genTypeClassConstructor()
1578 mOut.indent() << "return obj;\n"; in genTypeClassConstructor()
1584 mOut.indent() << "Element e = createElement(" << RenderScriptVar << ");\n"; in genTypeClassConstructor()
1585 mOut.indent() << "return new Type.Builder(rs, e);\n"; in genTypeClassConstructor()
1592 mOut.indent() << getClassName() << " obj = new " << getClassName() << "(" in genTypeClassConstructor()
1594 mOut.indent() << "Type t = tb.create();\n"; in genTypeClassConstructor()
1595 mOut.indent() << "if (t.getElement() != obj.mElement) {\n"; in genTypeClassConstructor()
1596 mOut.indent() << " throw new RSIllegalArgumentException(" in genTypeClassConstructor()
1598 mOut.indent() << "}\n"; in genTypeClassConstructor()
1599 mOut.indent() << "obj.mAllocation = Allocation.createTyped(rs, t, usages);\n"; in genTypeClassConstructor()
1600 mOut.indent() << "return obj;\n"; in genTypeClassConstructor()
1609 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << ".reset(index * " in genTypeClassCopyToArray()
1612 mOut.indent() << "copyToArrayLocal(i, " RS_TYPE_ITEM_BUFFER_PACKER_NAME in genTypeClassCopyToArray()
1633 mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << "[index] = i;\n"; in genTypeClassItemSetter()
1635 mOut.indent() << "if (copyNow) "; in genTypeClassItemSetter()
1636 mOut.startBlock(); in genTypeClassItemSetter()
1638 mOut.indent() << "copyToArray(i, index);\n"; in genTypeClassItemSetter()
1639 mOut.indent() << "FieldPacker fp = new FieldPacker(" << mItemSizeof << ");\n"; in genTypeClassItemSetter()
1640 mOut.indent() << "copyToArrayLocal(i, fp);\n"; in genTypeClassItemSetter()
1641 mOut.indent() << "mAllocation.setFromFieldPacker(index, fp);\n"; in genTypeClassItemSetter()
1644 mOut.endBlock(); in genTypeClassItemSetter()
1652 mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_NAME in genTypeClassItemGetter()
1654 mOut.indent() << "return " << RS_TYPE_ITEM_BUFFER_NAME << "[index];\n"; in genTypeClassItemGetter()
1673 mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << "[index]." << F->getName() in genTypeClassComponentSetter()
1676 mOut.indent() << "if (copyNow) "; in genTypeClassComponentSetter()
1677 mOut.startBlock(); in genTypeClassComponentSetter()
1680 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << ".reset(index * " in genTypeClassComponentSetter()
1684 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << ".reset(index * " in genTypeClassComponentSetter()
1689 mOut.indent() << "FieldPacker fp = new FieldPacker(" << FieldStoreSize in genTypeClassComponentSetter()
1692 mOut.indent() << "mAllocation.setFromFieldPacker(index, " << FieldIndex in genTypeClassComponentSetter()
1696 mOut.endBlock(); in genTypeClassComponentSetter()
1711 mOut.indent() << "if (" RS_TYPE_ITEM_BUFFER_NAME << " == null) return " in genTypeClassComponentGetter()
1713 mOut.indent() << "return " RS_TYPE_ITEM_BUFFER_NAME << "[index]." in genTypeClassComponentGetter()
1722 mOut.indent() << "for (int ct = 0; ct < " << RS_TYPE_ITEM_BUFFER_NAME in genTypeClassCopyAll()
1726 mOut.indent() << "mAllocation.setFromFieldPacker(0, " in genTypeClassCopyAll()
1736 mOut.indent() << "if (mItemArray != null) "; in genTypeClassResize()
1737 mOut.startBlock(); in genTypeClassResize()
1738 mOut.indent() << "int oldSize = mItemArray.length;\n"; in genTypeClassResize()
1739 mOut.indent() << "int copySize = Math.min(oldSize, newSize);\n"; in genTypeClassResize()
1740 mOut.indent() << "if (newSize == oldSize) return;\n"; in genTypeClassResize()
1741 mOut.indent() << "Item ni[] = new Item[newSize];\n"; in genTypeClassResize()
1742 mOut.indent() << "System.arraycopy(mItemArray, 0, ni, 0, copySize);\n"; in genTypeClassResize()
1743 mOut.indent() << "mItemArray = ni;\n"; in genTypeClassResize()
1744 mOut.endBlock(); in genTypeClassResize()
1745 mOut.indent() << "mAllocation.resize(newSize);\n"; in genTypeClassResize()
1747 mOut.indent() << "if (" RS_TYPE_ITEM_BUFFER_PACKER_NAME in genTypeClassResize()
1763 mRenderScriptVar(RenderScriptVar), mOut(Out), mPaddingFieldIndex(1), in RSReflectionJavaElementBuilder()
1773 mOut->indent() << "Element.Builder " << mElementBuilderName in generate()
1785 *mOut << ElementConstruct << "(" << mRenderScriptVar << ")"; in genAddElement()
1796 *mOut << "Element.createUser(" << mRenderScriptVar in genAddElement()
1807 *mOut << "Element.createVector(" << mRenderScriptVar in genAddElement()
1837 mRenderScriptVar, mOut, mRSContext, mReflection); in genAddElement()
1842 *mOut << NewElementBuilderName << ".create()"; in genAddElement()
1885 mRenderScriptVar, mOut, mRSContext, mReflection); in genAddElement()
1889 *mOut << NewElementBuilderName << ".create()"; in genAddElement()
1920 *mOut << "Element.U32(" << mRenderScriptVar << ")"; in genAddPadding()
1923 *mOut << "Element.U16(" << mRenderScriptVar << ")"; in genAddPadding()
1926 *mOut << "Element.U8(" << mRenderScriptVar << ")"; in genAddPadding()
1934 mOut->indent() << mElementBuilderName << ".add("; in genAddStatementStart()
1940 *mOut << ", \"" << VarName << "\""; in genAddStatementEnd()
1942 *mOut << ", " << ArraySize; in genAddStatementEnd()
1944 *mOut << ");\n"; in genAddStatementEnd()
2011 if (!mOut.startFile(mOutputDirectory, FileName, mRSSourceFileName, in startClass()
2019 mOut << "package " << mPackageName << ";\n"; in startClass()
2021 mOut << "\n"; in startClass()
2024 mOut << "import " << mRSPackageName << ".*;\n"; in startClass()
2026 mOut << "import " << mPackageName << "." in startClass()
2030 mOut << "import android.content.res.Resources;\n"; in startClass()
2032 mOut << "\n"; in startClass()
2036 mOut << "/**\n"; in startClass()
2037 mOut << " * @hide\n"; in startClass()
2038 mOut << " */\n"; in startClass()
2040 mOut << AccessModifierStr(AM) << ((IsStatic) ? " static" : "") << " class " in startClass()
2043 mOut << " extends " << SuperClassName; in startClass()
2045 mOut.startBlock(); in startClass()
2053 mOut.endBlock(); in endClass()
2054 mOut.closeFile(); in endClass()
2059 mOut.indent() << "public static class " << ClassName; in startTypeClass()
2060 mOut.startBlock(); in startTypeClass()
2063 void RSReflectionJava::endTypeClass() { mOut.endBlock(); } in endTypeClass()
2088 mOut.indent() << AccessModifierStr(AM) << ((IsStatic) ? " static " : " ") in startFunction()
2095 mOut << ", "; in startFunction()
2099 mOut << I->first << " " << I->second; in startFunction()
2102 mOut << ")"; in startFunction()
2103 mOut.startBlock(); in startFunction()
2106 void RSReflectionJava::endFunction() { mOut.endBlock(); } in endFunction()