Lines Matching refs:file

5  * you may not use this file except in compliance with the License.
366 /* Generate the white list file of the mangled function prototypes. This generated list is used
384 GeneratedFile file;
385 if (!file.start(".", "RSStubsWhiteList.cpp")) {
389 file.writeNotices();
390 file << "#include \"RSStubsWhiteList.h\"\n\n";
391 file << "std::vector<std::string> stubList = {\n";
393 file << "\"" << e << "\",\n";
395 file << "};\n";
400 // Add a uniquely named variable definition to the file and return its name.
401 static const string addVariable(GeneratedFile* file, unsigned int* variableNumber) {
406 *file << "char " << name << "[200];\n";
410 /* Write to the file the globals needed to make the call for this permutation. The actual
414 static void generateTestCall(GeneratedFile* file, ostringstream* calls,
422 *calls << "*(" << ret->rsType << "*)" << addVariable(file, variableNumber) << " = ";
435 *calls << "(" << p->rsType << "*) " << addVariable(file, variableNumber);
437 *calls << "*(" << p->rsType << "*)" << addVariable(file, variableNumber);
444 /* Generate a test file that will be used in the frameworks/compile/slang/tests unit tests.
445 * This file tests that all RenderScript APIs can be called for the specified API level.
451 * This file can be used to verify the white list that's also generated in this file. To do so,
455 GeneratedFile file;
456 if (!file.start(slangTestDirectory, "all" + to_string(apiLevel) + ".rs")) {
463 file << "// -target-api " << apiLevel << " -Wno-deprecated-declarations\n";
465 file.writeNotices();
466 file << "#pragma version(1)\n";
467 file << "#pragma rs java_package_name(com.example.renderscript.testallapi)\n\n";
469 file << "#include \"rs_graphics.rsh\"\n\n";
473 * the calls in a stream so that we can emit them in the file in the proper order.
490 generateTestCall(&file, &calls, &variableNumber, *function, *permutation);
497 file << "\n";
501 file << "void RS_KERNEL test(int in, rs_kernel_context context) {\n";
503 file << "void RS_KERNEL test(int in) {\n";
505 file << "void root(const int* in) {\n";
507 file << calls.str();
508 file << "}\n";
518 // Generate a test file for each apiLevel.