add binary type support for compiled object and library.
authorLuo <xionghu.luo@intel.com>
Wed, 18 Jun 2014 00:17:34 +0000 (08:17 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Wed, 18 Jun 2014 12:00:42 +0000 (20:00 +0800)
commit9ee75c0aa5906a9d727ad56a60eb73a87c1c021f
tree09ea3634d8dbe0e68b56f6cc8389b76ad6f0d807
parent853ac4d94de25cf2c29fb8225e2a7162f40bdc7d
add binary type support for compiled object and library.

save the llvm bitcode to program->binary: insert a byte in front of the
bitcode stands for binary type(0 means GEN binary, 1 means COMPILED_OBJECT, 2 means LIBRARY);
load the binary to module by ParseIR.

create random directory to save compile header files.
use strncpy and strncat to replace strcpy and strcat.

v6: fix enqueue_copy_fill bug, use '\0' instead of 0 in the header.
v7  binary header format issue: fix test_load_program_from_bin bug of standalone kernel generated by gbe_bin_generater.

Signed-off-by: Luo <xionghu.luo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
backend/src/backend/gen_program.cpp
backend/src/backend/program.cpp
backend/src/backend/program.h
backend/src/gbe_bin_generater.cpp
src/cl_api.c
src/cl_gbe_loader.cpp
src/cl_gbe_loader.h
src/cl_program.c
src/cl_program.h