Open WenyinWei opened 4 years ago
Hello, Karl, @karlrupp I have some trouble while using element_op functions.
When I use the following command to get the element_geq
, _greater
, _less
and etc, I got the result matrix_expression but I don't know how to handle it. I can't impose copy functions to fetch the result back to CPU or do other things. And I have no idea about what it would return, if 1 for geq, 0 for less or -1 for less?
Assign it to a matrix object, e.g. A = element_geq(B, C);
Yeah, I have tried, but still stuck by a bug.
I tried to select the binary elementwise functions which can work.
element_prod
, _div
, _pow
works,
_eq
, _neq
, _greater
, etc. don't work.
Uh, then I guess that these other operators have not been implemented for matrices yet.
Uh, Karl, I found that arctan function works well. Maybe that could serve as a temporary workaround, but just temp.
Hello Karl, would you mind requesting the original maintainers to have a minor update? Though atan function serves as a kind of workaround, it sacrifices too much performance.
Here is my test error of viennacl::linalg::element_abs on matrix.
Hello @karlrupp , may I ask about whether viennacl is not maintained anymore and shall I turn to PETSc?
As I said, element_abs is not implemented for matrices yet. Thus, this is not a question about maintenance, but a feature request ;-)
Do you need abs
for the full matrix, or just for a submatrix? For a full matrix you could reuse the existing vector kernels (I can show you how to do it).
Yeah, Karl, I would appreciate it if you could show me how to do that when you are free. It would be better if the trick is generic for geq
and max
.
Hello Karl,
I am looking for the elementwise operation for a quick initialization of matrices on the GPU. And I found that viennacl uses the compile-time definitions to make these functions matrix_operations.hpp, line 701-825 . It is pretty concise, yeah, but it really needs a tutorial or some like that to illustrate how to use these functions. They even do not appear in the doxygen document that new comers would have no idea about how to do the function.
Best wishes, Wenyin