IMSL C Math Library
cuda_set
Set the threshold used by the specified function to determine if the NVIDIA CUDA Toolkit algorithm will be used.
Synopsis
#include <imsl.h>
int imsl_cuda_set (Imsl_cuda cuda_name, int threshold)
Required Arguments
Imsl_cuda cuda_name (Input)
An enumerator which specifies the IMSL function for which the threshold will be set. cuda_name must be one of the values defined in Table 12.9.
int threshold (Input)
The threshold value which determines if the NVIDIA CUDA Toolkit algorithm will be used. A value of zero ensures that the IMSL version of the function will always be used. If the problem size is greater than or equal to threshold, the NVIDIA Toolkit algorithm will be used.
Return Value
A return value of 0 indicates the threshold was set successfully. A return value of 1 indicates the threshold was not set successfully.
Synopsis with Optional Arguments
#include <imsl.h>
int imsl_cuda_set (Imsl_cuda cuda_name, int threshold,
IMSL_SET_ALL,
0)
Optional Arguments
IMSL_SET_ALL (Input)
Sets the threshold of all IMSL/NVIDIA implemented functions.
Description
This routine sets the threshold value for a specified function.
Example
Refer to imsl_cuda_get for the document example.
Warning Errors
IMSL_CUDA_ENUM_NAME
The argument specified for “cuda_name” = # is not valid.
IMSL_CUDA_NOT_IMPLEMENTED
The specified function name does not have a CUDA implementation.
IMSL_CUDA_SET_ERROR
Invalid argument. This argument must be greater than or equal to 0.
IMSL_CUDA_NOT_AVAIL
The CUDA Toolkit algorithms are not implemented using this version of the library. Use the CUDA link environment variables to leverage the CUDA Toolkit algorithms.