]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/compute/test/test_buffer_allocator.cpp
1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.com>
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
8 // See http://boostorg.github.com/compute for more information.
9 //---------------------------------------------------------------------------//
11 #define BOOST_TEST_MODULE TestBufferAllocator
12 #include <boost/test/unit_test.hpp>
14 #include <boost/compute/allocator/buffer_allocator.hpp>
16 #include "context_setup.hpp"
18 namespace compute
= boost::compute
;
20 BOOST_AUTO_TEST_CASE(allocate
)
22 compute::buffer_allocator
<int> allocator(context
);
24 typedef compute::buffer_allocator
<int>::pointer pointer
;
25 pointer x
= allocator
.allocate(10);
26 allocator
.deallocate(x
, 10);
29 BOOST_AUTO_TEST_SUITE_END()