Lines Matching refs:tab

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