DPC++ Runtime
Runtime libraries for oneAPI DPC++
mem_alloc_helper.hpp
Go to the documentation of this file.
1 //==-------- mem_alloc_helper.hpp - SYCL mem alloc helper ------------------==//
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 <CL/sycl/detail/pi.h>
12 
14 namespace sycl {
15 namespace detail {
16 void memBufferCreateHelper(const plugin &Plugin, pi_context Ctx,
17  pi_mem_flags Flags, size_t Size, void *HostPtr,
18  pi_mem *RetMem,
19  const pi_mem_properties *Props = nullptr);
20 void memReleaseHelper(const plugin &Plugin, pi_mem Mem);
21 void memBufferMapHelper(const plugin &Plugin, pi_queue command_queue,
22  pi_mem buffer, pi_bool blocking_map,
23  pi_map_flags map_flags, size_t offset, size_t size,
24  pi_uint32 num_events_in_wait_list,
25  const pi_event *event_wait_list, pi_event *event,
26  void **ret_map);
27 void memUnmapHelper(const plugin &Plugin, pi_queue command_queue, pi_mem memobj,
28  void *mapped_ptr, pi_uint32 num_events_in_wait_list,
29  const pi_event *event_wait_list, pi_event *event);
30 } // namespace detail
31 } // namespace sycl
32 } // __SYCL_INLINE_NAMESPACE(cl)
_pi_mem
PI Mem mapping to CUDA memory allocations, both data and texture/surface.
Definition: pi_cuda.hpp:207
pi.h
pi_bool
pi_uint32 pi_bool
Definition: pi.h:74
cl::sycl::detail::memUnmapHelper
void memUnmapHelper(const plugin &Plugin, pi_queue command_queue, pi_mem memobj, void *mapped_ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
Definition: memory_manager.cpp:206
sycl
Definition: invoke_simd.hpp:68
cl::sycl::detail::memBufferMapHelper
void memBufferMapHelper(const plugin &Plugin, pi_queue command_queue, pi_mem buffer, pi_bool blocking_map, pi_map_flags map_flags, size_t offset, size_t size, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event, void **ret_map)
Definition: memory_manager.cpp:182
_pi_queue
PI queue mapping on to CUstream objects.
Definition: pi_cuda.hpp:378
pi_uint32
uint32_t pi_uint32
Definition: pi.h:72
pi_mem_flags
pi_bitfield pi_mem_flags
Definition: pi.h:582
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
pi_mem_properties
pi_bitfield pi_mem_properties
Definition: pi.h:600
cl::sycl::detail::memReleaseHelper
void memReleaseHelper(const plugin &Plugin, pi_mem Mem)
Definition: memory_manager.cpp:155
_pi_event
PI Event mapping to CUevent.
Definition: pi_cuda.hpp:458
pi_map_flags
pi_bitfield pi_map_flags
Definition: pi.h:592
cl::sycl::detail::memBufferCreateHelper
void memBufferCreateHelper(const plugin &Plugin, pi_context Ctx, pi_mem_flags Flags, size_t Size, void *HostPtr, pi_mem *RetMem, const pi_mem_properties *Props=nullptr)
Definition: memory_manager.cpp:127
_pi_context
PI context mapping to a CUDA context object.
Definition: pi_cuda.hpp:150
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12