- Notifications
You must be signed in to change notification settings - Fork134
CUSP : A C++ Templated Sparse Matrix Library
License
NotificationsYou must be signed in to change notification settings
cusplibrary/cusplibrary
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Linux | Windows | Coverage |
---|---|---|
For more information, see the project documentation atCUSP Website.
#include<cuda.h>#include<thrust/version.h>#include<cusp/version.h>#include<cusp/hyb_matrix.h>#include<cusp/io/matrix_market.h>#include<cusp/krylov/cg.h>#include<iostream>intmain(void){int cuda_major = CUDA_VERSION /1000;int cuda_minor = (CUDA_VERSION %1000) /10;int thrust_major = THRUST_MAJOR_VERSION;int thrust_minor = THRUST_MINOR_VERSION;int cusp_major = CUSP_MAJOR_VERSION;int cusp_minor = CUSP_MINOR_VERSION; std::cout <<"CUDA v" << cuda_major <<"." << cuda_minor << std::endl; std::cout <<"Thrust v" << thrust_major <<"." << thrust_minor << std::endl; std::cout <<"Cusp v" << cusp_major <<"." << cusp_minor << std::endl;// create an empty sparse matrix structure (HYB format) cusp::hyb_matrix<int,float, cusp::device_memory> A;// load a matrix stored in Matrix-Market formatcusp::io::read_matrix_market_file(A,"./testing/data/laplacian/5pt_10x10.mtx");// allocate storage for solution (x) and right hand side (b) cusp::array1d<float, cusp::device_memory>x(A.num_rows,0); cusp::array1d<float, cusp::device_memory>b(A.num_rows,1);// solve the linear system A * x = b with the conjugate gradient methodcusp::krylov::cg(A, x, b);return0;}
CUSP is a header-only library. To compile this example clone both CUSP andNvidia/cccl:
git@github.com:cusplibrary/cusplibrary.gitcd cusplibrarygit clone git@github.com:NVIDIA/cccl.gitnvcc -Icccl/thrust -Icccl/libcudacxx/include -Icccl/cub -I. example.cu -o example
CUSP releases are labeled using version identifiers having three fields:
Date | Version | Date | Version |
---|---|---|---|
03/13/2015 | CUSP v0.5.0 | ||
08/30/2013 | CUSP v0.4.0 | ||
03/08/2012 | CUSP v0.3.1 | ||
02/04/2012 | CUSP v0.3.0 | ||
05/30/2011 | CUSP v0.2.0 | ||
04/28/2015 | CUSP v0.5.1 | 07/10/2010 | CUSP v0.1.0 |
CUSP is developed as an open-source project byNVIDIA Research.Nathan Bell was the original creator andSteven Dalton is the current primary contributor.
CUSP is available under the Apache v2.0 open sourceLICENSE
@MISC{Cusp, author ="Steven Dalton and Nathan Bell and Luke Olson and Michael Garland", title ="Cusp: Generic Parallel Algorithms for Sparse Matrix and Graph Computations", year ="2014", url ="http://cusplibrary.github.io/", note ="Version 0.5.0"}
About
CUSP : A C++ Templated Sparse Matrix Library
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors9
Uh oh!
There was an error while loading.Please reload this page.