17 #ifndef BOLT_AMP_ADDRESSOF_H
18 #define BOLT_AMP_ADDRESSOF_H
28 template <
typename Iterator >
35 template <
typename Iterator>
42 template <
typename Iterator>
49 template <
typename Iterator>
51 create_mapped_iterator(std::random_access_iterator_tag, Iterator first1,
int sz,
bool var, ::
bolt::amp::control &ctl)
53 typedef typename std::iterator_traits<Iterator>::value_type iType;
54 typedef typename std::iterator_traits<Iterator>::pointer pointer1;
56 pointer1 first_pointer1 = std::addressof(*first1);
58 device_vector< iType, concurrency::array_view > dvInput1( first_pointer1, sz, var, ctl );
59 return dvInput1.begin();
66 create_mapped_iterator(std::random_access_iterator_tag, T* first1,
int sz,
bool var, ::
bolt::amp::control &ctl)
68 device_vector< T, concurrency::array_view > dvInput1( first1, sz, var, ctl );
69 return dvInput1.begin();
72 template <
typename Iterator>
73 const constant_iterator<typename Iterator::value_type>
79 template <
typename Iterator>
80 const counting_iterator<typename Iterator::value_type>
88 template <
typename Iterator>
95 template <
typename Iterator>
103 template <
typename T>
105 create_mapped_iterator(std::random_access_iterator_tag,
bolt::amp::control &ctl, T* first1)
111 template <
typename Iterator>
112 typename std::vector<typename Iterator::value_type>::iterator
113 create_mapped_iterator(std::random_access_iterator_tag,
bolt::amp::control &ctl, Iterator &itr)
119 template <
typename Iterator>
120 typename std::iterator_traits<Iterator>::value_type *
123 typedef typename std::iterator_traits<Iterator>::value_type iType1;
124 bolt::amp::device_vector< iType1 >::pointer first1Ptr = itr.getContainer( ).data( );
126 return first1Ptr + itr.m_Index;
129 template <
typename Iterator>
130 const constant_iterator<typename Iterator::value_type> &
136 template <
typename Iterator>
137 const counting_iterator<typename Iterator::value_type> &