The root cause is that it fails to increment `currID` when traversing hash map.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
kernel = pair.second;
break;
}
+ currID++;
}
return kernel;
}
--- /dev/null
+__kernel void first_kernel(void)
+{
+}
+
+__kernel void second_kernel(void)
+{
+}
\ No newline at end of file
compiler_lower_return0.cpp
compiler_lower_return1.cpp
compiler_lower_return2.cpp
+ compiler_multiple_kernels.cpp
+ compiler_obread.cpp
+ compiler_obwrite.cpp
+ compiler_region.cpp
+ compiler_region0.cpp
+ compiler_region1.cpp
compiler_short_scatter.cpp
compiler_sub_bytes.cpp
compiler_sub_shorts.cpp
--- /dev/null
+#include "utest_helper.hpp"
+
+static void compiler_multiple_kernels(void)
+{
+ OCL_CREATE_KERNEL_FROM_FILE("compiler_multiple_kernels", "first_kernel");
+}
+
+MAKE_UTEST_FROM_FUNCTION(compiler_multiple_kernels);
\ No newline at end of file
OCL_CALL (cl_kernel_init, NAME".cl", NAME, SOURCE); \
} while (0)
+#define OCL_CREATE_KERNEL_FROM_FILE(FILE_NAME, KERNEL_NAME) \
+ do { \
+ OCL_CALL(cl_kernel_init, FILE_NAME".cl", KERNEL_NAME, SOURCE); \
+ } while (0)
+
#define OCL_CREATE_BUFFER(BUFFER, FLAGS, SIZE, DATA) \
do { \
cl_int status; \