Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions sycl/test/basic_tests/accessor/accessor_property_list_ct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

using namespace sycl::ONEAPI;

void foo(sycl::accessor<int, 1, sycl::access::mode::read_write,
sycl::access::target::global_buffer,
sycl::access::placeholder::true_t,
accessor_property_list<property::no_alias::instance<>,
property::no_offset::instance<>>>
acc) {}

int main() {
{
// Create empty property list
Expand Down Expand Up @@ -36,6 +43,26 @@ int main() {
"Properties are not equal");
}

{
// Property list copy
accessor_property_list PL{no_alias, sycl::noinit};

accessor_property_list PL_1{PL};
static_assert(PL_1.has_property<property::no_alias>(),
"Property not found");
}

{
// Conversion
accessor_property_list PL{no_offset, no_alias};
int *data = nullptr;
sycl::buffer<int, 1> buf_data(data, sycl::range<1>(1),
{sycl::property::buffer::use_host_ptr()});

sycl::accessor acc_1(buf_data, PL);
foo(acc_1);
}

{
int data[1] = {0};

Expand Down
2 changes: 1 addition & 1 deletion sycl/test/fpga_tests/buffer_location.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUNx: %ACC_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out

#include <CL/sycl.hpp>

Expand Down