• Home
  • Raw
  • Download

Lines Matching refs:tab

430 string tab(int n) { return string(n * 4, ' '); }  in tab()  function
531 file << tab(2) << p.javaBaseType << "[] " << p.javaArrayName << " = new " << p.javaBaseType in writeJavaArrayInitialization()
533 file << tab(2) << p.javaAllocName << ".copyTo(" << p.javaArrayName << ");\n"; in writeJavaArrayInitialization()
862 mJavaFile << tab(1) << "private ScriptC_" << mTestName << " script;\n"; in startJavaFile()
863 mJavaFile << tab(1) << "private ScriptC_" << mRelaxedTestName << " scriptRelaxed;\n\n"; in startJavaFile()
865 mJavaFile << tab(1) << "@Override\n"; in startJavaFile()
866 mJavaFile << tab(1) << "protected void setUp() throws Exception {\n"; in startJavaFile()
867 mJavaFile << tab(2) << "super.setUp();\n"; in startJavaFile()
868 mJavaFile << tab(2) << "script = new ScriptC_" << mTestName << "(mRS);\n"; in startJavaFile()
869 mJavaFile << tab(2) << "scriptRelaxed = new ScriptC_" << mRelaxedTestName << "(mRS);\n"; in startJavaFile()
870 mJavaFile << tab(1) << "}\n\n"; in startJavaFile()
881 mJavaCallAllCheckMethods += tab(2) + call + "\n"; in addJavaCheckCall()
885 mJavaFile << tab(1) << "public void test" << mCapitalizedName << "() {\n"; in finishJavaFile()
887 mJavaFile << tab(1) << "}\n"; in finishJavaFile()
1327 rs << tab(1) << p.rsType << " " << p.variableName; in writeRsSection()
1338 rs << tab(1) << mParams[mReturnIndex]->rsType << " " in writeRsSection()
1341 rs << tab(1) << "return "; in writeRsSection()
1367 rs << tab(1) << "rsSetElementAt_" << p.rsType << "(" << p.rsAllocName << ", "; in writeRsSection()
1375 rs << tab(1) << "return " << mParams[mReturnIndex]->variableName << ";\n"; in writeRsSection()
1418 s += tab(1) + "public class " + name + " {\n"; in writeJavaArgumentClass()
1421 s += tab(2) + "public "; in writeJavaArgumentClass()
1432 s += tab(1) + "}\n\n"; in writeJavaArgumentClass()
1438 file << tab(1) << "private void " << mJavaCheckMethodName << "() {\n"; in writeJavaCheckMethod()
1443 writeJavaInputAllocationDefinition(file, tab(2), p); in writeJavaCheckMethod()
1451 file << tab(2) << "enforceOrdering(" << smallerAlloc << ", " << p.javaAllocName in writeJavaCheckMethod()
1457 file << tab(1) << "}\n\n"; in writeJavaCheckMethod()
1593 file << tab(2) << "for (int i = 0; i < INPUTSIZE; i++) {\n"; in writeJavaVerifyScalarMethod()
1594 file << tab(3) << "for (int j = 0; j < " << vectorSize << " ; j++) {\n"; in writeJavaVerifyScalarMethod()
1596 file << tab(4) << "// Extract the inputs.\n"; in writeJavaVerifyScalarMethod()
1597 file << tab(4) << mJavaArgumentsClassName << " args = new " << mJavaArgumentsClassName in writeJavaVerifyScalarMethod()
1602 file << tab(4) << "args." << p.variableName << " = " << p.javaArrayName << "[i"; in writeJavaVerifyScalarMethod()
1611 file << tab(4) << "// Extract the outputs.\n"; in writeJavaVerifyScalarMethod()
1615 file << tab(4) << "args." << p.variableName << " = " << p.javaArrayName in writeJavaVerifyScalarMethod()
1619 file << tab(4) << "// Ask the CoreMathVerifier to validate.\n"; in writeJavaVerifyScalarMethod()
1621 file << tab(4) << "Target target = new Target(relaxed);\n"; in writeJavaVerifyScalarMethod()
1623 file << tab(4) << "String errorMessage = CoreMathVerifier." << mJavaVerifierVerifyMethodName in writeJavaVerifyScalarMethod()
1629 file << tab(4) << "boolean valid = errorMessage == null;\n"; in writeJavaVerifyScalarMethod()
1631 file << tab(4) << "// Figure out what the outputs should have been.\n"; in writeJavaVerifyScalarMethod()
1633 file << tab(4) << "Target target = new Target(relaxed);\n"; in writeJavaVerifyScalarMethod()
1635 file << tab(4) << "CoreMathVerifier." << mJavaVerifierComputeMethodName << "(args"; in writeJavaVerifyScalarMethod()
1640 file << tab(4) << "// Validate the outputs.\n"; in writeJavaVerifyScalarMethod()
1641 file << tab(4) << "boolean valid = true;\n"; in writeJavaVerifyScalarMethod()
1650 file << tab(4) << "if (!valid) {\n"; in writeJavaVerifyScalarMethod()
1651 file << tab(5) << "StringBuilder message = new StringBuilder();\n"; in writeJavaVerifyScalarMethod()
1662 file << tab(5) << "message.append(errorMessage);\n"; in writeJavaVerifyScalarMethod()
1665 file << tab(5) << "assertTrue(\"Incorrect output for " << mJavaCheckMethodName << "\" +\n"; in writeJavaVerifyScalarMethod()
1666 file << tab(7) << "(relaxed ? \"_relaxed\" : \"\") + \":\\n\" + message.toString(), valid);\n"; in writeJavaVerifyScalarMethod()
1667 file << tab(4) << "}\n"; in writeJavaVerifyScalarMethod()
1668 file << tab(3) << "}\n"; in writeJavaVerifyScalarMethod()
1669 file << tab(2) << "}\n"; in writeJavaVerifyScalarMethod()
1670 file << tab(1) << "}\n\n"; in writeJavaVerifyScalarMethod()
1674 file << tab(1) << "private void " << mJavaVerifyMethodName << "("; in writeJavaVerifyFunctionHeader()
1686 file << tab(indent + 1) << "valid = false;\n"; in writeJavaTestAndSetValid()
1687 file << tab(indent) << "}\n"; in writeJavaTestAndSetValid()
1692 file << tab(indent) << "if ("; in writeJavaTestOneValue()
1715 file << tab(indent) << "message.append(\"Output " + p.variableName + ": \");\n"; in writeJavaAppendOutputToMessage()
1725 file << tab(indent) << "message.append(\"Expected output " + p.variableName + ": \");\n"; in writeJavaAppendOutputToMessage()
1732 file << tab(indent) << "message.append(\"Actual output " + p.variableName + ": \");\n"; in writeJavaAppendOutputToMessage()
1736 file << tab(indent + 1) << "message.append(\" FAIL\");\n"; in writeJavaAppendOutputToMessage()
1737 file << tab(indent) << "}\n"; in writeJavaAppendOutputToMessage()
1745 file << tab(indent) << "message.append(\"Input " + p.variableName + ": \");\n"; in writeJavaAppendInputToMessage()
1751 file << tab(indent) << "message.append(\"\\n\");\n"; in writeJavaAppendNewLineToMessage()
1758 file << tab(indent) << "message.append(String.format(\"%14.8g {%8x} %15a\",\n"; in writeJavaAppendVariableToMessage()
1759 file << tab(indent + 2) << value << ", " in writeJavaAppendVariableToMessage()
1762 file << tab(indent) << "message.append(String.format(\"%24.8g {%16x} %31a\",\n"; in writeJavaAppendVariableToMessage()
1763 file << tab(indent + 2) << value << ", " in writeJavaAppendVariableToMessage()
1766 file << tab(indent) << "message.append(String.format(\"0x%x\", " << value << "));\n"; in writeJavaAppendVariableToMessage()
1768 file << tab(indent) << "message.append(String.format(\"%d\", " << value << "));\n"; in writeJavaAppendVariableToMessage()
1775 file << tab(indent) << "message.append("; in writeJavaAppendFloatVariableToMessage()
1790 file << tab(indent) << "for (int j = 0; j < " << p.mVectorSize << " ; j++) {\n"; in writeJavaVectorComparison()
1792 file << tab(indent) << "}\n"; in writeJavaVectorComparison()
1801 file << tab(indent) << "for (int j = 0; j < " << p.mVectorSize << " ; j++) {\n"; in writeJavaAppendVectorInputToMessage()
1804 file << tab(indent) << "}\n"; in writeJavaAppendVectorInputToMessage()
1814 file << tab(indent) << "for (int j = 0; j < " << p.mVectorSize << " ; j++) {\n"; in writeJavaAppendVectorOutputToMessage()
1817 file << tab(indent) << "}\n"; in writeJavaAppendVectorOutputToMessage()
1827 file << tab(2) + "for (int i = 0; i < INPUTSIZE; i++) {\n"; in writeJavaVerifyVectorMethod()
1828 file << tab(3) << mJavaArgumentsNClassName << " args = new " << mJavaArgumentsNClassName in writeJavaVerifyVectorMethod()
1831 file << tab(3) << "// Create the appropriate sized arrays in args\n"; in writeJavaVerifyVectorMethod()
1839 file << tab(3) << "args." << p.variableName << " = new " << type << "[" << p.mVectorSize in writeJavaVerifyVectorMethod()
1844 file << tab(3) << "// Fill args with the input values\n"; in writeJavaVerifyVectorMethod()
1849 file << tab(3) << "args." << p.variableName << " = " << p.javaArrayName + "[i]" in writeJavaVerifyVectorMethod()
1852 file << tab(3) << "for (int j = 0; j < " << p.mVectorSize << " ; j++) {\n"; in writeJavaVerifyVectorMethod()
1853 file << tab(4) << "args." << p.variableName + "[j] = " in writeJavaVerifyVectorMethod()
1856 file << tab(3) << "}\n"; in writeJavaVerifyVectorMethod()
1860 file << tab(3) << "Target target = new Target(relaxed);\n"; in writeJavaVerifyVectorMethod()
1861 file << tab(3) << "CoreMathVerifier." << mJavaVerifierComputeMethodName in writeJavaVerifyVectorMethod()
1864 file << tab(3) << "// Compare the expected outputs to the actual values returned by RS.\n"; in writeJavaVerifyVectorMethod()
1865 file << tab(3) << "boolean valid = true;\n"; in writeJavaVerifyVectorMethod()
1873 file << tab(3) << "if (!valid) {\n"; in writeJavaVerifyVectorMethod()
1874 file << tab(4) << "StringBuilder message = new StringBuilder();\n"; in writeJavaVerifyVectorMethod()
1884 file << tab(4) << "assertTrue(\"Incorrect output for " << mJavaCheckMethodName << "\" +\n"; in writeJavaVerifyVectorMethod()
1885 file << tab(6) << "(relaxed ? \"_relaxed\" : \"\") + \":\\n\" + message.toString(), valid);\n"; in writeJavaVerifyVectorMethod()
1886 file << tab(3) << "}\n"; in writeJavaVerifyVectorMethod()
1887 file << tab(2) << "}\n"; in writeJavaVerifyVectorMethod()
1888 file << tab(1) << "}\n\n"; in writeJavaVerifyVectorMethod()
1897 file << tab(2) << "try {\n"; in writeJavaCallToRs()
1901 writeJavaOutputAllocationDefinition(file, tab(3), p); in writeJavaCallToRs()
1908 file << tab(3) << script << ".set_" << p.rsAllocName << "(" << p.javaAllocName in writeJavaCallToRs()
1913 file << tab(3) << script << ".forEach_" << mRsKernelName << "("; in writeJavaCallToRs()
1927 file << tab(3) << mJavaVerifyMethodName << "("; in writeJavaCallToRs()
1940 file << tab(2) << "} catch (Exception e) {\n"; in writeJavaCallToRs()
1941 file << tab(3) << "throw new RSRuntimeException(\"RenderScript. Can't invoke forEach_" in writeJavaCallToRs()
1943 file << tab(2) << "}\n"; in writeJavaCallToRs()