Add initial SYCL implementation
This commit is contained in:
parent
1a38b18954
commit
da4f918788
@ -30,3 +30,11 @@ else (${OpenCL_FOUND})
|
||||
message("Skipping OpenCL...")
|
||||
endif (${OpenCL_FOUND})
|
||||
|
||||
# TODO: Find SYCL implementations somehow
|
||||
if (true)
|
||||
add_executable(gpu-stream-sycl main.cpp SYCLStream.cpp)
|
||||
target_compile_definitions(gpu-stream-sycl PUBLIC SYCL)
|
||||
set_property(TARGET gpu-stream-sycl PROPERTY CXX_STANDARD 14)
|
||||
else ()
|
||||
message("Skipping SYCL...")
|
||||
endif ()
|
||||
|
||||
8
main.cpp
8
main.cpp
@ -24,7 +24,8 @@
|
||||
#include "OCLStream.h"
|
||||
#elif defined(ACC)
|
||||
#include "ACCStream.h"
|
||||
|
||||
#elif defined(SYCL)
|
||||
#include "SYCLStream.h"
|
||||
#endif
|
||||
|
||||
|
||||
@ -87,6 +88,10 @@ void run()
|
||||
// Use the OpenACC implementation
|
||||
stream = new ACCStream<T>(ARRAY_SIZE, a.data(), b.data(), c.data());
|
||||
|
||||
#elif defined(SYCL)
|
||||
// Use the SYCL implementation
|
||||
stream = new SYCLStream<T>(ARRAY_SIZE, deviceIndex);
|
||||
|
||||
#endif
|
||||
|
||||
stream->write_arrays(a, b, c);
|
||||
@ -285,4 +290,3 @@ void parseArguments(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user