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#include <stddef.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13typedef struct MR_Vector2i MR_Vector2i; // Defined in `#include <MRCMesh/MRVector2.h>`.
14typedef struct MR_Vector3i MR_Vector3i; // Defined in `#include <MRCMesh/MRVector3.h>`.
15typedef struct MR_expected_MR_Cuda_DeviceInfo_std_string MR_expected_MR_Cuda_DeviceInfo_std_string; // Defined in `#include <MRCCuda/expected_MR_Cuda_DeviceInfo_std_string.h>`.
16typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
17
18
22
29
35
42
49
55
62
69
75
82
89
95
102
109
116
123
130
138MRC_CUDA_API void MR_Cuda_DeviceInfo_Set_name(MR_Cuda_DeviceInfo *_this, const char *value, const char *value_end);
139
146
150
155
163MRC_CUDA_API MR_Cuda_DeviceInfo *MR_Cuda_DeviceInfo_ConstructFrom(int driverVersion, int runtimeVersion, int computeMajor, int computeMinor, size_t totalGlobalMem, const char *name, const char *name_end);
164
168
172
177
180
183
190
195
200
211MRC_DEPRECATED_REASON("Use getRuntimeInfo")
212MRC_CUDA_API bool MR_Cuda_isCudaAvailable(int *driverVersion, int *runtimeVersion, int *computeMajor, int *computeMinor);
213
217
221
224MRC_CUDA_API size_t MR_Cuda_maxBufferSize(size_t availableBytes, size_t elementCount, size_t elementBytes);
225
230MRC_CUDA_API size_t MR_Cuda_maxBufferSizeAlignedByBlock_MR_Vector2i(size_t availableBytes, const MR_Vector2i *blockDims, size_t elementBytes);
231
234MRC_CUDA_API size_t MR_Cuda_maxBufferSizeAlignedByBlock_MR_Vector3i(size_t availableBytes, const MR_Vector3i *blockDims, size_t elementBytes);
235
236#ifdef __cplusplus
237} // extern "C"
238#endif
struct MR_std_string MR_std_string
Definition MRCtm.h:32
MRC_CUDA_API int * MR_Cuda_DeviceInfo_GetMutable_driverVersion(MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API void MR_Cuda_DeviceInfo_Set_computeMinor(MR_Cuda_DeviceInfo *_this, int value)
MRC_CUDA_API size_t MR_Cuda_maxBufferSizeAlignedByBlock_MR_Vector2i(size_t availableBytes, const MR_Vector2i *blockDims, size_t elementBytes)
MRC_CUDA_API const int * MR_Cuda_DeviceInfo_Get_runtimeVersion(const MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API void MR_Cuda_DeviceInfo_Set_runtimeVersion(MR_Cuda_DeviceInfo *_this, int value)
MRC_CUDA_API MR_Cuda_DeviceInfo * MR_Cuda_DeviceInfo_DefaultConstructArray(size_t num_elems)
MRC_CUDA_API size_t MR_Cuda_getCudaAvailableMemory(void)
MRC_CUDA_API void MR_Cuda_DeviceInfo_Set_name(MR_Cuda_DeviceInfo *_this, const char *value, const char *value_end)
MRC_CUDA_API MR_Cuda_DeviceInfo * MR_Cuda_DeviceInfo_ConstructFromAnother(MR_PassBy _other_pass_by, MR_Cuda_DeviceInfo *_other)
MRC_CUDA_API void MR_Cuda_DeviceInfo_Set_driverVersion(MR_Cuda_DeviceInfo *_this, int value)
MRC_CUDA_API const int * MR_Cuda_DeviceInfo_Get_computeMinor(const MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API MR_Cuda_DeviceInfo * MR_Cuda_DeviceInfo_OffsetMutablePtr(MR_Cuda_DeviceInfo *ptr, ptrdiff_t i)
MRC_CUDA_API int * MR_Cuda_DeviceInfo_GetMutable_runtimeVersion(MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API void MR_Cuda_DeviceInfo_DestroyArray(const MR_Cuda_DeviceInfo *_this)
Destroys a heap-allocated array of MR_Cuda_DeviceInfo. Does nothing if the pointer is null.
MRC_CUDA_API MR_Cuda_DeviceInfo * MR_Cuda_DeviceInfo_ConstructFrom(int driverVersion, int runtimeVersion, int computeMajor, int computeMinor, size_t totalGlobalMem, const char *name, const char *name_end)
MRC_CUDA_API const int * MR_Cuda_DeviceInfo_Get_driverVersion(const MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API const int * MR_Cuda_DeviceInfo_Get_computeMajor(const MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API size_t MR_Cuda_maxBufferSize(size_t availableBytes, size_t elementCount, size_t elementBytes)
MRC_CUDA_API void MR_Cuda_DeviceInfo_Destroy(const MR_Cuda_DeviceInfo *_this)
Destroys a heap-allocated instance of MR_Cuda_DeviceInfo. Does nothing if the pointer is null.
MRC_CUDA_API bool MR_Cuda_DeviceInfo_fitForComputations(const MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API MR_std_string * MR_Cuda_DeviceInfo_GetMutable_name(MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API size_t * MR_Cuda_DeviceInfo_GetMutable_totalGlobalMem(MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API MR_expected_MR_Cuda_DeviceInfo_std_string * MR_Cuda_getDeviceInfo(void)
MRC_CUDA_API void MR_Cuda_DeviceInfo_Set_totalGlobalMem(MR_Cuda_DeviceInfo *_this, size_t value)
MRC_CUDA_API int * MR_Cuda_DeviceInfo_GetMutable_computeMajor(MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API size_t MR_Cuda_maxBufferSizeAlignedByBlock_MR_Vector3i(size_t availableBytes, const MR_Vector3i *blockDims, size_t elementBytes)
MRC_CUDA_API const size_t * MR_Cuda_DeviceInfo_Get_totalGlobalMem(const MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API size_t MR_Cuda_getCudaSafeMemoryLimit(void)
MRC_CUDA_API int * MR_Cuda_DeviceInfo_GetMutable_computeMinor(MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API bool MR_Cuda_isCudaAvailable(int *driverVersion, int *runtimeVersion, int *computeMajor, int *computeMinor)
MRC_CUDA_API const MR_std_string * MR_Cuda_DeviceInfo_Get_name(const MR_Cuda_DeviceInfo *_this)
MRC_CUDA_API MR_Cuda_DeviceInfo * MR_Cuda_DeviceInfo_DefaultConstruct(void)
MRC_CUDA_API const MR_Cuda_DeviceInfo * MR_Cuda_DeviceInfo_OffsetPtr(const MR_Cuda_DeviceInfo *ptr, ptrdiff_t i)
MRC_CUDA_API MR_Cuda_DeviceInfo * MR_Cuda_DeviceInfo_AssignFromAnother(MR_Cuda_DeviceInfo *_this, MR_PassBy _other_pass_by, MR_Cuda_DeviceInfo *_other)
MRC_CUDA_API void MR_Cuda_DeviceInfo_Set_computeMajor(MR_Cuda_DeviceInfo *_this, int value)
#define MRC_DEPRECATED_REASON(str)
Definition common.h:74
MR_PassBy
Definition common.h:13
struct MR_Cuda_DeviceInfo MR_Cuda_DeviceInfo
Definition expected_MR_Cuda_DeviceInfo_std_string.h:13
struct MR_expected_MR_Cuda_DeviceInfo_std_string MR_expected_MR_Cuda_DeviceInfo_std_string
Definition expected_MR_Cuda_DeviceInfo_std_string.h:19
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