MeshLib Documentation
Loading...
Searching...
No Matches
MR::CudaAccessor Class Reference

The purpose of this class is to access CUDA algorithms without explicit dependency on MRCuda. More...

#include <MRCudaAccessor.h>

Public Types

using CudaFreeMemoryFunc = std::function<size_t()>
 Returns amount of free memory on GPU.
 
using CudaFwnConstructor = std::function<std::unique_ptr<IFastWindingNumber>( const Mesh& )>
 Returns specific implementation of IFastWindingNumber interface that computes windings on GPU.
 
using CudaMeshProjectorConstructor = std::function<std::unique_ptr<IPointsToMeshProjector>()>
 Returns specific implementation of IPointsToMeshProjector interface projects on GPU.
 
using CudaPointsToDistanceVolumeCallback = std::function<Expected<SimpleVolumeMinMax>( const PointCloud& cloud, const PointsToDistanceVolumeParams& params )>
 

Static Public Member Functions

static MRVIEWER_API void setCudaAvailable (bool val, int maxDriverVersion, int runtimeVersion, int computeMajor, int computeMinor)
 
static MRVIEWER_API void setCudaFreeMemoryFunc (CudaFreeMemoryFunc freeMemFunc)
 
static MRVIEWER_API void setCudaFastWindingNumberConstructor (CudaFwnConstructor fwnCtor)
 
static MRVIEWER_API void setCudaMeshProjectorConstructor (CudaMeshProjectorConstructor mpCtor)
 
static MRVIEWER_API void setCudaPointsToDistanceVolumeCallback (CudaPointsToDistanceVolumeCallback callback)
 
static MRVIEWER_API bool isCudaAvailable ()
 
static MRVIEWER_API int getCudaMaxDriverSupportedVersion ()
 
static MRVIEWER_API int getCudaRuntimeVersion ()
 
static MRVIEWER_API int getComputeCapabilityMajor ()
 
static MRVIEWER_API int getComputeCapabilityMinor ()
 
static MRVIEWER_API size_t getCudaFreeMemory ()
 
static MRVIEWER_API std::unique_ptr< IFastWindingNumbergetCudaFastWindingNumber (const Mesh &mesh)
 
static MRVIEWER_API std::unique_ptr< IPointsToMeshProjectorgetCudaPointsToMeshProjector ()
 
static MRVIEWER_API CudaPointsToDistanceVolumeCallback getCudaPointsToDistanceVolumeCallback ()
 
static MRVIEWER_API size_t fastWindingNumberMeshMemory (const Mesh &mesh)
 
static MRVIEWER_API size_t fromGridMemory (const Mesh &mesh, const Vector3i &dims)
 
static MRVIEWER_API size_t fromVectorMemory (const Mesh &mesh, size_t inputSize)
 returns amount of required GPU memory for CudaFastWindingNumber::calcFromVector operation
 
static MRVIEWER_API size_t selfIntersectionsMemory (const Mesh &mesh)
 returns amount of required GPU memory for CudaFastWindingNumber::calcSelfIntersections operation
 

Detailed Description

The purpose of this class is to access CUDA algorithms without explicit dependency on MRCuda.

Member Typedef Documentation

◆ CudaFreeMemoryFunc

using MR::CudaAccessor::CudaFreeMemoryFunc = std::function<size_t()>

Returns amount of free memory on GPU.

◆ CudaFwnConstructor

using MR::CudaAccessor::CudaFwnConstructor = std::function<std::unique_ptr<IFastWindingNumber>( const Mesh& )>

Returns specific implementation of IFastWindingNumber interface that computes windings on GPU.

◆ CudaMeshProjectorConstructor

Returns specific implementation of IPointsToMeshProjector interface projects on GPU.

◆ CudaPointsToDistanceVolumeCallback

using MR::CudaAccessor::CudaPointsToDistanceVolumeCallback = std::function<Expected<SimpleVolumeMinMax>( const PointCloud& cloud, const PointsToDistanceVolumeParams& params )>

Member Function Documentation

