Lines Matching refs:mOut

143   if (!mOut.startFile(mOutputDirectory, mClassName + ".h", mRSSourceFilePath,  in writeHeaderFile()
149 mOut.indent() << "#include \"RenderScript.h\"\n\n"; in writeHeaderFile()
152 mOut.indent() << "using namespace android::RSC; // NOLINT\n\n"; in writeHeaderFile()
154 mOut.comment("This class encapsulates access to the exported elements of the script. " in writeHeaderFile()
158 mOut.indent() << "class " << mClassName << " : public android::RSC::ScriptC"; in writeHeaderFile()
159 mOut.startBlock(); in writeHeaderFile()
161 mOut.decreaseIndent(); in writeHeaderFile()
162 mOut.indent() << "private:\n"; in writeHeaderFile()
163 mOut.increaseIndent(); in writeHeaderFile()
169 mOut.decreaseIndent(); in writeHeaderFile()
170 mOut.indent() << "public:\n"; in writeHeaderFile()
171 mOut.increaseIndent(); in writeHeaderFile()
174 mOut.indent() << mClassName << "(android::RSC::sp<android::RSC::RS> rs);\n"; in writeHeaderFile()
175 mOut.indent() << "virtual ~" << mClassName << "();\n\n"; in writeHeaderFile()
181 mOut.endBlock(true); in writeHeaderFile()
182 mOut.closeFile(); in writeHeaderFile()
213 mOut.comment("The following elements are used to verify the types of " in genFieldsForAllocationTypeVerification()
217 mOut.indent() << "android::RSC::sp<const android::RSC::Element> " in genFieldsForAllocationTypeVerification()
232 mOut.comment("For each non-const variable exported by the script, we " in genFieldsToStoreExportVariableValues()
242 mOut.indent() << GetTypeName(ev->getType()) << " " RS_EXPORT_VAR_PREFIX in genFieldsToStoreExportVariableValues()
256 mOut.indent() << "// No forEach_root(...)\n"; in genForEachDeclarations()
261 mOut.comment("For each kernel of the script corresponds one method. " in genForEachDeclarations()
270 mOut.indent() << FunctionStart; in genForEachDeclarations()
295 mOut << ");\n"; in genForEachDeclarations()
318 mOut.indent() << "// No forEach_root(...)\n"; in genExportForEachBodies()
325 mOut.indent() << FunctionStart; in genExportForEachBodies()
348 mOut << ")"; in genExportForEachBodies()
349 mOut.startBlock(); in genExportForEachBodies()
371 mOut.indent() << "forEach(" << slot << ", "; in genExportForEachBodies()
376 mOut << "ain, "; in genExportForEachBodies()
378 mOut << "NULL, "; in genExportForEachBodies()
382 mOut << "aout, "; in genExportForEachBodies()
384 mOut << "NULL, "; in genExportForEachBodies()
388 mOut << "NULL, 0);\n"; in genExportForEachBodies()
389 mOut.endBlock(); in genExportForEachBodies()
403 mOut.startBlock(); in genExportFunctionBodies()
413 mOut.indent() << "invoke(" << slot; in genExportFunctionBodies()
415 mOut << ", __fp.getData(), " << param_len << ");\n"; in genExportFunctionBodies()
417 mOut << ", NULL, 0);\n"; in genExportFunctionBodies()
419 mOut.endBlock(); in genExportFunctionBodies()
435 mOut.indent() << "static const unsigned char __txt[] ="; in genEncodedBitCode()
436 mOut.startBlock(); in genEncodedBitCode()
438 mOut.indent(); in genEncodedBitCode()
442 mOut << buf2; in genEncodedBitCode()
444 mOut << "\n"; in genEncodedBitCode()
446 mOut.endBlock(true); in genEncodedBitCode()
447 mOut << "\n"; in genEncodedBitCode()
452 if (!mOut.startFile(mOutputDirectory, mClassName + ".cpp", mRSSourceFilePath, in writeImplementationFile()
459 mOut.indent() << "#include \"" << mClassName << ".h\"\n\n"; in writeImplementationFile()
462 mOut.indent() << "\n\n"; in writeImplementationFile()
466 mOut.indent() << mClassName << "::" << mClassName in writeImplementationFile()
472 mOut.startBlock(); in writeImplementationFile()
476 mOut.indent() << kRsElemPrefix << *I << " = android::RSC::Element::" << *I in writeImplementationFile()
490 mOut.endBlock(); in writeImplementationFile()
493 mOut.indent() << mClassName << "::~" << mClassName << "()"; in writeImplementationFile()
494 mOut.startBlock(); in writeImplementationFile()
495 mOut.endBlock(); in writeImplementationFile()
501 mOut.closeFile(); in writeImplementationFile()
506 mOut.comment("Methods to set and get the variables exported by the script. " in genExportVariablesGetterAndSetter()
558 mOut.indent() << "void set_" << EV->getName() << "(" << TypeName << " v)"; in genGetterAndSetter()
559 mOut.startBlock(); in genGetterAndSetter()
560 mOut.indent() << "setVar(" << getNextExportVarSlot() << ", "; in genGetterAndSetter()
562 mOut << "v"; in genGetterAndSetter()
564 mOut << "&v, sizeof(v)"; in genGetterAndSetter()
566 mOut << ");\n"; in genGetterAndSetter()
567 mOut.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = v;\n"; in genGetterAndSetter()
568 mOut.endBlock(); in genGetterAndSetter()
570 mOut.indent() << TypeName << " get_" << EV->getName() << "() const"; in genGetterAndSetter()
571 mOut.startBlock(); in genGetterAndSetter()
575 mOut.indent() << "return "; in genGetterAndSetter()
577 mOut << ";\n"; in genGetterAndSetter()
579 mOut.indent() << "return " << RS_EXPORT_VAR_PREFIX << EV->getName() in genGetterAndSetter()
582 mOut.endBlock(); in genGetterAndSetter()
599 mOut.indent() << "void bind_" << VarName << "(" << TypeName << " v)"; in genPointerTypeExportVariable()
600 mOut.startBlock(); in genPointerTypeExportVariable()
601 mOut.indent() << "bindAllocation(v, " << slot << ");\n"; in genPointerTypeExportVariable()
602 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = v;\n"; in genPointerTypeExportVariable()
603 mOut.endBlock(); in genPointerTypeExportVariable()
605 mOut.indent() << TypeName << " get_" << VarName << "() const"; in genPointerTypeExportVariable()
606 mOut.startBlock(); in genPointerTypeExportVariable()
610 mOut.indent() << "return "; in genPointerTypeExportVariable()
612 mOut << ";\n"; in genPointerTypeExportVariable()
614 mOut.indent() << "return " << RS_EXPORT_VAR_PREFIX << VarName << ";\n"; in genPointerTypeExportVariable()
616 mOut.endBlock(); in genPointerTypeExportVariable()
627 mOut.indent() << "void set_" << EV->getName() << "(" in genGetterAndSetter()
630 mOut.startBlock(); in genGetterAndSetter()
631 mOut.indent() << "setVar(" << getNextExportVarSlot() in genGetterAndSetter()
633 mOut.indent() << RS_EXPORT_VAR_PREFIX << EV->getName() << " = v;\n"; in genGetterAndSetter()
634 mOut.endBlock(); in genGetterAndSetter()
636 mOut.indent() << rtd.type->rs_c_vector_prefix << EVT->getNumElement() in genGetterAndSetter()
638 mOut.startBlock(); in genGetterAndSetter()
641 mOut.indent() << "return "; in genGetterAndSetter()
643 mOut << ";\n"; in genGetterAndSetter()
645 mOut.indent() << "return " << RS_EXPORT_VAR_PREFIX << EV->getName() in genGetterAndSetter()
648 mOut.endBlock(); in genGetterAndSetter()
658 mOut.indent() << "void set_" << EV->getName() << "(float v[16])"; in genMatrixTypeExportVariable()
659 mOut.startBlock(); in genMatrixTypeExportVariable()
660 mOut.indent() << "setVar(" << tmp.str() << ", v, sizeof(float)*16);\n"; in genMatrixTypeExportVariable()
661 mOut.endBlock(); in genMatrixTypeExportVariable()
663 mOut.indent() << "void set_" << EV->getName() << "(float v[9])"; in genMatrixTypeExportVariable()
664 mOut.startBlock(); in genMatrixTypeExportVariable()
665 mOut.indent() << "setVar(" << tmp.str() << ", v, sizeof(float)*9);"; in genMatrixTypeExportVariable()
666 mOut.endBlock(); in genMatrixTypeExportVariable()
668 mOut.indent() << "void set_" << EV->getName() << "(float v[4])"; in genMatrixTypeExportVariable()
669 mOut.startBlock(); in genMatrixTypeExportVariable()
670 mOut.indent() << "setVar(" << tmp.str() << ", v, sizeof(float)*4);"; in genMatrixTypeExportVariable()
671 mOut.endBlock(); in genMatrixTypeExportVariable()
673 mOut.indent() << "#error: TODO: " << ET->getName(); in genMatrixTypeExportVariable()
691 mOut.indent() << "void set_" << EV->getName() << "(" << GetTypeName(EV->getType()) << " v " in genGetterAndSetter()
693 mOut.startBlock(); in genGetterAndSetter()
694 mOut.indent() << "setVar(" << tmp.str() << ", v, sizeof(" << GetTypeName(EV->getType()) + ") *" in genGetterAndSetter()
696 mOut.endBlock(); in genGetterAndSetter()
706 mOut.indent() << "void "; in makeFunctionSignature()
708 mOut << mClassName << "::"; in makeFunctionSignature()
710 mOut << "invoke_" << ef->getName() << "("; in makeFunctionSignature()
718 mOut << ", "; in makeFunctionSignature()
722 mOut << GetTypeName((*i)->getType()) << " " << (*i)->getName(); in makeFunctionSignature()
727 mOut << ")"; in makeFunctionSignature()
729 mOut << ");\n"; in makeFunctionSignature()
739 mOut << ",\n"; in genArguments()
740 mOut.indent() << string(Offset, ' '); in genArguments()
745 mOut << I->Type << " " << I->Name; in genArguments()
747 mOut << " = " << I->DefaultValue; in genArguments()
757 mOut.indent() << "android::RSC::FieldPacker " << FieldPackerName << "(" in genCreateFieldPacker()
773 mOut.indent() << FieldPackerName << ".add(" << VarName << ");\n"; in genPackVarOfType()
829 mOut.indent() << FieldPackerName << ".skip(" << (FieldOffset - Pos) in genPackVarOfType()
837 mOut.indent() << FieldPackerName << ".skip(" in genPackVarOfType()
846 mOut.indent() << FieldPackerName << ".skip(" << ERT->getAllocSize() - Pos in genPackVarOfType()
857 mOut.indent() << "// Type check for " << VarName << "\n"; in genTypeCheck()
879 mOut.indent() << "if (!" << VarName in genTypeCheck()
882 mOut.startBlock(); in genTypeCheck()
883 mOut.indent() << "mRS->throwError(RS_ERROR_RUNTIME_ERROR, " in genTypeCheck()
885 mOut.indent() << "return;\n"; in genTypeCheck()
886 mOut.endBlock(); in genTypeCheck()
1000 mOut.indent() << "memset(&" << RS_EXPORT_VAR_PREFIX << VarName in genZeroInitExportVariable()
1009 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = "; in genInitPrimitiveExportVariable()
1011 mOut << ";\n"; in genInitPrimitiveExportVariable()
1019 mOut << ((api.getSExtValue() == 0) ? "false" : "true"); in genInitValue()
1022 mOut << api.getSExtValue(); in genInitValue()
1024 mOut << "L"; in genInitValue()
1034 mOut << s.c_str(); in genInitValue()
1037 mOut << ".f"; in genInitValue()
1039 mOut << "f"; in genInitValue()
1063 mOut.indent() << RS_EXPORT_VAR_PREFIX << VarName << " = " in genInitBoolExportVariable()