cusp-library

How to get raw pointer from cusp library matrix format

喜夏-厌秋 提交于 2019-12-31 06:22:24
问题 I need to get raw pointer from cusp library matrix format. For example: cusp::coo_matrix<int,double,cusp::device_memory> A(3,3,4); A.values[0] = 1; A.row_indices[0] = 0; A.column_indices[0]= 1; A.values[1] = 2; A.row_indices[1] = 1; A.column_indices[1]= 0; A.values[2] = 3; A.row_indices[2] = 1; A.column_indices[2]= 1; A.values[3] = 4; A.row_indices[3] = 2; A.column_indices[3]= 2; How can I get the raw pointer to row_indices, column_indices and values arrays? I need to pass them to my kernels

Using cusp in a Visual Studio C++ project

旧巷老猫 提交于 2019-12-25 08:27:24
问题 I'm using cusp v.0.4.0, cuda V5.5 on VS2012 Ultimate. I created a CUDA project using the new project wizard and added the cusp path to it's project properties\VC++ Directories\Include Directories . I wrote my code in the *.cu file generated by VS2012, the project compiled and built successfully but I got R6010 error on execution. I solved this issue by changing the default value of project properties\CUDA C/C++\Device\Code Generation from compute_10,sm_10 to compute_30,sm_30 , which is my sm

Generating CUSP coo_matrix from passed FORTRAN arrays

拥有回忆 提交于 2019-12-24 13:22:45
问题 I am working on integrating CUSP solvers into an existing FORTRAN code. As a first step, I am simply trying to pass in a pair of integer arrays and a float (real*4 in FORTRAN) from FORTRAN which will be used to construct and then print a COO format CUSP matrix. So far, I have been able to follow this thread and got everything to compile and link: Unresolved references using IFORT with nvcc and CUSP Unfortunately, the program is apparently sending garbage into the CUSP matrix and ends up

Not able to understand output of CSR Representation in CUSP

社会主义新天地 提交于 2019-12-12 00:08:56
问题 I am trying to use the CUSP library. I am reading .txt files which are basically sparse COO representation. I am using CUSP to convert into CSR format. When I print the matrix with cusp::print() it prints the correct outcome for COO representation. However when I convert the matrix into CSR, I have written my own function for printing but the outcome is not what I want. Here is the snippet main() { //. //bla bla //.. //create a 2d coo matrix cusp::coo_matrix<int, int, cusp::host_memory> D

Unresolved references using IFORT with nvcc and CUSP

拈花ヽ惹草 提交于 2019-12-04 06:38:18
问题 I have a program which I'm compiling like this: (...) Some ifort *.f -c nvcc -c src/bicgstab.cu -o bicgstab.o -I/home/ricardo/apps/cusp/cusplibrary (...) Some more *.for -c ifort *.o -L/usr/local/cuda-5.5/lib64 -lcudart -lcublas -lcusparse -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -o program Everything worked fine until i added the CUSP support where i have this wrapper (bicgstab.cu): #include <cusp/csr_matrix.h> #include <cusp/krylov/bicgstab.h> #if defined(__cplusplus) extern

Unresolved references using IFORT with nvcc and CUSP

大兔子大兔子 提交于 2019-12-02 08:40:15
I have a program which I'm compiling like this: (...) Some ifort *.f -c nvcc -c src/bicgstab.cu -o bicgstab.o -I/home/ricardo/apps/cusp/cusplibrary (...) Some more *.for -c ifort *.o -L/usr/local/cuda-5.5/lib64 -lcudart -lcublas -lcusparse -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -o program Everything worked fine until i added the CUSP support where i have this wrapper (bicgstab.cu): #include <cusp/csr_matrix.h> #include <cusp/krylov/bicgstab.h> #if defined(__cplusplus) extern "C" { #endif void bicgstab_(int * device_I, int * device_J, float * device_V, float * device_x, float *