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 <cstddef>
12 
13 namespace sycl {
14 inline namespace _V1 {
15 namespace detail {
16 inline void memcpy(void *Dst, const void *Src, size_t Size) {
17  char *Destination = reinterpret_cast<char *>(Dst);
18  const char *Source = reinterpret_cast<const char *>(Src);
19  for (size_t I = 0; I < Size; ++I) {
20  Destination[I] = Source[I];
21  }
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