diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-12 13:47:25 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-12 16:08:30 +0800 |
commit | 30e684ed12ac82c900cf985d7e5d0a4355035282 (patch) | |
tree | c55fd92fdcca0119e34ce9fc77f445966142f3fc | |
parent | 9a996d0da4351a93b3670b9cd1784d325097df58 (diff) |
runtime: fix program binary type bug.
If the binary is a executable type, the first byte is zero and
we need to set the binary type correctly to CL_PROGRAM_BINARY_TYPE_EXECUTABLE.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: He Junyan <junyan.he@inbox.com>
Tested-by: "Meng, Mengmeng" <mengmeng.meng@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
-rw-r--r-- | src/cl_program.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cl_program.c b/src/cl_program.c index 3ecc49ff..022e8935 100644 --- a/src/cl_program.c +++ b/src/cl_program.c @@ -247,6 +247,9 @@ cl_program_create_from_binary(cl_context ctx, } program->source_type = FROM_LLVM; } + else if (*program->binary == 0) { + program->binary_type = CL_PROGRAM_BINARY_TYPE_EXECUTABLE; + } if (binary_status) binary_status[0] = CL_SUCCESS; |