matrix of all 1s
matrix of all 1s
How do I create an nxn matrix whose entries are all 1's ?
Re: matrix of all 1s
On the CPU, LAPACK's [sdcz]laset function. MAGMA declares these in a separate LAPACK header. For a double precision, M x N matrix A, embedded in an lda x N array:
On the GPU, MAGMA has a similar function, magmablas_[sdcz]laset.
http://icl.cs.utk.edu/projectsfiles/mag ... 663900ae83
-mark
Code: Select all
#include "magma_lapack.h"
void function(...) {
...
double c_one = 1.0;
lapackf77_dlaset( "Full", &M, &N, &c_one, &c_one, A, &lda );
}
http://icl.cs.utk.edu/projectsfiles/mag ... 663900ae83
-mark
Re: matrix of all 1s
I am new to Magma (and to any computer algebra system), and I can't understand this at all. I'm guessing that there is a simple command available to produce an nxn matrix of ones, but I am unable to extract this from the response to my question of how to do it.
Re: matrix of all 1s
Are you using MAGMA, the computer algebra system:
http://magma.maths.usyd.edu.au/magma/
Or MAGMA, the linear algebra C/C++ library?
http://icl.cs.utk.edu/magma/
This forum is for the later, the linear algebra C/C++ library.
-mark
http://magma.maths.usyd.edu.au/magma/
Or MAGMA, the linear algebra C/C++ library?
http://icl.cs.utk.edu/magma/
This forum is for the later, the linear algebra C/C++ library.
-mark