diff options
Diffstat (limited to 'example/simple_allocator_op')
| -rw-r--r-- | example/simple_allocator_op/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | example/simple_allocator_op/example.cc | 14 |
2 files changed, 29 insertions, 0 deletions
diff --git a/example/simple_allocator_op/CMakeLists.txt b/example/simple_allocator_op/CMakeLists.txt new file mode 100644 index 0000000..fbda92b --- /dev/null +++ b/example/simple_allocator_op/CMakeLists.txt @@ -0,0 +1,15 @@ + +cmake_minimum_required(VERSION 3.15...3.31) + +project( + AllocatorExample + VERSION 1.0 + LANGUAGES CXX) + +find_package(Boost REQUIRED COMPONENTS container) + +add_executable(AllocatorExample example.cc) + +set_property(TARGET AllocatorExample PROPERTY CXX_STANDARD 20) +target_include_directories(AllocatorExample PUBLIC ../../include/) +target_link_libraries(AllocatorExample PRIVATE Boost::container) diff --git a/example/simple_allocator_op/example.cc b/example/simple_allocator_op/example.cc new file mode 100644 index 0000000..83be033 --- /dev/null +++ b/example/simple_allocator_op/example.cc @@ -0,0 +1,14 @@ +#include <ocl/print.hpp> +#include <ocl/allocator_op.hpp> + +/// @brief Basic Send test +int main() +{ + ocl::allocator<int> int_alloc; + auto foo = int_alloc.construct_array<1>(); + + *foo = 67; + ocl::io::print(*foo); + + return EXIT_SUCCESS; +} |
