Cuda 使用cudphandle时出错

Cuda 使用cudphandle时出错,cuda,nvcc,cudpp,Cuda,Nvcc,Cudpp,我作为一个初学者在CUDA上工作,我正在尝试执行一个预先编写的代码,每次使用CUDPPHandle编译都会出错。。。比如说 void HPGMST() { //Reinitialize the ranking arrays, must be orig but this also works CUDA_SAFE_CALL( cudaMemcpy( d_vertex_split_rank, h_vertex_split_rank_test, sizeof(unsigned long

我作为一个初学者在CUDA上工作,我正在尝试执行一个预先编写的代码,每次使用CUDPPHandle编译都会出错。。。比如说

void HPGMST()
{
    //Reinitialize the ranking arrays, must be orig but this also works

    CUDA_SAFE_CALL( cudaMemcpy( d_vertex_split_rank, h_vertex_split_rank_test, sizeof(unsigned long long int)*no_of_vertices, cudaMemcpyHostToDevice));

    CUDA_SAFE_CALL( cudaMemcpy( d_edge_rank, h_edge_rank_test, sizeof(unsigned long long int)*no_of_edges, cudaMemcpyHostToDevice));





    //Make both grids needed for execution, no_of_vertices and no_of_edges length sizes

    int num_of_blocks, num_of_threads_per_block;

    SetGridThreadLen(no_of_edges, &num_of_blocks, &num_of_threads_per_block);

    dim3 grid_edgelen(num_of_blocks, 1, 1);

    dim3 threads_edgelen(num_of_threads_per_block, 1, 1);

    SetGridThreadLen(no_of_vertices, &num_of_blocks, &num_of_threads_per_block);

    dim3 grid_vertexlen(num_of_blocks, 1, 1);

    dim3 threads_vertexlen(num_of_threads_per_block, 1, 1);





    //Append the Weight and Outgoing vertex into a single array, 8-10 bits for weight and 20-22 bits for vertex ID

    //Append in Parallel on the Device itself, call the append kernel

    AppendKernel_1<<< grid_edgelen, threads_edgelen, 0>>>(d_segmented_min_scan_input, d_weight, d_edge, no_of_edges);



    //Create the Flag needed for segmented min scan operation, similar operation will also be used at other places

    ClearArray<<< grid_edgelen, threads_edgelen, 0>>>( d_edge_flag, no_of_edges );



    //Mark the segments for the segmented min scan using scan

    MakeFlag_3<<< grid_vertexlen, threads_vertexlen, 0>>>( d_edge_flag, d_vertex, no_of_vertices);



    //Perfom the Segmented Min Scan on resulting array using d_edge_flag as segments

    cudppPlan(&segmentedScanPlan_min, config_segmented_min, no_of_edges, 1, 0 ); //Make the segmented min scan plan
void HPGMST()
{
//重新初始化排名数组,必须是orig,但这也有效
CUDA_安全调用(cudaMemcpy(d_顶点分割秩,h_顶点分割秩,h_顶点分割秩测试,sizeof(无符号长整型)*无顶点,cudaMemcpyHostToDevice));
CUDA_SAFE_调用(cudaMemcpy(d_edge_rank,h_edge_rank_test,sizeof(unsigned long long int)*无边,cudaMemcpyHostToDevice));
//生成执行所需的两个网格,没有顶点和边长度大小
int num_of_块,每个_块的_线程数;
SetGridThreadLen(边的数量、块的数量、每个块的线程数量);
dim3网格边缘(块的数量,1,1);
dim3螺纹边缘(每个螺纹块的螺纹数,1,1);
SetGridThreadLen(没有\u个顶点,&num\u个块,&num\u个每个\u块的\u个线程);
dim3网格顶点(块的数量,1,1);
dim3线程顶点长度(每个块的线程数,1,1);
//将权重和传出顶点附加到单个数组中,8-10位表示权重,20-22位表示顶点ID
//在设备本身上并行追加时,调用追加内核
附录1>(d_分段_最小_扫描_输入、d_权重、d_边缘、无_边缘);
//创建分段最小扫描操作所需的标志,类似操作也将在其他位置使用
ClearArray>(d_边_标志,没有_边);
//使用scan标记分段最小扫描的分段
MakeFlag_3>(d_边_标志、d_顶点、无_顶点);
//使用d_edge_标志作为分段,在生成的阵列上执行分段最小扫描
cudppPlan(&segmentedScanPlan_min,config_segmented_min,no_of_edges,1,0);//制作分段最小扫描计划
在最后一行给出以下错误:

  • 类型为“CUDPPHandle*”的参数与类型为“CUDPPHandle”的参数不兼容
  • 不存在从“CUDPPConfiguration”到“CUDPPHandle*”的适当转换函数
  • 没有合适的构造函数可将“int”转换为“CUDPPConfiguration”
  • 函数调用中的参数太少
  • 我正在使用“nvcc-arch sm_20”在特斯拉C2075上编译
    请帮助……

    问题就在您发布的错误文本中:

    函数调用中的参数太少


    您的代码只提供了5个参数。可以看出,cudppPlan函数需要6个参数。看起来您缺少调用的第一个参数。

    如果您看到这个cudppPlan有5个参数…我想版本有所不同..您能帮助我使其与以前的版本兼容吗编写的代码n使用CUDPP1.1.1,但目前我使用的是CUDPP2.0