12 #if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) || defined(ALPAKA_ACC_GPU_HIP_ENABLED)
14 # if defined(ALPAKA_ACC_GPU_CUDA_ENABLED)
18 # if defined(ALPAKA_ACC_GPU_HIP_ENABLED)
49 typename std::enable_if_t<
50 # if defined(ALPAKA_ACC_GPU_CUDA_ENABLED)
51 (std::is_same_v<TTag, TagGpuCudaRt> && std::is_same_v<TApi, ApiCudaRt>)
53 (std::is_same_v<TTag, TagGpuHipRt> && std::is_same_v<TApi, ApiHipRt>)
63 using Type = std::remove_const_t<std::remove_all_extents_t<TTypeSrc>>;
64 using TypeExt = std::remove_const_t<TTypeSrc>;
66 TypeExt* pMemAcc(
nullptr);
68 TApi::getSymbolAddress(
reinterpret_cast<void**
>(&pMemAcc), *(
const_cast<TypeExt*
>(&viewSrc))));
85 typename std::enable_if_t<
86 # if defined(ALPAKA_ACC_GPU_CUDA_ENABLED)
87 (std::is_same_v<TTag, TagGpuCudaRt> && std::is_same_v<TApi, ApiCudaRt>)
89 (std::is_same_v<TTag, TagGpuHipRt> && std::is_same_v<TApi, ApiHipRt>)
97 TViewSrc
const& viewSrc)
99 using Type = std::remove_const_t<std::remove_all_extents_t<TTypeDst>>;
100 using TypeExt = std::remove_const_t<TTypeDst>;
102 Type* pMemAcc(
nullptr);
104 TApi::getSymbolAddress(
reinterpret_cast<void**
>(&pMemAcc), *(
const_cast<TypeExt*
>(&viewDst))));
122 typename std::enable_if_t<
123 # if defined(ALPAKA_ACC_GPU_CUDA_ENABLED)
124 (std::is_same_v<TTag, TagGpuCudaRt> && std::is_same_v<TApi, ApiCudaRt>)
126 (std::is_same_v<TTag, TagGpuHipRt> && std::is_same_v<TApi, ApiHipRt>)
137 using Type = std::remove_const_t<std::remove_all_extents_t<TTypeSrc>>;
138 using TypeExt = std::remove_const_t<TTypeSrc>;
139 Type* pMemAcc(
nullptr);
141 TApi::getSymbolAddress(
reinterpret_cast<void**
>(&pMemAcc), *(
const_cast<TypeExt*
>(&viewSrc))));
144 reinterpret_cast<Type*
>(pMemAcc),
158 typename std::enable_if_t<
159 # if defined(ALPAKA_ACC_GPU_CUDA_ENABLED)
160 (std::is_same_v<TTag, TagGpuCudaRt> && std::is_same_v<TApi, ApiCudaRt>)
162 (std::is_same_v<TTag, TagGpuHipRt> && std::is_same_v<TApi, ApiHipRt>)
170 TViewSrc
const& viewSrc,
173 using Type = std::remove_const_t<std::remove_all_extents_t<TTypeDst>>;
174 using TypeExt = std::remove_const_t<TTypeDst>;
175 Type* pMemAcc(
nullptr);
177 TApi::getSymbolAddress(
reinterpret_cast<void**
>(&pMemAcc), *(
const_cast<TypeExt*
>(&viewDst))));
180 reinterpret_cast<Type*
>(pMemAcc),
The alpaka accelerator library.
typename trait::IdxType< T >::type Idx
ALPAKA_FN_HOST auto memcpy(TQueue &queue, alpaka::detail::DevGlobalImplGeneric< TTag, TTypeDst > &viewDst, TViewSrc const &viewSrc) -> void
ALPAKA_FN_HOST auto createTaskMemcpy(TViewDstFwd &&viewDst, TViewSrc const &viewSrc, TExtent const &extent)
Creates a memory copy task.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto getExtents(T const &object) -> Vec< Dim< T >, Idx< T >>
ALPAKA_FN_HOST auto getDev(T const &t)
ALPAKA_FN_HOST auto enqueue(TQueue &queue, TTask &&task) -> void
Queues the given task in the given queue.
typename trait::DimType< T >::type Dim
The dimension type trait alias template to remove the ::type.
The memory view to wrap plain pointers.