GPU sparse, accumarray, non-uniform grid
bare-bone interface with cusp sparse class for gpus,
support for single precision, real/complex.
Usage:
A=gcsparse(B,[format: 0=coo, 1=csr]);
or
A=gcsparse(col,row,val,[nrows,[ncols,[format]]]);
input B is a matlab array, sparse array or gcarray.
overloaded operators:
ctranspose: B=A.';
transpose: B=A';
multiply: x=A*y; (spmv)
format conversion:
B=real(A);A=complex(B);B=gcsparse(A,format);
rowptr= ptr2row(A);
row =grow2ptr(A);
examples:
real/complex speed test: testgsparse.m
accumarray: testRadavg.m
stencils: testgnufft.m (radon trasform example)
Notes:
format conversion row2ptr and ptr2row is unstable inside a function call. (the reason why is a mystery to me).
Citar como
Stefano (2024). GPU sparse, accumarray, non-uniform grid (https://www.mathworks.com/matlabcentral/fileexchange/44423-gpu-sparse-accumarray-non-uniform-grid), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.5.0.0 | reduced number of copies during format conversion,
|
||
1.4.0.0 | added density compensation function for gnufft/gnuradon/gnuiradon. |
||
1.3.0.0 | fixed bug in gnufft |
||
1.2.0.0 | added class description |