我试图调用cudppSort对一组键/值进行排序。我使用以下代码设置排序算法:
CUDPPConfiguration config;
config.op = CUDPP_ADD;
config.datatype = CUDPP_UINT;
config.algorithm = CUDPP_SORT_RADIX;
config.options = CUDPP_OPTION_KEY_VALUE_PAIRS | CUDPP_OPTION_FORWARD | CUDPP_OPTION_EXCLUSIVE;
CUDPPHandle planHandle;
CUDPPResult result = cudppPlan(&planHandle, config, number_points, 1, 0);
if (CUDPP_SUCCESS != result) {
printf("ERROR creating CUDPPPlan\n");
exit(-1);
}
程序退出,但在以下行:
CUDPPResult result = cudppPlan(&planHandle, config, number_points, 1, 0);
并打印到标准输出:
Cuda error: allocScanStorage in file 'c:/the/path/to/release1.1/cudpp/src/app/scan_app.cu' in line 279 : invalid configuration argument.
CUT_CHECK_ERROR("allocScanStorage");
显然,我的配置有一个错误,导致AllocTransstorage崩溃。函数中只有两个对CUDA_SAFE_调用的调用,我看不出其中任何一个与配置有关的原因。
我的配置有什么问题?