summaryrefslogtreecommitdiffhomepage
path: root/examples/simple_allocator_op/example.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-14 13:12:14 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-14 13:12:14 +0100
commit0424f52c142e64cfadaa37288feee775fafc2bf0 (patch)
tree8d60109d4a53e1583cefc46a5bd0b8fe6cae7385 /examples/simple_allocator_op/example.cc
parent2448ac2ef13d96e4ef3b7a9a15ef1cfdc2195831 (diff)
feat! core: new ocl::allocator API (breaking changes) and example.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'examples/simple_allocator_op/example.cc')
-rw-r--r--examples/simple_allocator_op/example.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/simple_allocator_op/example.cc b/examples/simple_allocator_op/example.cc
new file mode 100644
index 0000000..83be033
--- /dev/null
+++ b/examples/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;
+}