alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
BufCpu.hpp
Go to the documentation of this file.
1/* Copyright 2025 Anton Reinhard
2 * SPDX-License-Identifier: MPL-2.0
3 */
4
5#pragma once
6
12#include "alpaka/vec/Vec.hpp"
13
14#include <functional>
15#include <memory>
16#include <type_traits>
17#include <utility>
18
19namespace alpaka
20{
21 //! The CPU memory buffer template implementing muting accessors.
22 template<typename TElem, typename TDim, typename TIdx>
23 class BufCpu : public internal::ViewAccessOps<BufCpu<TElem, TDim, TIdx>>
24 {
26
27 public:
28 template<typename TExtent, typename Deleter>
29 ALPAKA_FN_HOST BufCpu(DevCpu const& dev, TElem* const pMem, Deleter deleter, TExtent const& extent)
30 : m_spBufImpl{std::make_shared<TBufImpl>(dev, pMem, std::move(deleter), extent)}
31 {
32 }
33
34 public:
35 std::shared_ptr<TBufImpl> m_spBufImpl;
36 };
37} // namespace alpaka
38
The CPU memory buffer template implementing muting accessors.
Definition BufCpu.hpp:24
ALPAKA_FN_HOST BufCpu(DevCpu const &dev, TElem *const pMem, Deleter deleter, TExtent const &extent)
Definition BufCpu.hpp:29
std::shared_ptr< TBufImpl > m_spBufImpl
Definition BufCpu.hpp:35
The CPU device handle.
Definition DevCpu.hpp:56
The CPU memory buffer.
#define ALPAKA_FN_HOST
Definition Common.hpp:40
The alpaka accelerator library.
STL namespace.