cupva_host_cuda.hpp#
Fully qualified name: src/host/cpp_api/include/cupva_host_cuda.hpp
File members: src/host/cpp_api/include/cupva_host_cuda.hpp
/*
* Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
*
* NVIDIA CORPORATION and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
* and any modifications thereto. Any use, reproduction, disclosure or
* distribution of this software and related documentation without an express
* license agreement from NVIDIA CORPORATION is strictly prohibited.
*/
#ifndef CUPVA_HOST_CUDA_HPP
#define CUPVA_HOST_CUDA_HPP
#include "cupva_host.hpp"
#include <cuda.h>
#include <cuda_runtime.h>
#include <cstdint>
namespace cupva { namespace cuda {
namespace mem {
DLL_EXPORT void *Import(void *const cudaDevPtr, int64_t const size,
cupva::mem::AccessType const access = cupva::mem::AccessType::READ_WRITE);
} // namespace mem
DLL_EXPORT bool ContextSupportsCuda(cupva::impl::Context const *const ctx = cupva::Context::GetCurrent()) noexcept;
DLL_EXPORT void ForceDisableSupport();
DLL_EXPORT Stream CreateStream(cudaStream_t const cudaStream, EngineType const absEngine = PVA0,
AffinityType const vpuAffinity = VPU_ANY);
DLL_EXPORT void Submit(cudaStream_t const cudaStream, Cmd const *const commands, CmdStatus *const status = nullptr,
int32_t const count = 1, OrderType const order = IN_ORDER, int32_t const executionTimeout = -1,
int32_t const submitTimeout = -1);
DLL_EXPORT void Submit(cudaStream_t const cudaStream, CmdBuffer const &cmdBuf, int32_t const executionTimeout = -1,
int32_t const submitTimeout = -1);
DLL_EXPORT void Submit(cudaStream_t const cudaStream, const BaseCmd &command, CmdStatus *const status = nullptr,
OrderType const order = IN_ORDER, int32_t const executionTimeout = -1,
int32_t const submitTimeout = -1);
DLL_EXPORT void Submit(cudaStream_t const cudaStream, const std::initializer_list<Cmd> &cmdList,
CmdStatus *const status = nullptr, OrderType const order = IN_ORDER,
int32_t const executionTimeout = -1, int32_t const submitTimeout = -1);
DLL_EXPORT void SetAffinity(cudaStream_t const cudaStream, AffinityType const vpuAffinity);
}} // namespace cupva::cuda
#endif