]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/compute/include/boost/compute/algorithm/detail/scan.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / compute / include / boost / compute / algorithm / detail / scan.hpp
CommitLineData
7c673cae
FG
1//---------------------------------------------------------------------------//
2// Copyright (c) 2013 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#ifndef BOOST_COMPUTE_ALGORITHM_DETAIL_SCAN_HPP
12#define BOOST_COMPUTE_ALGORITHM_DETAIL_SCAN_HPP
13
14#include <boost/compute/device.hpp>
15#include <boost/compute/algorithm/detail/scan_on_cpu.hpp>
16#include <boost/compute/algorithm/detail/scan_on_gpu.hpp>
17
18namespace boost {
19namespace compute {
20namespace detail {
21
22template<class InputIterator, class OutputIterator, class T, class BinaryOperator>
23inline OutputIterator scan(InputIterator first,
24 InputIterator last,
25 OutputIterator result,
26 bool exclusive,
27 T init,
28 BinaryOperator op,
29 command_queue &queue)
30{
31 const device &device = queue.get_device();
32
33 if(device.type() & device::cpu){
34 return scan_on_cpu(first, last, result, exclusive, init, op, queue);
35 }
36 else {
37 return scan_on_gpu(first, last, result, exclusive, init, op, queue);
38 }
39}
40
41} // end detail namespace
42} // end compute namespace
43} // end boost namespace
44
45#endif // BOOST_COMPUTE_ALGORITHM_DETAIL_SCAN_HPP