DPC++ Runtime
Runtime libraries for oneAPI DPC++
usm_properties.hpp
Go to the documentation of this file.
1 //===- usm_properties.hpp -------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #pragma once
10 
11 #include <sycl/detail/property_helper.hpp> // for PropWithDataKind, Dat...
12 #include <sycl/properties/property_traits.hpp> // for is_property
13 
14 #include <stdint.h> // for uint64_t
15 #include <type_traits> // for true_type
16 
17 namespace sycl {
18 inline namespace _V1 {
19 namespace ext {
20 
21 namespace oneapi::property::usm {
23  : public sycl::detail::DataLessProperty<sycl::detail::DeviceReadOnly> {
24 public:
25  device_read_only() = default;
26 };
27 } // namespace oneapi::property::usm
28 
29 namespace intel::experimental::property::usm {
30 
33  sycl::detail::PropWithDataKind::AccPropBufferLocation> {
34 public:
35  buffer_location(uint64_t Location) : MLocation(Location) {}
36  uint64_t get_buffer_location() const { return MLocation; }
37 
38 private:
39  uint64_t MLocation;
40 };
41 
42 } // namespace intel::experimental::property::usm
43 } // namespace ext
44 
45 template <>
46 struct is_property<ext::oneapi::property::usm::device_read_only>
47  : std::true_type {};
48 
49 template <>
51  : std::true_type {};
52 
53 } // namespace _V1
54 } // namespace sycl
constexpr buffer_location_key::value_t< N > buffer_location
Definition: access.hpp:18