DPC++ Runtime
Runtime libraries for oneAPI DPC++
memcpy.hpp
Go to the documentation of this file.
1 //==---------------- memcpy.hpp - SYCL memcpy --------------------------==//
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 <cstring>
12 
13 namespace sycl {
14 inline namespace _V1 {
15 namespace detail {
16 inline void memcpy(void *Dst, const void *Src, size_t Size) {
17 #ifdef __SYCL_DEVICE_ONLY__
18  __builtin_memcpy(Dst, Src, Size);
19 #else
20  std::memcpy(Dst, Src, Size);
21 #endif
22 }
23 } // namespace detail
24 } // namespace _V1
25 } // namespace sycl
void memcpy(void *Dst, const void *Src, size_t Size)
Definition: memcpy.hpp:16
Definition: access.hpp:18