ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Functions
ModuleBase::cuda_compat Namespace Reference

Functions

void printDeprecatedDeviceInfo (std::ostream &os, const cudaDeviceProp &prop)
 Prints device information that was deprecated or removed in CUDA 13.0.
 
void printComputeModeInfo (std::ostream &os, const cudaDeviceProp &prop)
 Prints the device's compute mode using a legacy string mapping.
 
const char * cufftGetErrorStringCompat (cufftResult_t error)
 Provides a cross-CUDA-version string conversion for cuFFT error codes.
 

Function Documentation

◆ cufftGetErrorStringCompat()

const char * ModuleBase::cuda_compat::cufftGetErrorStringCompat ( cufftResult_t  error)

Provides a cross-CUDA-version string conversion for cuFFT error codes.

In CUDA 13.0, several error codes were removed. This function handles these differences gracefully.

Parameters
errorThe cufftResult_t error code.
Returns
const char* A descriptive string for the error.

◆ printComputeModeInfo()

void ModuleBase::cuda_compat::printComputeModeInfo ( std::ostream &  os,
const cudaDeviceProp &  prop 
)

Prints the device's compute mode using a legacy string mapping.

The compute mode display logic is encapsulated here as it relies on aspects of the driver model that have changed.

Parameters
osThe output stream (e.g., std::cout, std::ofstream).
propThe cudaDeviceProp structure containing device properties.

◆ printDeprecatedDeviceInfo()

void ModuleBase::cuda_compat::printDeprecatedDeviceInfo ( std::ostream &  os,
const cudaDeviceProp &  prop 
)

Prints device information that was deprecated or removed in CUDA 13.0.

This function handles properties like clockRate, memoryClockRate, memoryBusWidth, and concurrency flags, which are not available in newer CUDA toolkits.

Parameters
osThe output stream (e.g., std::cout, std::ofstream).
propThe cudaDeviceProp structure containing device properties.