src/device/GPU_Device.cc
//----------------------------------------------------------------------------//
/*!
 * \brief Return a text string that corresponds to a CUDA error enum.
 */
\brief Return a text string that corresponds to a CUDA error enum.
\ brief Return a text string that corresponds to a CUDA error enum .
std::string GPU_Device::getErrorMessage(cudaError_t const err) {
  auto raw_message = cudaGetErrorString(err);
  std::string message(raw_message);
  return message;
}
std :: string GPU_Device :: getErrorMessage ( cudaError_t const err ) { auto raw_message = cudaGetErrorString ( err ) ; std :: string message ( raw_message ) ; return message ; }
\brief Return a text string that corresponds to a CUDA error enum.
\ brief Return a text string that corresponds to a CUDA error enum .
/*
  switch (err) {
  case cudaSuccess:
    message = std::string("No errors.");
    break;
  case cudaErrorInvalidValue:
    message = std::string("Invalid value.");
    break;
  case cudaErrorMemoryAllocation:
    message = std::string("Out of memory.");
    break;
  case cudaErrorInitializationError:
    message = std::string("Driver not initialized.");
    break;
  case cudaErrorDeviceUninitilialized:
    message = std::string("Driver deinitialized.");
    break;
  case cudaErrorNoDevice:
    message = std::string("No CUDA-capable device available.");
    break;
  case cudaErrorInvalidDevice:
    message = std::string("Invalid device.");
    break;
  case cudaErrorInvalidKernelImage:
    message = std::string("Invalid kernel image.");
    break;
  case cudaErrorIncompatibleDriverContext:
    message = std::string("Invalid context.");
    break;
  case cudaErrorMapBufferObjectFailed:
    message = std::string("Map failed.");
    break;
  case cudaErrorUnmapBufferObjectFailed:
    message = std::string("Unmap failed.");
    break;
  case cudaErrorArrayIsMapped:
    message = std::string("Array is mapped.");
    break;
  case cudaErrorAlreadyMapped:
    message = std::string("Already mapped.");
    break;
  case cudaErrorAlreadyAcquired:
    message = std::string("Already acquired.");
    break;
  case cudaErrorNotMapped:
    message = std::string("Not mapped.");
    break;
  case cudaErrorInvalidSource:
    message = std::string("Invalid source.");
    break;
  case cudaErrorFileNotFound:
    message = std::string("File not found.");
    break;
  case cudaErrorInvalidResourceHandle:
    message = std::string("Invalid handle.");
    break;
  case cudaErrorNotReady:
    message = std::string("CUDA not ready.");
    break;
  case cudaErrorLaunchFailure:
    message = std::string("Launch failed.");
    break;
  case cudaErrorLaunchOutOfResources:
    message = std::string("Launch exceeded resources.");
    break;
  case cudaErrorLaunchTimeout:
    message = std::string("Launch exceeded timeout.");
    break;
  case cudaErrorLaunchIncompatibleTexturing:
    message = std::string("Launch with incompatible texturing.");
    break;
  case cudaErrorUnknown:
    message = std::string("Unknown error. ");
    break;
  default:
    // cudaErrorProfilerDisabled
    // cudaErrorNotMappedAsArray
    // cudaErrorNotMappedAsPointer
    // cudaErrorECCUncorrectable
    // cudaErrorUnsupportedLimit
    // cudaErrorSharedObjectSymbolNotFound
    // cudaErrorSharedObjectInitFailed
    // cudaErrorOperatingSystem
    // cudaErrorPeerAccessAlreadyEnabled
    // cudaErrorPeerAccessUnsupported
    // cudaErrorPeerAccessNotEnabled
    // cudaErrorContextIsDestroyed
    message = std::string("Unknown error. ");
    break;
  }
  */