]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/compute/test/test_buffer_allocator.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / compute / test / test_buffer_allocator.cpp
1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.com>
3 //
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
7 //
8 // See http://boostorg.github.com/compute for more information.
9 //---------------------------------------------------------------------------//
10
11 #define BOOST_TEST_MODULE TestBufferAllocator
12 #include <boost/test/unit_test.hpp>
13
14 #include <boost/compute/allocator/buffer_allocator.hpp>
15
16 #include "context_setup.hpp"
17
18 namespace compute = boost::compute;
19
20 BOOST_AUTO_TEST_CASE(allocate)
21 {
22 compute::buffer_allocator<int> allocator(context);
23
24 typedef compute::buffer_allocator<int>::pointer pointer;
25 pointer x = allocator.allocate(10);
26 allocator.deallocate(x, 10);
27 }
28
29 BOOST_AUTO_TEST_SUITE_END()