@@ -253,7 +253,7 @@ class buffer : public detail::buffer_plain,
253
253
const property_list &propList = {},
254
254
const detail::code_location CodeLoc = detail::code_location::current())
255
255
: buffer_plain(
256
- bufferRange.size() * sizeof(T),
256
+ hostData, bufferRange.size() * sizeof(T),
257
257
detail::getNextPowerOfTwo(sizeof (T)), propList,
258
258
make_unique_ptr<detail::SYCLMemObjAllocatorHolder<AllocatorT, T>>(
259
259
allocator)),
@@ -506,10 +506,14 @@ class buffer : public detail::buffer_plain,
506
506
template <access::mode mode>
507
507
__SYCL2020_DEPRECATED (" get_access for host_accessor is deprecated, please "
508
508
" use get_host_access instead" )
509
- accessor<T, dimensions, mode, access::target::host_buffer,
510
- access::placeholder::false_t , ext::oneapi::accessor_property_list<>>
511
- get_access (
512
- const detail::code_location CodeLoc = detail::code_location::current()) {
509
+ accessor<
510
+ T, dimensions, mode, access::target::host_buffer,
511
+ access::placeholder::false_t ,
512
+ ext::oneapi::
513
+ accessor_property_list<>> get_access (const detail::code_location
514
+ CodeLoc =
515
+ detail::code_location::
516
+ current ()) {
513
517
return accessor<T, dimensions, mode, access::target::host_buffer,
514
518
access::placeholder::false_t ,
515
519
ext::oneapi::accessor_property_list<>>(*this , {}, CodeLoc);
@@ -535,11 +539,16 @@ class buffer : public detail::buffer_plain,
535
539
template <access::mode mode>
536
540
__SYCL2020_DEPRECATED (" get_access for host_accessor is deprecated, please "
537
541
" use get_host_access instead" )
538
- accessor<T, dimensions, mode, access::target::host_buffer,
539
- access::placeholder::false_t , ext::oneapi::accessor_property_list<>>
540
- get_access (
541
- range<dimensions> accessRange, id<dimensions> accessOffset = {},
542
- const detail::code_location CodeLoc = detail::code_location::current()) {
542
+ accessor<
543
+ T, dimensions, mode, access::target::host_buffer,
544
+ access::placeholder::false_t,
545
+ ext::oneapi::
546
+ accessor_property_list<>> get_access(range<dimensions> accessRange,
547
+ id<dimensions> accessOffset = {},
548
+ const detail::code_location
549
+ CodeLoc =
550
+ detail::code_location::
551
+ current ()) {
543
552
if (isOutOfBounds (accessOffset, accessRange, this ->Range ))
544
553
throw sycl::invalid_object_error (
545
554
" Requested accessor would exceed the bounds of the buffer" ,
0 commit comments