summaryrefslogtreecommitdiffhomepage
path: root/example/allocator_op_example/example.cpp
blob: e3918ad17c419bc86e060fe5a4dd14d509f21850 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2025-2026, Amlal El Mahrouss (amlal@nekernel.org)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Official repository: https://github.com/ocl-org/core

#include <ocl/print.hpp>
#include <ocl/allocator_op.hpp>

/// \brief Allocation of ints example.
int main()
{
	ocl::allocator<int> int_alloc;
	auto				foo = int_alloc.construct_array<1>();

	*foo = 67;
	ocl::io::print(*foo);

	return EXIT_SUCCESS;
}