On 四, 2014-08-28 at 02:51 +0000, Song, Ruiling wrote:
> 
> 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.

The strict math is really a problem.
The old manner which we use two Macro set defines to switch between them
can not work correctly when the math function implementations are
extracted to the source files.
We need a global variable to switch between. Between accord to OpenCL's
syntax rule, we can not add mutable global variable into the global
space. So I need to do something trick in the backend to add such global
variable to handle this.
This patch set will not include it and I will send a separated patch to
fix this issue. 

> 
> -    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);
>  
> 
> _______________________________________________
> Beignet mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/beignet



_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to