QTrk
Functions

Cuda API functions available to LabVIEW. More...

Functions

CDLL_EXPORT int DLL_CALLCONV qtrkcuda_device_count (ErrorCluster *e)
 
CDLL_EXPORT void DLL_CALLCONV qtrkcuda_set_device_list (LVArray< int > **devices)
 
CDLL_EXPORT void qtrkcuda_get_device (int device, CUDADeviceInfo *info, ErrorCluster *e)
 
CDLL_EXPORT void qtrkcuda_enable_texture_cache (QueuedTracker *qtrk, int enable, ErrorCluster *e)
 

Detailed Description

Cuda API functions available to LabVIEW.

Function Documentation

§ qtrkcuda_device_count()

CDLL_EXPORT int DLL_CALLCONV qtrkcuda_device_count ( ErrorCluster e)

Definition at line 645 of file lv_queuetrk_api.cpp.

646 {
647  int c;
648  if (CheckCUDAErrorLV(cudaGetDeviceCount(&c), e)) {
649  return c;
650  }
651  return 0;
652 }
static bool CheckCUDAErrorLV(cudaError err, ErrorCluster *e)
Definition: lv_qtrk_api.h:26

§ qtrkcuda_enable_texture_cache()

CDLL_EXPORT void qtrkcuda_enable_texture_cache ( QueuedTracker qtrk,
int  enable,
ErrorCluster e 
)

Definition at line 666 of file lv_queuetrk_api.cpp.

667 {
668  if (ValidateTracker(qtrk, e, "enable_texture_cache")) {
669  qtrk->SetConfigValue("use_texturecache", enable?"1":"0");
670  }
671 }
virtual void SetConfigValue(std::string name, std::string value)=0
Set an additional setting.
bool ValidateTracker(QueuedTracker *tracker, ErrorCluster *e, const char *funcname)
Verify the referenced tracker is a valid QueuedTracker instance.

§ qtrkcuda_get_device()

CDLL_EXPORT void qtrkcuda_get_device ( int  device,
CUDADeviceInfo info,
ErrorCluster e 
)

Definition at line 654 of file lv_queuetrk_api.cpp.

655 {
656  cudaDeviceProp prop;
657  if (CheckCUDAErrorLV(cudaGetDeviceProperties(&prop, device), e)) {
658  info->multiProcCount = prop.multiProcessorCount;
659  info->clockRate = prop.clockRate;
660  info->major = prop.major;
661  info->minor = prop.minor;
662  SetLVString(info->name, prop.name);
663  }
664 }
LStrHandle name
Definition: lv_qtrk_api.h:17
void SetLVString(LStrHandle str, const char *text)
static bool CheckCUDAErrorLV(cudaError err, ErrorCluster *e)
Definition: lv_qtrk_api.h:26

§ qtrkcuda_set_device_list()

CDLL_EXPORT void DLL_CALLCONV qtrkcuda_set_device_list ( LVArray< int > **  devices)

Definition at line 640 of file lv_queuetrk_api.cpp.

641 {
642  SetCUDADevices( (*devices)->elem, (*devices)->dimSize );
643 }
void SetCUDADevices(int *devices, int numdev)
Set the list of devices to be used when QTrkComputedConfig::cuda_device is set to QTrkCUDA_UseList...