Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
-
Noran
- Posts: 27
- Joined: Fri Sep 26, 2014 3:47 am
Post
by Noran » Thu Nov 13, 2014 9:55 am
Hello @ all,
afteri used the sparse algorithms from magmasome time, i get stucked with the folowing struct:
Code: Select all
typedef struct magma_s_vector{
magma_location_t memory_location;
magma_int_t num_rows;
magma_int_t nnz;
float *val;
}magma_s_vector;
Shouldn't there be an information in the struct where are the non-zero Elements are located? Or how is it done?
Greetz Noran
-
hartwig anzt
- Posts: 90
- Joined: Tue Sep 02, 2014 5:44 pm
Post
by hartwig anzt » Thu Nov 13, 2014 10:27 am
Noran,
in the current release, the nnz information is completely useless - redundant to num_rows. In the next release (scheduled for hopefully tomorrow) the vectors have an additional num_cols such that you can handle blocks of vectors simultaneously in SpMVs - becoming SpMMs then. You may still argue that the nnz information is useless as it will be num_rows * num_cols, but we have plans to have a more sophisticated structure in future, so we already want to keep them.
Hope this helps, and maybe you should use the new release as soon as possible, as we removed quite some issues (also the bugs reported by you - Thanks!)
Hartwig
-
Noran
- Posts: 27
- Joined: Fri Sep 26, 2014 3:47 am
Post
by Noran » Thu Nov 13, 2014 2:33 pm
I think you may missunderstood me. How can I distinguish for example the vector [1 0 0 0] from [0 1 0 0]. Shouldn't there be a second vector with the columnpointers? Or store i all values inclusive the zeros in the vector val
Greetz Noran
-
hartwig anzt
- Posts: 90
- Joined: Tue Sep 02, 2014 5:44 pm
Post
by hartwig anzt » Thu Nov 13, 2014 2:40 pm
This is what we want to have in Future - but right now, all values (also the zeros) are stored explicitly. For your example,
val = [ 1 0 0 0 ]
and
val = [ 0 1 0 0 ]
respectively.
-
Noran
- Posts: 27
- Joined: Fri Sep 26, 2014 3:47 am
Post
by Noran » Thu Nov 13, 2014 2:57 pm
Great. That was, what i wanted to know :)
Greetz Noran