代码之家  ›  专栏  ›  技术社区  ›  John

CUDAPP 1.1 cudppSort配置错误(配置参数无效)

  •  1
  • John  · 技术社区  · 17 年前

    我试图调用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_调用的调用,我看不出其中任何一个与配置有关的原因。

    我的配置有什么问题?

    1 回复  |  直到 17 年前
        1
  •  1
  •   John    16 年前

    因此,这不是一个未回答的问题(我不确定这是否正确,但似乎一个已回答的问题不应该未回答的问题……),我复制了我在这里的评论作为答案,因为这是解决方案: