Distributed Ranges
Loading...
Searching...
No Matches
common_support.hpp
1// SPDX-FileCopyrightText: Intel Corporation
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#pragma once
6
7// file for helper functions implemented for both SYCL and non-SYCL compilations
8
9namespace dr::mp::__detail {
10
11template <typename T> void copy(const T *src, T *dst, std::size_t sz) {
12 if (mp::use_sycl()) {
13 sycl_copy<T>(src, dst, sz);
14 } else {
15 memcpy(dst, src, sz * sizeof(T));
16 }
17}
18
19} // namespace dr::mp::__detail