[Beignet] [PATCH 16/18] Enable the libocl to replace the huge PCH header.

Song, Ruiling ruiling.song at intel.com
Wed Aug 27 19:51:01 PDT 2014



Suppose you cannot remove below lines of code, it is for clCompileProgram()
-    //for clCompilerProgram usage.
-    if(temp_header_path){
-      clOpt += " -I ";
-      clOpt += temp_header_path;
-      clOpt += " ";
-    }


Another question is how do you make it linked with fast version math function if OCL_STRICT_CONFORMANCE is false? I did not understand it clearly.

-    if (!OCL_STRICT_CONFORMANCE) {
-        fwrite(ocl_mathfunc_fastpath_str.c_str(), strlen(ocl_mathfunc_fastpath_str.c_str()), 1, clFile);
-    }
+    //Add the include header file
+    std::string includeOclStr = "#include \"ocl.h\"\n";
+    fwrite(includeOclStr.c_str(), strlen(includeOclStr.c_str()), 1, 
+ clFile);
 



More information about the Beignet mailing list