本帖最后由 yuquan08 于 2013-8-7 20:53 编辑
CUBLAS.exe 中的 0x74e3c6e3 处最可能的异常: Microsoft C++ 异常: 内存位置 0x0022f854 处的 cudaError_enum。
CUBLAS.exe 中的 0x74e3c6e3 处最可能的异常: Microsoft C++ 异常: 内存位置 0x0022f854 处的 cudaError_enum。
能给我详细讲讲怎么回事吗?
1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include <assert.h> 5 #include <math.h> 6 #include <windows.h> 7 8 #include <FreeImage.h> 9 10 #include <cuda_runtime.h> 11 #include <npp.h> 12 13 14 int main( int argc, char* argv[] ) 15 { 16 cudaError_t cuRet; 17 NppStatus nppRet; 18 BOOL fiRet; 19 FIBITMAP* pSrcBmp; 20 FIBITMAP* pDstBmp; 21 unsigned char* pSrcData; 22 unsigned char* pDstData; 23 Npp8u* pSrcDataCUDA; 24 Npp8u* pDstDataCUDA; 25 NppiSize oSrcSize; 26 NppiSize oDstSize; 27 NppiRect oSrcROI; 28 NppiRect oDstROI; 29 int nSrcPitch; 30 int nDstPitch; 31 int nSrcPitchCUDA; 32 int nDstPitchCUDA; 33 double aBoundingBox[2][2]; 34 double nAngle; 35 36 37 /* 设置显卡,构建上下文 */ 38 cuRet = cudaSetDevice( 0 ); 39 assert( cuRet == cudaSuccess ); 40 41 /* 打开文件 */ 42 pSrcBmp = FreeImage_Load( FIF_BMP, "1.bmp" ); 43 assert( pSrcBmp != NULL ); 44 |