Mercurial > hg > Game > Cerium
changeset 1931:007131fd87e8 draft
fix CudaError
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 31 Jan 2014 17:08:58 +0900 |
parents | cad62ee741e2 |
children | f57779f1d93a 67e50779feb4 |
files | TaskManager/Cuda/CudaError.h |
diffstat | 1 files changed, 35 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Cuda/CudaError.h Fri Jan 31 16:51:15 2014 +0900 +++ b/TaskManager/Cuda/CudaError.h Fri Jan 31 17:08:58 2014 +0900 @@ -5,36 +5,43 @@ const unsigned int status; const char* status_string; } Error_Status[] = { - {cudaSuccess, "cudaSuccess"}, - {cudaErrorMissingConfiguration, "cudaErrorMissingConfiguration"}, - {cudaErrorMemoryAllocation, "cudaErrorMemoryAllocation"}, - {cudaErrorInitializationError, "cudaErrorInitializationError"}, - {cudaErrorLaunchFailure, "cudaErrorLaunchFailure"}, - {cudaErrorLaunchTimeout, "cudaErrorLaunchTimeout"}, - {cudaErrorLaunchOutOfResources, "cudaErrorLaunchOutOfResources"}, - {cudaErrorInvalidDeviceFunction, "cudaErrorInvalidDeviceFunction"}, - {cudaErrorInvalidConfiguration, "cudaErrorInvalidConfiguration"}, - {cudaErrorInvalidDevice, "cudaErrorInvalidDevice"}, - {cudaErrorInvalidValue, "cudaErrorInvalidValue"}, - {cudaErrorInvalidPitchValue, "cudaErrorInvalidPitchValue"}, - {cudaErrorInvalidSymbol, "cudaErrorInvalidSymbol"}, - {cudaErrorUnmapBufferObjectFailed, "cudaErrorUnmapBufferObjectFailed"}, - {cudaErrorInvalidHostPointer, "cudaErrorInvalidHostPointer"}, - {cudaErrorInvalidDevicePointer, "cudaErrorInvalidDevicePointer"}, - {cudaErrorInvalidTexture, "cudaErrorInvalidTexture"}, - {cudaErrorInvalidTextureBinding, "cudaErrorInvalidTextureBinding"}, - {cudaErrorInvalidChannelDescriptor, "cudaErrorInvalidChannelDescriptor"}, - {cudaErrorInvalidMemcpyDirection, "cudaErrorInvalidMemcpyDirection"}, - {cudaErrorInvalidFilterSetting, "cudaErrorInvalidFilterSetting"}, - {cudaErrorInvalidNormSetting, "cudaErrorInvalidNormSetting"}, - {cudaErrorUnknown, "cudaErrorUnknown"}, - {cudaErrorInvalidResourceHandle, "cudaErrorInvalidResourceHandle"}, - {cudaErrorInsufficientDriver, "cudaErrorInsufficientDriver"}, - {cudaErrorSetOnActiveProcess, "cudaErrorSetOnActiveProcess"}, - {cudaErrorStartupFailure, "cudaErrorStartupFailure"}, + {CUDA_SUCCESS, "CUDA_SUCCESS"}, + {CUDA_ERROR_INVALID_VALUE, "CUDA_ERROR_INVALID_VALUE"}, + {CUDA_ERROR_OUT_OF_MEMORY, "CUDA_ERROR_OUT_OF_MEMORY"}, + {CUDA_ERROR_NOT_INITIALIZED, "CUDA_ERROR_NOT_INITIALIZED"}, + {CUDA_ERROR_DEINITIALIZED, "CUDA_ERROR_DEINITIALIZED"}, + {CUDA_ERROR_NO_DEVICE, "CUDA_ERROR_NO_DEVICE"}, + {CUDA_ERROR_INVALID_DEVICE, "CUDA_ERROR_INVALID_DEVICE"}, + {CUDA_ERROR_INVALID_IMAGE, "CUDA_ERROR_INVALID_IMAGE"}, + {CUDA_ERROR_INVALID_CONTEXT, "CUDA_ERROR_INVALID_CONTEXT"}, + {CUDA_ERROR_CONTEXT_ALREADY_CURRENT, "CUDA_ERROR_CONTEXT_ALREADY_CURRENT"}, + {CUDA_ERROR_MAP_FAILED, "CUDA_ERROR_MAP_FAILED"}, + {CUDA_ERROR_UNMAP_FAILED, "CUDA_ERROR_UNMAP_FAILED"}, + {CUDA_ERROR_ARRAY_IS_MAPPED, "CUDA_ERROR_ARRAY_IS_MAPPED"}, + {CUDA_ERROR_ALREADY_MAPPED, "CUDA_ERROR_ALREADY_MAPPED"}, + {CUDA_ERROR_NO_BINARY_FOR_GPU, "CUDA_ERROR_NO_BINARY_FOR_GPU"}, + {CUDA_ERROR_ALREADY_ACQUIRED, "CUDA_ERROR_ALREADY_ACQUIRED"}, + {CUDA_ERROR_NOT_MAPPED, "CUDA_ERROR_NOT_MAPPED"}, + {CUDA_ERROR_NOT_MAPPED_AS_ARRAY, "CUDA_ERROR_NOT_MAPPED_AS_ARRAY"}, + {CUDA_ERROR_NOT_MAPPED_AS_POINTER, "CUDA_ERROR_NOT_MAPPED_AS_POINTER"}, + {CUDA_ERROR_ECC_UNCORRECTABLE, "CUDA_ERROR_ECC_UNCORRECTABLE"}, + {CUDA_ERROR_UNSUPPORTED_LIMIT, "CUDA_ERROR_UNSUPPORTED_LIMIT"}, + {CUDA_ERROR_INVALID_SOURCE, "CUDA_ERROR_INVALID_SOURCE"}, + {CUDA_ERROR_FILE_NOT_FOUND, "CUDA_ERROR_FILE_NOT_FOUND"}, + {CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND, "CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND"}, + {CUDA_ERROR_SHARED_OBJECT_INIT_FAILED, "CUDA_ERROR_SHARED_OBJECT_INIT_FAILED"}, + {CUDA_ERROR_OPERATING_SYSTEM, "CUDA_ERROR_OPERATING_SYSTEM"}, + {CUDA_ERROR_INVALID_HANDLE, "CUDA_ERROR_INVALID_HANDLE"}, + {CUDA_ERROR_NOT_FOUND, "CUDA_ERROR_NOT_FOUND"}, + {CUDA_ERROR_NOT_READY, "CUDA_ERROR_NOT_READY"}, + {CUDA_ERROR_LAUNCH_FAILED, "CUDA_ERROR_LAUNCH_FAILED"}, + {CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES, "CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES"}, + {CUDA_ERROR_LAUNCH_TIMEOUT, "CUDA_ERROR_LAUNCH_TIMEOUT"}, + {CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING, "CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING"}, + {CUDA_ERROR_UNKNOWN, "CUDA_ERROR_UNKNOWN"}, {0, NULL} }; - const char* message; + const char* message = "UNKNOW ERROR."; for(int i=0; Error_Status[i].status_string != NULL; i++) { if (Error_Status[i].status == status) {