@@ -43,7 +43,7 @@ class subscript_obj {
43
43
subscript_obj (const accessor_t &acc, cl::sycl::id<accessorDim> &indexes)
44
44
: accRef(acc), ids(indexes) {}
45
45
46
- INLINE_IF_DEVICE subscript_obj<accessorDim, dataT, dimensions - 1 , accessMode, accessTarget,
46
+ subscript_obj<accessorDim, dataT, dimensions - 1 , accessMode, accessTarget,
47
47
isPlaceholder>
48
48
operator [](size_t index) {
49
49
ids[accessorDim - dimensions] = index;
@@ -66,7 +66,7 @@ class subscript_obj<accessorDim, dataT, 1, accessMode, accessTarget,
66
66
subscript_obj (const accessor_t &acc, cl::sycl::id<accessorDim> &indexes)
67
67
: accRef(acc), ids(indexes) {}
68
68
69
- INLINE_IF_DEVICE dataT &operator [](size_t index) {
69
+ dataT &operator [](size_t index) {
70
70
ids[accessorDim - 1 ] = index;
71
71
return accRef.__impl ()->Data [getOffsetForId (
72
72
accRef.__impl ()->Range , ids, accRef.__impl ()->Offset )];
@@ -87,7 +87,7 @@ class subscript_obj<accessorDim, dataT, 1, access::mode::read, accessTarget,
87
87
subscript_obj (const accessor_t &acc, cl::sycl::id<accessorDim> &indexes)
88
88
: accRef(acc), ids(indexes) {}
89
89
90
- INLINE_IF_DEVICE typename detail::remove_AS<dataT>::type
90
+ typename detail::remove_AS<dataT>::type
91
91
operator [](size_t index) {
92
92
ids[accessorDim - 1 ] = index;
93
93
return accRef.__impl ()->Data [getOffsetForId (
@@ -118,7 +118,7 @@ SYCL_ACCESSOR_IMPL(isTargetHostAccess(accessTarget) && dimensions == 0) {
118
118
accessor_impl (dataT *Data) : Data (Data) {}
119
119
120
120
// Returns the number of accessed elements.
121
- INLINE_IF_DEVICE size_t get_count () const { return 1 ; }
121
+ size_t get_count () const { return 1 ; }
122
122
};
123
123
124
124
// / Implementation of host accessor.
@@ -133,7 +133,7 @@ SYCL_ACCESSOR_IMPL(isTargetHostAccess(accessTarget) && dimensions > 0) {
133
133
: Data (Data), Range (Range), Offset (Offset) {}
134
134
135
135
// Returns the number of accessed elements.
136
- INLINE_IF_DEVICE size_t get_count () const { return Range.size (); }
136
+ size_t get_count () const { return Range.size (); }
137
137
};
138
138
139
139
// / Implementation of device (kernel) accessor providing access to a single
@@ -163,7 +163,7 @@ SYCL_ACCESSOR_IMPL(!isTargetHostAccess(accessTarget) &&
163
163
{}
164
164
165
165
// Returns the number of accessed elements.
166
- INLINE_IF_DEVICE size_t get_count () const { return 1 ; }
166
+ size_t get_count () const { return 1 ; }
167
167
168
168
static_assert (
169
169
std::is_same<typename DeviceValueType<dataT, accessTarget>::type,
@@ -201,7 +201,7 @@ SYCL_ACCESSOR_IMPL(!isTargetHostAccess(accessTarget) &&
201
201
{}
202
202
203
203
// Returns the number of accessed elements.
204
- INLINE_IF_DEVICE size_t get_count () const { return Range.size (); }
204
+ size_t get_count () const { return Range.size (); }
205
205
206
206
static_assert (
207
207
std::is_same<typename DeviceValueType<dataT, accessTarget>::type,
@@ -240,7 +240,7 @@ SYCL_ACCESSOR_IMPL(accessTarget == access::target::local &&
240
240
}
241
241
242
242
// Returns the number of accessed elements.
243
- INLINE_IF_DEVICE size_t get_count () const { return 1 ; }
243
+ size_t get_count () const { return 1 ; }
244
244
245
245
static_assert (
246
246
std::is_same<typename DeviceValueType<dataT, accessTarget>::type,
@@ -285,7 +285,7 @@ SYCL_ACCESSOR_IMPL(accessTarget == access::target::local &&
285
285
}
286
286
287
287
// Returns the number of accessed elements.
288
- INLINE_IF_DEVICE size_t get_count () const { return Range.size (); }
288
+ size_t get_count () const { return Range.size (); }
289
289
290
290
static_assert (
291
291
std::is_same<typename DeviceValueType<dataT, accessTarget>::type,
@@ -307,11 +307,11 @@ class accessor_base {
307
307
using _ImplT =
308
308
accessor_impl<dataT, dimensions, accessMode, accessTarget, isPlaceholder>;
309
309
310
- INLINE_IF_DEVICE const _ImplT *__impl () const {
310
+ const _ImplT *__impl () const {
311
311
return reinterpret_cast <const _ImplT *>(this );
312
312
}
313
313
314
- INLINE_IF_DEVICE _ImplT *__impl () { return reinterpret_cast <_ImplT *>(this ); }
314
+ _ImplT *__impl () { return reinterpret_cast <_ImplT *>(this ); }
315
315
316
316
static_assert (
317
317
std::is_same<typename DeviceValueType<dataT, accessTarget>::type,
@@ -339,21 +339,21 @@ class accessor_base {
339
339
340
340
SYCL_ACCESSOR_SUBCLASS (accessor_common, accessor_base, true /* always */ ) {
341
341
// Returns true if the current accessor is a placeholder accessor.
342
- INLINE_IF_DEVICE constexpr bool is_placeholder () const {
342
+ constexpr bool is_placeholder () const {
343
343
return isPlaceholder == access::placeholder::true_t ;
344
344
}
345
345
346
346
// Returns the size of the accessed memory in bytes.
347
- INLINE_IF_DEVICE size_t get_size () const { return this ->get_count () * sizeof (dataT); }
347
+ size_t get_size () const { return this ->get_count () * sizeof (dataT); }
348
348
349
349
// Returns the number of accessed elements.
350
- INLINE_IF_DEVICE size_t get_count () const { return this ->__impl ()->get_count (); }
350
+ size_t get_count () const { return this ->__impl ()->get_count (); }
351
351
352
- template <int Dimensions = dimensions> INLINE_IF_DEVICE
352
+ template <int Dimensions = dimensions>
353
353
typename std::enable_if<(Dimensions > 0 ), range<Dimensions>>::type
354
354
get_range () const { return this ->__impl ()->Range ; }
355
355
356
- template <int Dimensions = dimensions> INLINE_IF_DEVICE
356
+ template <int Dimensions = dimensions>
357
357
typename std::enable_if<(Dimensions > 0 ), id<Dimensions>>::type
358
358
get_offset () const { return this ->__impl ()->Offset ; }
359
359
};
@@ -364,7 +364,7 @@ SYCL_ACCESSOR_SUBCLASS(accessor_opdata_w, accessor_common,
364
364
accessMode == access::mode::discard_write ||
365
365
accessMode == access::mode::discard_read_write) &&
366
366
dimensions == 0 ) {
367
- INLINE_IF_DEVICE operator dataT &() const {
367
+ operator dataT &() const {
368
368
return this ->__impl ()->Data [0 ];
369
369
}
370
370
};
@@ -382,7 +382,7 @@ SYCL_ACCESSOR_SUBCLASS(accessor_subscript_wn, accessor_opdata_w,
382
382
383
383
subscript_obj<dimensions, dataT, dimensions - 1 , accessMode, accessTarget,
384
384
isPlaceholder>
385
- INLINE_IF_DEVICE operator [](size_t index) const {
385
+ operator [](size_t index) const {
386
386
id<dimensions> ids;
387
387
ids[0 ] = index;
388
388
return subscript_obj<dimensions, dataT, dimensions - 1 , accessMode,
@@ -402,11 +402,11 @@ SYCL_ACCESSOR_SUBCLASS(accessor_subscript_w, accessor_subscript_wn,
402
402
// classes. That's why operator[] defined in accessor_subscript_wn
403
403
// is not visible here and we have to define
404
404
// operator[](id<dimensions>) once again.
405
- INLINE_IF_DEVICE dataT &operator [](id<dimensions> index) const {
405
+ dataT &operator [](id<dimensions> index) const {
406
406
return this ->operator [](
407
407
getOffsetForId (this ->get_range (), index, this ->get_offset ()));
408
408
}
409
- INLINE_IF_DEVICE dataT &operator [](size_t index) const {
409
+ dataT &operator [](size_t index) const {
410
410
return this ->__impl ()->Data [index];
411
411
}
412
412
};
@@ -560,7 +560,7 @@ class accessor
560
560
// implementation.
561
561
_ImplT __impl;
562
562
563
- INLINE_IF_DEVICE void __init (_ValueType *Ptr, range<dimensions> Range,
563
+ void __init (_ValueType *Ptr, range<dimensions> Range,
564
564
id<dimensions> Offset) {
565
565
__impl.Data = Ptr;
566
566
__impl.Range = Range;
0 commit comments