@@ -52,13 +52,7 @@ class __SYCL_EXPORT SYCLMemObjT : public SYCLMemObjI {
52
52
53
53
template <typename T>
54
54
using EnableIfOutputIteratorT = enable_if_t <
55
- /* is_output_iterator<T>::value &&*/ !std::is_pointer<T>::value &&
56
- !std::is_same<typename T::value_type, bool >::value>;
57
-
58
- template <typename T>
59
- using EnableIfOutputIteratorBool =
60
- enable_if_t <!std::is_pointer<T>::value &&
61
- std::is_same<typename T::value_type, bool >::value>;
55
+ /* is_output_iterator<T>::value &&*/ !std::is_pointer<T>::value>;
62
56
63
57
template <typename T>
64
58
using EnableIfDefaultAllocator =
@@ -184,23 +178,8 @@ class __SYCL_EXPORT SYCLMemObjT : public SYCLMemObjI {
184
178
// ContiguousStorage. updateHostMemory works only with pointer to
185
179
// continuous data.
186
180
const size_t Size = MSizeInBytes / sizeof (DestinationValueT);
187
- vector_class<DestinationValueT> ContiguousStorage (Size);
188
- updateHostMemory (ContiguousStorage.data ());
189
- std::copy (ContiguousStorage.cbegin (), ContiguousStorage.cend (),
190
- FinalData);
191
- };
192
- }
193
-
194
- template <typename Destination>
195
- __SYCL_DLL_LOCAL EnableIfOutputIteratorBool<Destination>
196
- set_final_data (Destination FinalData) {
197
- MUploadDataFunctor = [this , FinalData]() {
198
- using DestinationValueT = iterator_value_type_t <Destination>;
199
- // TODO if Destination is ContiguousIterator then don't create
200
- // ContiguousStorage. updateHostMemory works only with pointer to
201
- // continuous data.
202
- const size_t Size = MSizeInBytes / sizeof (DestinationValueT);
203
- std::unique_ptr<bool []> ContiguousStorage (new bool [Size]);
181
+ std::unique_ptr<DestinationValueT[]> ContiguousStorage (
182
+ new DestinationValueT[Size]);
204
183
updateHostMemory (ContiguousStorage.get ());
205
184
std::copy (ContiguousStorage.get (), ContiguousStorage.get () + Size,
206
185
FinalData);
0 commit comments