diff options
author | Junyan He <junyan.he@linux.intel.com> | 2014-06-10 12:53:12 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-06-11 11:04:09 +0800 |
commit | 97dec3e93f14d2431352b1501b57fe21cee3b719 (patch) | |
tree | 17b3a7d62aac51351719c94ff012c3785e7771be /src/cl_gbe_loader.cpp | |
parent | 64f2ad234111a6f16293955c1943bf0474d84006 (diff) | |
download | beignet-97dec3e93f14d2431352b1501b57fe21cee3b719.tar.gz |
Add the printf logic into the run time.
Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'src/cl_gbe_loader.cpp')
-rw-r--r-- | src/cl_gbe_loader.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/cl_gbe_loader.cpp b/src/cl_gbe_loader.cpp index b1b75d6d..38f9ab62 100644 --- a/src/cl_gbe_loader.cpp +++ b/src/cl_gbe_loader.cpp @@ -59,6 +59,11 @@ gbe_kernel_get_image_size_cb *gbe_kernel_get_image_size = NULL; gbe_kernel_get_image_data_cb *gbe_kernel_get_image_data = NULL; gbe_set_image_base_index_cb *gbe_set_image_base_index_interp = NULL; gbe_get_image_base_index_cb *gbe_get_image_base_index = NULL; +gbe_get_printf_num_cb* gbe_get_printf_num = NULL; +gbe_dup_printfset_cb* gbe_dup_printfset = NULL; +gbe_get_printf_sizeof_size_cb* gbe_get_printf_sizeof_size = NULL; +gbe_release_printf_info_cb* gbe_release_printf_info = NULL; +gbe_output_printf_cb* gbe_output_printf = NULL; struct GbeLoaderInitializer { @@ -200,6 +205,26 @@ struct GbeLoaderInitializer if (gbe_get_image_base_index == NULL) return false; + gbe_get_printf_num = *(gbe_get_printf_num_cb**)dlsym(dlhInterp, "gbe_get_printf_num"); + if (gbe_get_printf_num == NULL) + return false; + + gbe_dup_printfset = *(gbe_dup_printfset_cb**)dlsym(dlhInterp, "gbe_dup_printfset"); + if (gbe_dup_printfset == NULL) + return false; + + gbe_get_printf_sizeof_size = *(gbe_get_printf_sizeof_size_cb**)dlsym(dlhInterp, "gbe_get_printf_sizeof_size"); + if (gbe_get_printf_sizeof_size == NULL) + return false; + + gbe_release_printf_info = *(gbe_release_printf_info_cb**)dlsym(dlhInterp, "gbe_release_printf_info"); + if (gbe_release_printf_info == NULL) + return false; + + gbe_output_printf = *(gbe_output_printf_cb**)dlsym(dlhInterp, "gbe_output_printf"); + if (gbe_output_printf == NULL) + return false; + return true; } |