◆ fastWindingNumberMeshMemory()

static MRVIEWER_API size_t MR::CudaAccessor::fastWindingNumberMeshMemory ( const Mesh & mesh)
staticnodiscard

returns amount of required GPU memory for CudaFastWindingNumber internal data,

Parameters
meshinput mesh

◆ fromGridMemory()

static MRVIEWER_API size_t MR::CudaAccessor::fromGridMemory ( const Mesh & mesh,
const Vector3i & dims )
staticnodiscard

returns amount of required GPU memory for CudaFastWindingNumber::calcFromGrid and CudaFastWindingNumber::calcFromGridWithDistances operations,

Parameters
dimsdimensions of the grid

◆ fromVectorMemory()

static MRVIEWER_API size_t MR::CudaAccessor::fromVectorMemory ( const Mesh & mesh,
size_t inputSize )
staticnodiscard

returns amount of required GPU memory for CudaFastWindingNumber::calcFromVector operation

Parameters
inputSizesize of input vector

◆ getComputeCapabilityMajor()

static MRVIEWER_API int MR::CudaAccessor::getComputeCapabilityMajor ( )
staticnodiscard

◆ getComputeCapabilityMinor()

static MRVIEWER_API int MR::CudaAccessor::getComputeCapabilityMinor ( )
staticnodiscard

◆ getCudaFastWindingNumber()

static MRVIEWER_API std::unique_ptr< IFastWindingNumber > MR::CudaAccessor::getCudaFastWindingNumber ( const Mesh & mesh)
staticnodiscard

◆ getCudaFreeMemory()

static MRVIEWER_API size_t MR::CudaAccessor::getCudaFreeMemory ( )
staticnodiscard

◆ getCudaMaxDriverSupportedVersion()

static MRVIEWER_API int MR::CudaAccessor::getCudaMaxDriverSupportedVersion ( )
staticnodiscard

◆ getCudaPointsToDistanceVolumeCallback()

static MRVIEWER_API CudaPointsToDistanceVolumeCallback MR::CudaAccessor::getCudaPointsToDistanceVolumeCallback ( )
staticnodiscard

◆ getCudaPointsToMeshProjector()

static MRVIEWER_API std::unique_ptr< IPointsToMeshProjector > MR::CudaAccessor::getCudaPointsToMeshProjector ( )
staticnodiscard

◆ getCudaRuntimeVersion()

static MRVIEWER_API int MR::CudaAccessor::getCudaRuntimeVersion ( )
staticnodiscard

◆ isCudaAvailable()

static MRVIEWER_API bool MR::CudaAccessor::isCudaAvailable ( )
staticnodiscard

◆ selfIntersectionsMemory()

static MRVIEWER_API size_t MR::CudaAccessor::selfIntersectionsMemory ( const Mesh & mesh)
staticnodiscard

returns amount of required GPU memory for CudaFastWindingNumber::calcSelfIntersections operation

Parameters
meshinput mesh

◆ setCudaAvailable()

static MRVIEWER_API void MR::CudaAccessor::setCudaAvailable ( bool val,
int maxDriverVersion,
int runtimeVersion,
int computeMajor,
int computeMinor )
static

◆ setCudaFastWindingNumberConstructor()

static MRVIEWER_API void MR::CudaAccessor::setCudaFastWindingNumberConstructor ( CudaFwnConstructor fwnCtor)
static

◆ setCudaFreeMemoryFunc()

static MRVIEWER_API void MR::CudaAccessor::setCudaFreeMemoryFunc ( CudaFreeMemoryFunc freeMemFunc)
static

◆ setCudaMeshProjectorConstructor()

static MRVIEWER_API void MR::CudaAccessor::setCudaMeshProjectorConstructor ( CudaMeshProjectorConstructor mpCtor)
static

◆ setCudaPointsToDistanceVolumeCallback()

static MRVIEWER_API void MR::CudaAccessor::setCudaPointsToDistanceVolumeCallback ( CudaPointsToDistanceVolumeCallback callback)
static

The documentation for this class was generated from the following file: