|
|
|
@ -209,8 +209,8 @@ int T_spmvCSRGDevice(T_Cmat *Matrix, TYPE alpha, void *deviceX,
|
|
|
|
|
// vX=x->v_;
|
|
|
|
|
// vY=y->v_;
|
|
|
|
|
// fprintf(stderr,"CUDA ENTERED %p %d %d %d %d %d\n", vX, pitch, y->size_, x->count_, alpha, beta);
|
|
|
|
|
// CHECK_CUSPARSE(cusparseCreateDnMat(&vecX, cMat->n, x->count_, pitch, vX, CUSPARSE_BASE_TYPE, CUSPARSE_ORDER_COL));
|
|
|
|
|
// CHECK_CUSPARSE(cusparseCreateDnMat(&vecY, cMat->m, y->count_, pitch, vY, CUSPARSE_BASE_TYPE, CUSPARSE_ORDER_COL));
|
|
|
|
|
// CHECK_CUSPARSE(cusparseCreateDnMat(&vecX, cMat->n, x->count_, y->size_, vX, CUSPARSE_BASE_TYPE, CUSPARSE_ORDER_COL));
|
|
|
|
|
// CHECK_CUSPARSE(cusparseCreateDnMat(&vecY, cMat->m, y->count_, y->size_, vY, CUSPARSE_BASE_TYPE, CUSPARSE_ORDER_COL));
|
|
|
|
|
// CHECK_CUSPARSE(cusparseSpMM_bufferSize(*my_handle,CUSPARSE_OPERATION_NON_TRANSPOSE,
|
|
|
|
|
// CUSPARSE_OPERATION_NON_TRANSPOSE,&alpha,
|
|
|
|
|
// (*(cMat->spmvDescr)),vecX,&beta,vecY,
|
|
|
|
@ -236,7 +236,7 @@ int T_spmvCSRGDevice(T_Cmat *Matrix, TYPE alpha, void *deviceX,
|
|
|
|
|
for(j=0;j<y->count_;j++) {
|
|
|
|
|
vX=x->v_+pitch*j;
|
|
|
|
|
vY=y->v_+pitch*j;
|
|
|
|
|
fprintf(stderr,"CUDA ENTERED 1 %d %p %p %d %d %d %d\n",j, vX, vY, pitch, y->size_, cMat->m, cMat->n);
|
|
|
|
|
fprintf(stderr,"CUDA ENTERED %d %p %p %d %d\n",j, vX, vY, pitch, y->size_);
|
|
|
|
|
CHECK_CUSPARSE( cusparseCreateDnVec(&vecY, cMat->m, vY, CUSPARSE_BASE_TYPE) );
|
|
|
|
|
CHECK_CUSPARSE( cusparseCreateDnVec(&vecX, cMat->n, vX, CUSPARSE_BASE_TYPE) );
|
|
|
|
|
CHECK_CUSPARSE(cusparseSpMV_bufferSize(*my_handle,CUSPARSE_OPERATION_NON_TRANSPOSE,
|
|
|
|
@ -257,7 +257,6 @@ int T_spmvCSRGDevice(T_Cmat *Matrix, TYPE alpha, void *deviceX,
|
|
|
|
|
&alpha,(*(cMat->spmvDescr)),vecX,&beta,vecY,
|
|
|
|
|
CUSPARSE_BASE_TYPE,CUSPARSE_SPMV_ALG_DEFAULT,
|
|
|
|
|
cMat->mvbuffer));
|
|
|
|
|
fprintf(stderr,"CUDA ENTERED 2 %d %p %p %d %d %d %d\n",j, vX, vY, *((double*)vX), *((double*)vY), pitch, y->size_);
|
|
|
|
|
CHECK_CUSPARSE(cusparseDestroyDnVec(vecX) );
|
|
|
|
|
CHECK_CUSPARSE(cusparseDestroyDnVec(vecY) );
|
|
|
|
|
}
|
|
|
|
|