mirror of
https://github.com/fumiama/base16384-sycl.git
synced 2026-06-08 03:56:19 +08:00
optimize(test): move test kernels into test class
This commit is contained in:
@@ -5,12 +5,12 @@ set(LOCAL_B14LIBS "")
|
||||
foreach(CPP_FILE ${CPP_FILES})
|
||||
# name without .cpp
|
||||
get_filename_component(TARGET_NAME ${CPP_FILE} NAME_WE)
|
||||
message(STATUS "Add lib: ${TARGET_NAME}")
|
||||
message(STATUS "Add CPP lib: ${TARGET_NAME}")
|
||||
add_library(${TARGET_NAME} STATIC ${CPP_FILE})
|
||||
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}")
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
|
||||
|
||||
|
||||
list(APPEND LOCAL_B14LIBS ${TARGET_NAME})
|
||||
endforeach()
|
||||
|
||||
|
||||
14
libs/test_kernels.cpp
Normal file
14
libs/test_kernels.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <sycl/sycl.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
SYCL_EXTERNAL uint8_t base16384::test::kernels_basic(uint8_t in) {
|
||||
in *= in;
|
||||
in %= 251;
|
||||
in ^= in >> 2;
|
||||
in += 17;
|
||||
in *= 3;
|
||||
return in ^ (in << 1);
|
||||
}
|
||||
Reference in New Issue
Block a user