MeshLib C Docs
Loading...
Searching...
No Matches
MRCudaBasic.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCCuda/exports.h>
4#include <MRCMisc/common.h>
5
6#include <stdbool.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct MR_Vector2i MR_Vector2i; // Defined in `#include <MRCMesh/MRVector2.h>`.
13typedef struct MR_Vector3i MR_Vector3i; // Defined in `#include <MRCMesh/MRVector3.h>`.
14
15
16// Returns true if Cuda is present on this GPU
17// optional out maximum driver supported version
18// optional out current runtime version
19// optional out compute capability major version
20// optional out compute capability minor version
26MRC_CUDA_API bool MR_Cuda_isCudaAvailable(int *driverVersion, int *runtimeVersion, int *computeMajor, int *computeMinor);
27
28// Returns available GPU memory in bytes
31
32// Returns maximum safe amount of free GPU memory that will be used for dynamic-sized buffers
35
36// Returns maximum buffer size in elements that can be allocated with given memory limit
39
40// Returns maximum buffer size in elements that can be allocated with given memory limit
41// The size is aligned to the block dimensions
45
49
50#ifdef __cplusplus
51} // extern "C"
52#endif
MRC_CUDA_API MR_uint64_t MR_Cuda_getCudaAvailableMemory(void)
Generated from function MR::Cuda::getCudaAvailableMemory.
MRC_CUDA_API MR_uint64_t MR_Cuda_maxBufferSizeAlignedByBlock_MR_Vector3i(MR_uint64_t availableBytes, const MR_Vector3i *blockDims, MR_uint64_t elementBytes)
MRC_CUDA_API bool MR_Cuda_isCudaAvailable(int *driverVersion, int *runtimeVersion, int *computeMajor, int *computeMinor)
MRC_CUDA_API MR_uint64_t MR_Cuda_getCudaSafeMemoryLimit(void)
Generated from function MR::Cuda::getCudaSafeMemoryLimit.
MRC_CUDA_API MR_uint64_t MR_Cuda_maxBufferSizeAlignedByBlock_MR_Vector2i(MR_uint64_t availableBytes, const MR_Vector2i *blockDims, MR_uint64_t elementBytes)
MRC_CUDA_API MR_uint64_t MR_Cuda_maxBufferSize(MR_uint64_t availableBytes, MR_uint64_t elementCount, MR_uint64_t elementBytes)
Generated from function MR::Cuda::maxBufferSize.
uint64_t MR_uint64_t
Definition common.h:18
Generated from class MR::Vector2i.
Definition MRVector2.h:50
Generated from class MR::Vector3i.
Definition MRVector3.h:63
#define MRC_CUDA_API
Definition uda/include/MRCCuda/exports.h:11