Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no implementation of the addition operation for compressed matrices #259

Open
aaamourao opened this issue Mar 17, 2018 · 4 comments

Comments

@aaamourao
Copy link

Hi, I want to sum two compressed matrices, but it seems that there is no operator+ or operator+= implemented for them:

viennacl::compressed_matrix<float> a(3, 3);
viennacl::compressed_matrix<float> b(3, 3);

// Considering it is not using GPU for this toy example, so I can allocate
// dynamic memory on the device
x(1,1) = 1.0f;
y(1,2) = 2.0f;

// The same occurs for x += y;
x = x + y;

I got the following error:

error: no match for ‘operator+’ (operand types are ‘viennacl::compressed_matrix’ and
‘viennacl::compressed_matrix’)
91 x = x + y;
92 ~~^~~

I'm using ViennaCL with OpenCL.

@karlrupp
Copy link
Collaborator

Yes, there is indeed no summation implemented yet. It will be added in the not too distant future.

@aaamourao
Copy link
Author

Thanks for the quick answer, @karlrupp

@aaamourao
Copy link
Author

@karlrupp The methods begin1(), begin2(), end1() and end2() are not available for compressed matrices. Will it be added in the future too? Should I open an issue for that?

@karlrupp
Copy link
Collaborator

@madc0ww The issue with .begin1(), .begin2(), end1() and end2() on compressed matrices in the context of ViennaCL is that they are very inefficient and are likely to cause a lot of trouble for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants