public static String stringFor(int error)
    {
        switch (error)
        {
            case cudaSuccess                           : return "cudaSuccess";
            case cudaErrorMissingConfiguration         : return "cudaErrorMissingConfiguration";
            case cudaErrorMemoryAllocation             : return "cudaErrorMemoryAllocation";
            case cudaErrorInitializationError          : return "cudaErrorInitializationError";
            case cudaErrorLaunchFailure                : return "cudaErrorLaunchFailure";
            case cudaErrorPriorLaunchFailure           : return "cudaErrorPriorLaunchFailure";
            case cudaErrorLaunchTimeout                : return "cudaErrorLaunchTimeout";
            case cudaErrorLaunchOutOfResources         : return "cudaErrorLaunchOutOfResources";
            case cudaErrorInvalidDeviceFunction        : return "cudaErrorInvalidDeviceFunction";
            case cudaErrorInvalidConfiguration         : return "cudaErrorInvalidConfiguration";
            case cudaErrorInvalidDevice                : return "cudaErrorInvalidDevice";
            case cudaErrorInvalidValue                 : return "cudaErrorInvalidValue";
            case cudaErrorInvalidPitchValue            : return "cudaErrorInvalidPitchValue";
            case cudaErrorInvalidSymbol                : return "cudaErrorInvalidSymbol";
            case cudaErrorMapBufferObjectFailed        : return "cudaErrorMapBufferObjectFailed";
            case cudaErrorUnmapBufferObjectFailed      : return "cudaErrorUnmapBufferObjectFailed";
            case cudaErrorInvalidHostPointer           : return "cudaErrorInvalidHostPointer";
            case cudaErrorInvalidDevicePointer         : return "cudaErrorInvalidDevicePointer";
            case cudaErrorInvalidTexture               : return "cudaErrorInvalidTexture";
            case cudaErrorInvalidTextureBinding        : return "cudaErrorInvalidTextureBinding";
            case cudaErrorInvalidChannelDescriptor     : return "cudaErrorInvalidChannelDescriptor";
            case cudaErrorInvalidMemcpyDirection       : return "cudaErrorInvalidMemcpyDirection";
            case cudaErrorAddressOfConstant            : return "cudaErrorAddressOfConstant";
            case cudaErrorTextureFetchFailed           : return "cudaErrorTextureFetchFailed";
            case cudaErrorTextureNotBound              : return "cudaErrorTextureNotBound";
            case cudaErrorSynchronizationError         : return "cudaErrorSynchronizationError";
            case cudaErrorInvalidFilterSetting         : return "cudaErrorInvalidFilterSetting";
            case cudaErrorInvalidNormSetting           : return "cudaErrorInvalidNormSetting";
            case cudaErrorMixedDeviceExecution         : return "cudaErrorMixedDeviceExecution";
            case cudaErrorCudartUnloading              : return "cudaErrorCudartUnloading";
            case cudaErrorUnknown                      : return "cudaErrorUnknown";
            case cudaErrorNotYetImplemented            : return "cudaErrorNotYetImplemented";
            case cudaErrorMemoryValueTooLarge          : return "cudaErrorMemoryValueTooLarge";
            case cudaErrorInvalidResourceHandle        : return "cudaErrorInvalidResourceHandle";
            case cudaErrorNotReady                     : return "cudaErrorNotReady";
            case cudaErrorInsufficientDriver           : return "cudaErrorInsufficientDriver";
            case cudaErrorSetOnActiveProcess           : return "cudaErrorSetOnActiveProcess";
            case cudaErrorInvalidSurface               : return "cudaErrorInvalidSurface";
            case cudaErrorNoDevice                     : return "cudaErrorNoDevice";
            case cudaErrorECCUncorrectable             : return "cudaErrorECCUncorrectable";
            case cudaErrorSharedObjectSymbolNotFound   : return "cudaErrorSharedObjectSymbolNotFound";
            case cudaErrorSharedObjectInitFailed       : return "cudaErrorSharedObjectInitFailed";
            case cudaErrorUnsupportedLimit             : return "cudaErrorUnsupportedLimit";
            case cudaErrorDuplicateVariableName        : return "cudaErrorDuplicateVariableName";
            case cudaErrorDuplicateTextureName         : return "cudaErrorDuplicateTextureName";
            case cudaErrorDuplicateSurfaceName         : return "cudaErrorDuplicateSurfaceName";
            case cudaErrorDevicesUnavailable           : return "cudaErrorDevicesUnavailable";
            case cudaErrorInvalidKernelImage           : return "cudaErrorInvalidKernelImage";
            case cudaErrorNoKernelImageForDevice       : return "cudaErrorNoKernelImageForDevice";
            case cudaErrorIncompatibleDriverContext    : return "cudaErrorIncompatibleDriverContext";
            case cudaErrorPeerAccessAlreadyEnabled     : return "cudaErrorPeerAccessAlreadyEnabled";
            case cudaErrorPeerAccessNotEnabled         : return "cudaErrorPeerAccessNotEnabled";
            case cudaErrorDeviceAlreadyInUse           : return "cudaErrorDeviceAlreadyInUse";
            case cudaErrorProfilerDisabled             : return "cudaErrorProfilerDisabled";
            case cudaErrorProfilerNotInitialized       : return "cudaErrorProfilerNotInitialized";
            case cudaErrorProfilerAlreadyStarted       : return "cudaErrorProfilerAlreadyStarted";
            case cudaErrorProfilerAlreadyStopped       : return "cudaErrorProfilerAlreadyStopped";
            case cudaErrorAssert                       : return "cudaErrorAssert";
            case cudaErrorTooManyPeers                 : return "cudaErrorTooManyPeers";
            case cudaErrorHostMemoryAlreadyRegistered  : return "cudaErrorHostMemoryAlreadyRegistered";
            case cudaErrorHostMemoryNotRegistered      : return "cudaErrorHostMemoryNotRegistered";
            case cudaErrorOperatingSystem              : return "cudaErrorOperatingSystem";
            case cudaErrorPeerAccessUnsupported        : return "cudaErrorPeerAccessUnsupported";
            case cudaErrorLaunchMaxDepthExceeded       : return "cudaErrorLaunchMaxDepthExceeded";
            case cudaErrorLaunchFileScopedTex          : return "cudaErrorLaunchFileScopedTex";
            case cudaErrorLaunchFileScopedSurf         : return "cudaErrorLaunchFileScopedSurf";
            case cudaErrorSyncDepthExceeded            : return "cudaErrorSyncDepthExceeded";
            case cudaErrorLaunchPendingCountExceeded   : return "cudaErrorLaunchPendingCountExceeded";
            case cudaErrorNotPermitted                 : return "cudaErrorNotPermitted";
            case cudaErrorNotSupported                 : return "cudaErrorNotSupported";
            case cudaErrorHardwareStackError           : return "cudaErrorHardwareStackError";
            case cudaErrorIllegalInstruction           : return "cudaErrorIllegalInstruction";
            case cudaErrorMisalignedAddress            : return "cudaErrorMisalignedAddress";
            case cudaErrorInvalidAddressSpace          : return "cudaErrorInvalidAddressSpace";
            case cudaErrorInvalidPc                    : return "cudaErrorInvalidPc";
            case cudaErrorIllegalAddress               : return "cudaErrorIllegalAddress";
            case cudaErrorInvalidPtx                   : return "cudaErrorInvalidPtx";
            case cudaErrorInvalidGraphicsContext       : return "cudaErrorInvalidGraphicsContext";
            case cudaErrorNvlinkUncorrectable          : return "cudaErrorNvlinkUncorrectable";
            case cudaErrorJitCompilerNotFound          : return "cudaErrorJitCompilerNotFound";
            case cudaErrorCooperativeLaunchTooLarge    : return "cudaErrorCooperativeLaunchTooLarge";
            case cudaErrorSystemNotReady               : return "cudaErrorSystemNotReady";
            case cudaErrorIllegalState                 : return "cudaErrorIllegalState";
            case cudaErrorStartupFailure               : return "cudaErrorStartupFailure";
            case cudaErrorStreamCaptureUnsupported     : return "cudaErrorStreamCaptureUnsupported";
            case cudaErrorStreamCaptureInvalidated     : return "cudaErrorStreamCaptureInvalidated";
            case cudaErrorStreamCaptureMerge           : return "cudaErrorStreamCaptureMerge";
            case cudaErrorStreamCaptureUnmatched       : return "cudaErrorStreamCaptureUnmatched";
            case cudaErrorStreamCaptureUnjoined        : return "cudaErrorStreamCaptureUnjoined";
            case cudaErrorStreamCaptureIsolation       : return "cudaErrorStreamCaptureIsolation";
            case cudaErrorStreamCaptureImplicit        : return "cudaErrorStreamCaptureImplicit";
            case cudaErrorCapturedEvent                : return "cudaErrorCapturedEvent";
            case jcudaInternalError                    : return "jcudaInternalError";
        }
        if (error >= cudaErrorApiFailureBase)
        {
            return stringFor(error-cudaErrorApiFailureBase);
        }
        return "INVALID cudaError: "+error;
    }
