Lines Matching refs:indent
250 mJava->indent() << "public class " << name; in writeJavaArgumentClass()
257 mJava->indent() << "public "; in writeJavaArgumentClass()
271 mJava->indent() << "public double"; in writeJavaArgumentClass()
284 mJava->indent() << "private void " << mJavaCheckMethodName << "()"; in writeJavaCheckMethod()
297 mJava->indent() << "enforceOrdering(" << smallerAlloc << ", " << p->javaAllocName in writeJavaCheckMethod()
309 mJava->indent() << p->javaAllocName << ".destroy();\n"; in writeJavaCheckMethod()
323 mJava->indent() << "Allocation " << param.javaAllocName << " = "; in writeJavaInputAllocationDefinition()
404 mJava->indent() << "Allocation " << param.javaAllocName << " = Allocation.createSized(mRS, " in writeJavaOutputAllocationDefinition()
425 mJava->indent() << "StringBuilder message = new StringBuilder();\n"; in writeJavaVerifyScalarMethod()
426 mJava->indent() << "boolean errorFound = false;\n"; in writeJavaVerifyScalarMethod()
427 mJava->indent() << "for (int i = 0; i < INPUTSIZE; i++)"; in writeJavaVerifyScalarMethod()
430 mJava->indent() << "for (int j = 0; j < " << vectorSize << " ; j++)"; in writeJavaVerifyScalarMethod()
433 mJava->indent() << "// Extract the inputs.\n"; in writeJavaVerifyScalarMethod()
434 mJava->indent() << mJavaArgumentsClassName << " args = new " << mJavaArgumentsClassName in writeJavaVerifyScalarMethod()
438 mJava->indent() << "args." << p->variableName << " = " << p->javaArrayName << "[i"; in writeJavaVerifyScalarMethod()
447 mJava->indent() << "args." << p->doubleVariableName in writeJavaVerifyScalarMethod()
455 mJava->indent() << "// Extract the outputs.\n"; in writeJavaVerifyScalarMethod()
458 mJava->indent() << "args." << p->variableName << " = " << p->javaArrayName in writeJavaVerifyScalarMethod()
461 mJava->indent() << "args." << p->doubleVariableName in writeJavaVerifyScalarMethod()
467 mJava->indent() << "// Ask the CoreMathVerifier to validate.\n"; in writeJavaVerifyScalarMethod()
471 mJava->indent() << "String errorMessage = CoreMathVerifier." in writeJavaVerifyScalarMethod()
477 mJava->indent() << "boolean valid = errorMessage == null;\n"; in writeJavaVerifyScalarMethod()
479 mJava->indent() << "// Figure out what the outputs should have been.\n"; in writeJavaVerifyScalarMethod()
483 mJava->indent() << "CoreMathVerifier." << mJavaVerifierComputeMethodName << "(args"; in writeJavaVerifyScalarMethod()
488 mJava->indent() << "// Validate the outputs.\n"; in writeJavaVerifyScalarMethod()
489 mJava->indent() << "boolean valid = true;\n"; in writeJavaVerifyScalarMethod()
497 mJava->indent() << "if (!valid)"; in writeJavaVerifyScalarMethod()
499 mJava->indent() << "if (!errorFound)"; in writeJavaVerifyScalarMethod()
501 mJava->indent() << "errorFound = true;\n"; in writeJavaVerifyScalarMethod()
512 mJava->indent() << "message.append(errorMessage);\n"; in writeJavaVerifyScalarMethod()
514 mJava->indent() << "message.append(\"Errors at\");\n"; in writeJavaVerifyScalarMethod()
517 mJava->indent() << "message.append(\" [\");\n"; in writeJavaVerifyScalarMethod()
518 mJava->indent() << "message.append(Integer.toString(i));\n"; in writeJavaVerifyScalarMethod()
519 mJava->indent() << "message.append(\", \");\n"; in writeJavaVerifyScalarMethod()
520 mJava->indent() << "message.append(Integer.toString(j));\n"; in writeJavaVerifyScalarMethod()
521 mJava->indent() << "message.append(\"]\");\n"; in writeJavaVerifyScalarMethod()
527 mJava->indent() << "assertFalse(\"Incorrect output for " << mJavaCheckMethodName << "\" +\n"; in writeJavaVerifyScalarMethod()
542 mJava->indent() << "StringBuilder message = new StringBuilder();\n"; in writeJavaVerifyVectorMethod()
543 mJava->indent() << "boolean errorFound = false;\n"; in writeJavaVerifyVectorMethod()
544 mJava->indent() << "for (int i = 0; i < INPUTSIZE; i++)"; in writeJavaVerifyVectorMethod()
547 mJava->indent() << mJavaArgumentsNClassName << " args = new " << mJavaArgumentsNClassName in writeJavaVerifyVectorMethod()
550 mJava->indent() << "// Create the appropriate sized arrays in args\n"; in writeJavaVerifyVectorMethod()
557 mJava->indent() << "args." << p->variableName << " = new " << type << "[" in writeJavaVerifyVectorMethod()
560 mJava->indent() << "args." << p->variableName << "Double = new double[" in writeJavaVerifyVectorMethod()
566 mJava->indent() << "// Fill args with the input values\n"; in writeJavaVerifyVectorMethod()
570 mJava->indent() << "args." << p->variableName << " = " << p->javaArrayName << "[i]" in writeJavaVerifyVectorMethod()
575 mJava->indent() << "args." << p->doubleVariableName << " = " in writeJavaVerifyVectorMethod()
580 mJava->indent() << "for (int j = 0; j < " << p->mVectorSize << " ; j++)"; in writeJavaVerifyVectorMethod()
582 mJava->indent() << "args." << p->variableName << "[j] = " in writeJavaVerifyVectorMethod()
589 mJava->indent() << "args." << p->doubleVariableName << "[j] = " in writeJavaVerifyVectorMethod()
598 mJava->indent() << "CoreMathVerifier." << mJavaVerifierComputeMethodName in writeJavaVerifyVectorMethod()
601 mJava->indent() << "// Compare the expected outputs to the actual values returned by RS.\n"; in writeJavaVerifyVectorMethod()
602 mJava->indent() << "boolean valid = true;\n"; in writeJavaVerifyVectorMethod()
609 mJava->indent() << "if (!valid)"; in writeJavaVerifyVectorMethod()
611 mJava->indent() << "if (!errorFound)"; in writeJavaVerifyVectorMethod()
613 mJava->indent() << "errorFound = true;\n"; in writeJavaVerifyVectorMethod()
622 mJava->indent() << "message.append(\"Errors at\");\n"; in writeJavaVerifyVectorMethod()
625 mJava->indent() << "message.append(\" [\");\n"; in writeJavaVerifyVectorMethod()
626 mJava->indent() << "message.append(Integer.toString(i));\n"; in writeJavaVerifyVectorMethod()
627 mJava->indent() << "message.append(\"]\");\n"; in writeJavaVerifyVectorMethod()
632 mJava->indent() << "assertFalse(\"Incorrect output for " << mJavaCheckMethodName << "\" +\n"; in writeJavaVerifyVectorMethod()
668 mJava->indent() << "Target target = new Target(Target.FunctionType." << in writeJavaCreateTarget()
674 mJava->indent() << "private void " << mJavaVerifyMethodName << "("; in writeJavaVerifyMethodHeader()
682 mJava->indent() << p.javaBaseType << "[] " << p.javaArrayName << " = new " << p.javaBaseType in writeJavaArrayInitialization()
690 mJava->indent() << "Arrays.fill(" << p.javaArrayName << ", (" << TYPES[p.typeIndex].javaType in writeJavaArrayInitialization()
694 mJava->indent() << p.javaAllocName << ".copyTo(" << p.javaArrayName << ");\n"; in writeJavaArrayInitialization()
702 mJava->indent() << "valid = false;\n"; in writeJavaTestAndSetValid()
716 mJava->indent() << "if ("; in writeJavaTestOneValue()
739 mJava->indent() << "for (int j = 0; j < " << p.mVectorSize << " ; j++)"; in writeJavaVectorComparison()
751 mJava->indent() << "message.append(\"Output " << p.variableName << ": \");\n"; in writeJavaAppendOutputToMessage()
752 mJava->indent() << "appendVariableToMessage(message, args." << p.variableName << argsIndex in writeJavaAppendOutputToMessage()
757 mJava->indent() << "message.append(\"Output " << p.variableName in writeJavaAppendOutputToMessage()
759 mJava->indent() << "appendVariableToMessage(message, args." << p.doubleVariableName in writeJavaAppendOutputToMessage()
764 mJava->indent() << "message.append(\"Expected output " << p.variableName << ": \");\n"; in writeJavaAppendOutputToMessage()
765 mJava->indent() << "appendVariableToMessage(message, args." << p.variableName << argsIndex in writeJavaAppendOutputToMessage()
769 mJava->indent() << "message.append(\"Actual output " << p.variableName << ": \");\n"; in writeJavaAppendOutputToMessage()
770 mJava->indent() << "appendVariableToMessage(message, " << p.javaArrayName << actualIndex in writeJavaAppendOutputToMessage()
775 mJava->indent() << "message.append(\"Actual output " << p.variableName in writeJavaAppendOutputToMessage()
777 … mJava->indent() << "appendVariableToMessage(message, Float16Utils.convertFloat16ToDouble(" in writeJavaAppendOutputToMessage()
783 mJava->indent() << "message.append(\" FAIL\");\n"; in writeJavaAppendOutputToMessage()
791 mJava->indent() << "message.append(\"Input " << p.variableName << ": \");\n"; in writeJavaAppendInputToMessage()
792 mJava->indent() << "appendVariableToMessage(message, " << actual << ");\n"; in writeJavaAppendInputToMessage()
797 mJava->indent() << "message.append(\"\\n\");\n"; in writeJavaAppendNewLineToMessage()
804 mJava->indent() << "for (int j = 0; j < " << p.mVectorSize << " ; j++)"; in writeJavaAppendVectorInputToMessage()
815 mJava->indent() << "for (int j = 0; j < " << p.mVectorSize << " ; j++)"; in writeJavaAppendVectorOutputToMessage()
828 mJava->indent() << "try"; in writeJavaCallToRs()
839 mJava->indent() << script << ".set_" << p->rsAllocName << "(" << p->javaAllocName in writeJavaCallToRs()
844 mJava->indent() << script << ".forEach_" << mRsKernelName << "("; in writeJavaCallToRs()
858 mJava->indent() << mJavaVerifyMethodName << "("; in writeJavaCallToRs()
874 mJava->indent() << p->javaAllocName << ".destroy();\n"; in writeJavaCallToRs()
879 mJava->indent() << "} catch (Exception e) {\n"; in writeJavaCallToRs()
881 mJava->indent() << "throw new RSRuntimeException(\"RenderScript. Can't invoke forEach_" in writeJavaCallToRs()
955 mRs->indent() << p->rsType << " " << p->variableName; in writeRsSection()
966 mRs->indent() << mReturnParam->rsType << " " << mReturnParam->variableName << " = "; in writeRsSection()
968 mRs->indent() << "return "; in writeRsSection()
989 mRs->indent() << "rsSetElementAt_" << p->rsType << "(" << p->rsAllocName << ", "; in writeRsSection()
999 mRs->indent() << "return " << mReturnParam->variableName << ";\n"; in writeRsSection()
1034 file->indent() << "private ScriptC_" << testName << " script;\n"; in startJavaFile()
1035 file->indent() << "private ScriptC_" << relaxedTestName << " scriptRelaxed;\n\n"; in startJavaFile()
1037 file->indent() << "@Override\n"; in startJavaFile()
1038 file->indent() << "protected void setUp() throws Exception"; in startJavaFile()
1041 file->indent() << "super.setUp();\n"; in startJavaFile()
1042 file->indent() << "script = new ScriptC_" << testName << "(mRS);\n"; in startJavaFile()
1043 file->indent() << "scriptRelaxed = new ScriptC_" << relaxedTestName << "(mRS);\n"; in startJavaFile()
1048 file->indent() << "@Override\n"; in startJavaFile()
1049 file->indent() << "protected void tearDown() throws Exception"; in startJavaFile()
1052 file->indent() << "script.destroy();\n"; in startJavaFile()
1053 file->indent() << "scriptRelaxed.destroy();\n"; in startJavaFile()
1054 file->indent() << "super.tearDown();\n"; in startJavaFile()
1065 file->indent() << "public void test" << function.getCapitalizedName() << "()"; in finishJavaFile()
1068 file->indent() << m << "();\n"; in finishJavaFile()