Lines Matching refs:indent

355   mOut.indent() << "private static final String " RS_RESOURCE_NAME " = \""  in genScriptClassConstructor()
360 mOut.indent() << "// Constructor\n"; in genScriptClassConstructor()
366 mOut.indent() << "super(rs,\n"; in genScriptClassConstructor()
367 mOut.indent() << " " << RS_RESOURCE_NAME ",\n"; in genScriptClassConstructor()
368 mOut.indent() << " " << className << ".getBitCode32(),\n"; in genScriptClassConstructor()
369 mOut.indent() << " " << className << ".getBitCode64());\n"; in genScriptClassConstructor()
373 mOut.indent() << "this(rs,\n"; in genScriptClassConstructor()
374 mOut.indent() << " rs.getApplicationContext().getResources(),\n"; in genScriptClassConstructor()
375 mOut.indent() << " rs.getApplicationContext().getResources()." in genScriptClassConstructor()
377 mOut.indent() << " " RS_RESOURCE_NAME ", \"raw\",\n"; in genScriptClassConstructor()
378 mOut.indent() in genScriptClassConstructor()
386 mOut.indent() << "super(rs, resources, id);\n"; in genScriptClassConstructor()
399 mOut.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = new " in genScriptClassConstructor()
444 mOut.indent() << "private Element " RS_ELEM_PREFIX << *I << ";\n"; in genScriptClassConstructor()
450 mOut.indent() << "private FieldPacker " RS_FP_PREFIX << *I << ";\n"; in genScriptClassConstructor()
460 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = "; in genInitBoolExportVariable()
470 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = "; in genInitPrimitiveExportVariable()
512 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = new " in genInitExportVariable()
552 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName in genInitExportVariable()
581 mOut.indent() << "private final static int " << RS_EXPORT_VAR_INDEX_PREFIX in genExportVariable()
614 mOut.indent() << "private final static int " << RS_EXPORT_FUNC_INDEX_PREFIX in genExportFunction()
636 mOut.indent() << "invoke(" << RS_EXPORT_FUNC_INDEX_PREFIX << EF->getName() in genExportFunction()
645 mOut.indent() << "invoke(" << RS_EXPORT_FUNC_INDEX_PREFIX << EF->getName() in genExportFunction()
655 mOut.indent() << "// Verify dimensions\n"; in genPairwiseDimCheck()
656 mOut.indent() << "t0 = " << name0 << ".getType();\n"; in genPairwiseDimCheck()
657 mOut.indent() << "t1 = " << name1 << ".getType();\n"; in genPairwiseDimCheck()
658 mOut.indent() << "if ((t0.getCount() != t1.getCount()) ||\n"; in genPairwiseDimCheck()
659 mOut.indent() << " (t0.getX() != t1.getX()) ||\n"; in genPairwiseDimCheck()
660 mOut.indent() << " (t0.getY() != t1.getY()) ||\n"; in genPairwiseDimCheck()
661 mOut.indent() << " (t0.getZ() != t1.getZ()) ||\n"; in genPairwiseDimCheck()
662 mOut.indent() << " (t0.hasFaces() != t1.hasFaces()) ||\n"; in genPairwiseDimCheck()
663 mOut.indent() << " (t0.hasMipmaps() != t1.hasMipmaps())) {\n"; in genPairwiseDimCheck()
664 mOut.indent() << " throw new RSRuntimeException(\"Dimension mismatch " in genPairwiseDimCheck()
667 mOut.indent() << "}\n\n"; in genPairwiseDimCheck()
674 mOut.indent() << "//private final static int " in genExportForEach()
680 mOut.indent() << "private final static int " << RS_EXPORT_FOREACH_INDEX_PREFIX in genExportForEach()
723 mOut.indent() << "return createKernelID(" << RS_EXPORT_FOREACH_INDEX_PREFIX in genExportForEach()
733 mOut.indent() << "forEach_" << EF->getName(); in genExportForEach()
787 mOut.indent() << "Type t0, t1;"; in genExportForEach()
791 mOut.indent() << "Type t0, t1;"; in genExportForEach()
810 mOut.indent() << "forEach(" << RS_EXPORT_FOREACH_INDEX_PREFIX in genExportForEach()
866 mOut.indent() << RS_ELEM_PREFIX << TypeName << " = Element." << TypeName in genTypeInstance()
875 mOut.indent() << RS_ELEM_PREFIX << ClassName << " = " << ClassName in genTypeInstance()
904 mOut.indent() << "// check " << VarName << "\n"; in genTypeCheck()
927 mOut.indent() << "if (!" << VarName in genTypeCheck()
930 mOut.indent() << " throw new RSRuntimeException(\"Type mismatch with " in genTypeCheck()
932 mOut.indent() << "}\n"; in genTypeCheck()
949 mOut.indent() << "public final static " << TypeName in genPrimitiveTypeExportVariable()
969 mOut.indent() << "if (" << FPName << "!= null) {\n"; in genPrimitiveTypeExportVariable()
971 mOut.indent() << FPName << ".reset();\n"; in genPrimitiveTypeExportVariable()
973 mOut.indent() << "} else {\n"; in genPrimitiveTypeExportVariable()
975 mOut.indent() << FPName << " = new FieldPacker(" << EPT->getSize() in genPrimitiveTypeExportVariable()
978 mOut.indent() << "}\n"; in genPrimitiveTypeExportVariable()
981 mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName in genPrimitiveTypeExportVariable()
984 mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName in genPrimitiveTypeExportVariable()
990 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; in genPrimitiveTypeExportVariable()
1059 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; in genPointerTypeExportVariable()
1060 mOut.indent() << "if (v == null) bindAllocation(null, " in genPointerTypeExportVariable()
1064 mOut.indent() << "else bindAllocation(v.getAllocation(), " in genPointerTypeExportVariable()
1067 mOut.indent() << "else bindAllocation(v, " << RS_EXPORT_VAR_INDEX_PREFIX in genPointerTypeExportVariable()
1104 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; in genMatrixTypeExportVariable()
1108 mOut.indent() << "setVar(" RS_EXPORT_VAR_INDEX_PREFIX << VarName << ", " in genMatrixTypeExportVariable()
1148 mOut.indent() << "private " << TypeName << " " << RS_EXPORT_VAR_PREFIX in genPrivateExportVariable()
1160 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; in genSetExportVariable()
1167 mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName in genSetExportVariable()
1172 mOut.indent() << "int []__dimArr = new int[1];\n"; in genSetExportVariable()
1173 mOut.indent() << "__dimArr[0] = " << ET->getSize() << ";\n"; in genSetExportVariable()
1174 mOut.indent() << "setVar(" << RS_EXPORT_VAR_INDEX_PREFIX << VarName in genSetExportVariable()
1187 mOut.indent() << "return " << RS_EXPORT_VAR_PREFIX << VarName << ";\n"; in genGetExportVariable()
1198 mOut.indent() << "return createFieldID(" << RS_EXPORT_VAR_INDEX_PREFIX in genGetFieldID()
1211 mOut.indent() << "FieldPacker " << FieldPackerName << " = new FieldPacker(" in genCreateFieldPacker()
1224 mOut.indent() << FieldPackerName << "." in genPackVarOfType()
1236 mOut.indent() << FieldPackerName << ".addI32(" << VarName in genPackVarOfType()
1239 mOut.indent() << FieldPackerName << ".addI32(" << VarName in genPackVarOfType()
1245 mOut.indent() << FieldPackerName << ".addMatrix(" << VarName << ");\n"; in genPackVarOfType()
1268 mOut.indent() << "for (int " << IndexVarName << " = 0; " << IndexVarName in genPackVarOfType()
1300 mOut.indent() << FieldPackerName << ".skip(" << (FieldOffset - Pos) in genPackVarOfType()
1308 mOut.indent() << FieldPackerName << ".skip(" in genPackVarOfType()
1317 mOut.indent() << FieldPackerName << ".skip(" << ERT->getAllocSize() - Pos in genPackVarOfType()
1341 mOut.indent() << VarName << " = null;\n"; in genAllocateVarOfType()
1349 mOut.indent() << VarName << " = new " << GetTypeName(ElementType) << "[" in genAllocateVarOfType()
1354 mOut.indent() << "for (int $ct = 0; $ct < " << ECAT->getSize() in genAllocateVarOfType()
1369 mOut.indent() << VarName << " = new " << GetTypeName(T) << "();\n"; in genAllocateVarOfType()
1376 mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_NAME " == null) "; in genNewItemBufferIfNull()
1380 mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_NAME << "[" << Index in genNewItemBufferIfNull()
1388 mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " == null) "; in genNewItemBufferPackerIfNull()
1409 mOut.indent() << "private " << RS_TYPE_ITEM_CLASS_NAME << " " in genTypeClass()
1411 mOut.indent() << "private FieldPacker " << RS_TYPE_ITEM_BUFFER_PACKER_NAME in genTypeClass()
1413 mOut.indent() << "private static java.lang.ref.WeakReference<Element> " in genTypeClass()
1439 mOut.indent() << "static public class " RS_TYPE_ITEM_CLASS_NAME; in genTypeItemClass()
1444 mOut.indent() << "public static final int sizeof = " << ERT->getAllocSize() in genTypeItemClass()
1453 mOut.indent() << GetTypeName((*FI)->getType()) << " " << (*FI)->getName() in genTypeItemClass()
1459 mOut.indent() << RS_TYPE_ITEM_CLASS_NAME << "()"; in genTypeItemClass()
1490 mOut.indent() << "return eb.create();\n"; in genTypeClassConstructor()
1500 mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << " = null;\n"; in genTypeClassConstructor()
1501 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " = null;\n"; in genTypeClassConstructor()
1502 mOut.indent() << "mElement = createElement(" << RenderScriptVar << ");\n"; in genTypeClassConstructor()
1509 mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << " = null;\n"; in genTypeClassConstructor()
1510 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " = null;\n"; in genTypeClassConstructor()
1511 mOut.indent() << "mElement = createElement(" << RenderScriptVar << ");\n"; in genTypeClassConstructor()
1513 mOut.indent() << "init(" << RenderScriptVar << ", count);\n"; in genTypeClassConstructor()
1520 mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << " = null;\n"; in genTypeClassConstructor()
1521 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << " = null;\n"; in genTypeClassConstructor()
1522 mOut.indent() << "mElement = createElement(" << RenderScriptVar << ");\n"; in genTypeClassConstructor()
1524 mOut.indent() << "init(" << RenderScriptVar << ", count, usages);\n"; in genTypeClassConstructor()
1531 mOut.indent() << getClassName() << " obj = new " << getClassName() << "(" in genTypeClassConstructor()
1533 mOut.indent() << "obj.mAllocation = Allocation.createSized(" in genTypeClassConstructor()
1535 mOut.indent() << "return obj;\n"; in genTypeClassConstructor()
1541 mOut.indent() << "return create1D(" << RenderScriptVar in genTypeClassConstructor()
1548 mOut.indent() << "return create2D(" << RenderScriptVar in genTypeClassConstructor()
1557 mOut.indent() << getClassName() << " obj = new " << getClassName() << "(" in genTypeClassConstructor()
1559 mOut.indent() << "Type.Builder b = new Type.Builder(rs, obj.mElement);\n"; in genTypeClassConstructor()
1560 mOut.indent() << "b.setX(dimX);\n"; in genTypeClassConstructor()
1561 mOut.indent() << "b.setY(dimY);\n"; in genTypeClassConstructor()
1562 mOut.indent() << "Type t = b.create();\n"; in genTypeClassConstructor()
1563 mOut.indent() << "obj.mAllocation = Allocation.createTyped(rs, t, usages);\n"; in genTypeClassConstructor()
1564 mOut.indent() << "return obj;\n"; in genTypeClassConstructor()
1570 mOut.indent() << "Element e = createElement(" << RenderScriptVar << ");\n"; in genTypeClassConstructor()
1571 mOut.indent() << "return new Type.Builder(rs, e);\n"; in genTypeClassConstructor()
1578 mOut.indent() << getClassName() << " obj = new " << getClassName() << "(" in genTypeClassConstructor()
1580 mOut.indent() << "Type t = tb.create();\n"; in genTypeClassConstructor()
1581 mOut.indent() << "if (t.getElement() != obj.mElement) {\n"; in genTypeClassConstructor()
1582 mOut.indent() << " throw new RSIllegalArgumentException(" in genTypeClassConstructor()
1584 mOut.indent() << "}\n"; in genTypeClassConstructor()
1585 mOut.indent() << "obj.mAllocation = Allocation.createTyped(rs, t, usages);\n"; in genTypeClassConstructor()
1586 mOut.indent() << "return obj;\n"; in genTypeClassConstructor()
1595 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << ".reset(index * " in genTypeClassCopyToArray()
1598 mOut.indent() << "copyToArrayLocal(i, " RS_TYPE_ITEM_BUFFER_PACKER_NAME in genTypeClassCopyToArray()
1619 mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << "[index] = i;\n"; in genTypeClassItemSetter()
1621 mOut.indent() << "if (copyNow) "; in genTypeClassItemSetter()
1624 mOut.indent() << "copyToArray(i, index);\n"; in genTypeClassItemSetter()
1625 mOut.indent() << "FieldPacker fp = new FieldPacker(" << mItemSizeof << ");\n"; in genTypeClassItemSetter()
1626 mOut.indent() << "copyToArrayLocal(i, fp);\n"; in genTypeClassItemSetter()
1627 mOut.indent() << "mAllocation.setFromFieldPacker(index, fp);\n"; in genTypeClassItemSetter()
1638 mOut.indent() << "if (" << RS_TYPE_ITEM_BUFFER_NAME in genTypeClassItemGetter()
1640 mOut.indent() << "return " << RS_TYPE_ITEM_BUFFER_NAME << "[index];\n"; in genTypeClassItemGetter()
1659 mOut.indent() << RS_TYPE_ITEM_BUFFER_NAME << "[index]." << F->getName() in genTypeClassComponentSetter()
1662 mOut.indent() << "if (copyNow) "; in genTypeClassComponentSetter()
1666 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << ".reset(index * " in genTypeClassComponentSetter()
1670 mOut.indent() << RS_TYPE_ITEM_BUFFER_PACKER_NAME << ".reset(index * " in genTypeClassComponentSetter()
1675 mOut.indent() << "FieldPacker fp = new FieldPacker(" << FieldStoreSize in genTypeClassComponentSetter()
1678 mOut.indent() << "mAllocation.setFromFieldPacker(index, " << FieldIndex in genTypeClassComponentSetter()
1697 mOut.indent() << "if (" RS_TYPE_ITEM_BUFFER_NAME << " == null) return " in genTypeClassComponentGetter()
1699 mOut.indent() << "return " RS_TYPE_ITEM_BUFFER_NAME << "[index]." in genTypeClassComponentGetter()
1708 mOut.indent() << "for (int ct = 0; ct < " << RS_TYPE_ITEM_BUFFER_NAME in genTypeClassCopyAll()
1712 mOut.indent() << "mAllocation.setFromFieldPacker(0, " in genTypeClassCopyAll()
1722 mOut.indent() << "if (mItemArray != null) "; in genTypeClassResize()
1724 mOut.indent() << "int oldSize = mItemArray.length;\n"; in genTypeClassResize()
1725 mOut.indent() << "int copySize = Math.min(oldSize, newSize);\n"; in genTypeClassResize()
1726 mOut.indent() << "if (newSize == oldSize) return;\n"; in genTypeClassResize()
1727 mOut.indent() << "Item ni[] = new Item[newSize];\n"; in genTypeClassResize()
1728 mOut.indent() << "System.arraycopy(mItemArray, 0, ni, 0, copySize);\n"; in genTypeClassResize()
1729 mOut.indent() << "mItemArray = ni;\n"; in genTypeClassResize()
1731 mOut.indent() << "mAllocation.resize(newSize);\n"; in genTypeClassResize()
1733 mOut.indent() << "if (" RS_TYPE_ITEM_BUFFER_PACKER_NAME in genTypeClassResize()
1759 mOut->indent() << "Element.Builder " << mElementBuilderName in generate()
1920 mOut->indent() << mElementBuilderName << ".add("; in genAddStatementStart()
2045 mOut.indent() << "public static class " << ClassName; in startTypeClass()
2074 mOut.indent() << AccessModifierStr(AM) << ((IsStatic) ? " static " : " ") in startFunction()