public static String stringFor ( int error ) { switch ( error ) { case cudaSuccess : return "cudaSuccess" ; case cudaErrorMissingConfiguration : return "cudaErrorMissingConfiguration" ; case cudaErrorMemoryAllocation : return "cudaErrorMemoryAllocation" ; case cudaErrorInitializationError : return "cudaErrorInitializationError" ; case cudaErrorLaunchFailure : return "cudaErrorLaunchFailure" ; case cudaErrorPriorLaunchFailure : return "cudaErrorPriorLaunchFailure" ; case cudaErrorLaunchTimeout : return "cudaErrorLaunchTimeout" ; case cudaErrorLaunchOutOfResources : return "cudaErrorLaunchOutOfResources" ; case cudaErrorInvalidDeviceFunction : return "cudaErrorInvalidDeviceFunction" ; case cudaErrorInvalidConfiguration : return "cudaErrorInvalidConfiguration" ; case cudaErrorInvalidDevice : return "cudaErrorInvalidDevice" ; case cudaErrorInvalidValue : return "cudaErrorInvalidValue" ; case cudaErrorInvalidPitchValue : return "cudaErrorInvalidPitchValue" ; case cudaErrorInvalidSymbol : return "cudaErrorInvalidSymbol" ; case cudaErrorMapBufferObjectFailed : return "cudaErrorMapBufferObjectFailed" ; case cudaErrorUnmapBufferObjectFailed : return "cudaErrorUnmapBufferObjectFailed" ; case cudaErrorInvalidHostPointer : return "cudaErrorInvalidHostPointer" ; case cudaErrorInvalidDevicePointer : return "cudaErrorInvalidDevicePointer" ; case cudaErrorInvalidTexture : return "cudaErrorInvalidTexture" ; case cudaErrorInvalidTextureBinding : return "cudaErrorInvalidTextureBinding" ; case cudaErrorInvalidChannelDescriptor : return "cudaErrorInvalidChannelDescriptor" ; case cudaErrorInvalidMemcpyDirection : return "cudaErrorInvalidMemcpyDirection" ; case cudaErrorAddressOfConstant : return "cudaErrorAddressOfConstant" ; case cudaErrorTextureFetchFailed : return "cudaErrorTextureFetchFailed" ; case cudaErrorTextureNotBound : return "cudaErrorTextureNotBound" ; case cudaErrorSynchronizationError : return "cudaErrorSynchronizationError" ; case cudaErrorInvalidFilterSetting : return "cudaErrorInvalidFilterSetting" ; case cudaErrorInvalidNormSetting : return "cudaErrorInvalidNormSetting" ; case cudaErrorMixedDeviceExecution : return "cudaErrorMixedDeviceExecution" ; case cudaErrorCudartUnloading : return "cudaErrorCudartUnloading" ; case cudaErrorUnknown : return "cudaErrorUnknown" ; case cudaErrorNotYetImplemented : return "cudaErrorNotYetImplemented" ; case cudaErrorMemoryValueTooLarge : return "cudaErrorMemoryValueTooLarge" ; case cudaErrorInvalidResourceHandle : return "cudaErrorInvalidResourceHandle" ; case cudaErrorNotReady : return "cudaErrorNotReady" ; case cudaErrorInsufficientDriver : return "cudaErrorInsufficientDriver" ; case cudaErrorSetOnActiveProcess : return "cudaErrorSetOnActiveProcess" ; case cudaErrorInvalidSurface : return "cudaErrorInvalidSurface" ; case cudaErrorNoDevice : return "cudaErrorNoDevice" ; case cudaErrorECCUncorrectable : return "cudaErrorECCUncorrectable" ; case cudaErrorSharedObjectSymbolNotFound : return "cudaErrorSharedObjectSymbolNotFound" ; case cudaErrorSharedObjectInitFailed : return "cudaErrorSharedObjectInitFailed" ; case cudaErrorUnsupportedLimit : return "cudaErrorUnsupportedLimit" ; case cudaErrorDuplicateVariableName : return "cudaErrorDuplicateVariableName" ; case cudaErrorDuplicateTextureName : return "cudaErrorDuplicateTextureName" ; case cudaErrorDuplicateSurfaceName : return "cudaErrorDuplicateSurfaceName" ; case cudaErrorDevicesUnavailable : return "cudaErrorDevicesUnavailable" ; case cudaErrorInvalidKernelImage : return "cudaErrorInvalidKernelImage" ; case cudaErrorNoKernelImageForDevice : return "cudaErrorNoKernelImageForDevice" ; case cudaErrorIncompatibleDriverContext : return "cudaErrorIncompatibleDriverContext" ; case cudaErrorPeerAccessAlreadyEnabled : return "cudaErrorPeerAccessAlreadyEnabled" ; case cudaErrorPeerAccessNotEnabled : return "cudaErrorPeerAccessNotEnabled" ; case cudaErrorDeviceAlreadyInUse : return "cudaErrorDeviceAlreadyInUse" ; case cudaErrorProfilerDisabled : return "cudaErrorProfilerDisabled" ; case cudaErrorProfilerNotInitialized : return "cudaErrorProfilerNotInitialized" ; case cudaErrorProfilerAlreadyStarted : return "cudaErrorProfilerAlreadyStarted" ; case cudaErrorProfilerAlreadyStopped : return "cudaErrorProfilerAlreadyStopped" ; case cudaErrorAssert : return "cudaErrorAssert" ; case cudaErrorTooManyPeers : return "cudaErrorTooManyPeers" ; case cudaErrorHostMemoryAlreadyRegistered : return "cudaErrorHostMemoryAlreadyRegistered" ; case cudaErrorHostMemoryNotRegistered : return "cudaErrorHostMemoryNotRegistered" ; case cudaErrorOperatingSystem : return "cudaErrorOperatingSystem" ; case cudaErrorPeerAccessUnsupported : return "cudaErrorPeerAccessUnsupported" ; case cudaErrorLaunchMaxDepthExceeded : return "cudaErrorLaunchMaxDepthExceeded" ; case cudaErrorLaunchFileScopedTex : return "cudaErrorLaunchFileScopedTex" ; case cudaErrorLaunchFileScopedSurf : return "cudaErrorLaunchFileScopedSurf" ; case cudaErrorSyncDepthExceeded : return "cudaErrorSyncDepthExceeded" ; case cudaErrorLaunchPendingCountExceeded : return "cudaErrorLaunchPendingCountExceeded" ; case cudaErrorNotPermitted : return "cudaErrorNotPermitted" ; case cudaErrorNotSupported : return "cudaErrorNotSupported" ; case cudaErrorHardwareStackError : return "cudaErrorHardwareStackError" ; case cudaErrorIllegalInstruction : return "cudaErrorIllegalInstruction" ; case cudaErrorMisalignedAddress : return "cudaErrorMisalignedAddress" ; case cudaErrorInvalidAddressSpace : return "cudaErrorInvalidAddressSpace" ; case cudaErrorInvalidPc : return "cudaErrorInvalidPc" ; case cudaErrorIllegalAddress : return "cudaErrorIllegalAddress" ; case cudaErrorInvalidPtx : return "cudaErrorInvalidPtx" ; case cudaErrorInvalidGraphicsContext : return "cudaErrorInvalidGraphicsContext" ; case cudaErrorNvlinkUncorrectable : return "cudaErrorNvlinkUncorrectable" ; case cudaErrorJitCompilerNotFound : return "cudaErrorJitCompilerNotFound" ; case cudaErrorCooperativeLaunchTooLarge : return "cudaErrorCooperativeLaunchTooLarge" ; case cudaErrorSystemNotReady : return "cudaErrorSystemNotReady" ; case cudaErrorIllegalState : return "cudaErrorIllegalState" ; case cudaErrorStartupFailure : return "cudaErrorStartupFailure" ; case cudaErrorStreamCaptureUnsupported : return "cudaErrorStreamCaptureUnsupported" ; case cudaErrorStreamCaptureInvalidated : return "cudaErrorStreamCaptureInvalidated" ; case cudaErrorStreamCaptureMerge : return "cudaErrorStreamCaptureMerge" ; case cudaErrorStreamCaptureUnmatched : return "cudaErrorStreamCaptureUnmatched" ; case cudaErrorStreamCaptureUnjoined : return "cudaErrorStreamCaptureUnjoined" ; case cudaErrorStreamCaptureIsolation : return "cudaErrorStreamCaptureIsolation" ; case cudaErrorStreamCaptureImplicit : return "cudaErrorStreamCaptureImplicit" ; case cudaErrorCapturedEvent : return "cudaErrorCapturedEvent" ; case jcudaInternalError : return "jcudaInternalError" ; } if ( error >= cudaErrorApiFailureBase ) { return stringFor ( error - cudaErrorApiFailureBase ) ; } return "INVALID cudaError: " + error ; }
Returns the String identifying the given cudaError

@param error The cudaError
@return The String identifying the given cudaError