can someone help me ?
I need to use lapack functions is C.
for example,
dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) for matrix vector multiplication or
dgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info) for LS solution using QR factorization,
Can someone inform me
how to define the 2 D array and 1 D array correctly ?formatrix a and vector b in above functions ?
I was using one - d array instead of 2 -d like
a[100] instead of a[10][10] and put the elements in a[100] as column based format and used for above functions,
dgemv worked but dgels give me segmentation faults error.
Thank you.
Joon.
I need to use lapack functions is C.
for example,
dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) for matrix vector multiplication or
dgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info) for LS solution using QR factorization,
Can someone inform me
how to define the 2 D array and 1 D array correctly ?formatrix a and vector b in above functions ?
I was using one - d array instead of 2 -d like
a[100] instead of a[10][10] and put the elements in a[100] as column based format and used for above functions,
dgemv worked but dgels give me segmentation faults error.
Thank you.
Joon.
連結已複製
3 回應
Quoting - kimjoonshikgmail.com
can someone help me ?
I need to use lapack functions is C.
for example,
dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) for matrix vector multiplication or
dgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info) for LS solution using QR factorization,
Can someone inform me
how to define the 2 D array and 1 D array correctly ?formatrix a and vector b in above functions ?
I was using one - d array instead of 2 -d like
a[100] instead of a[10][10] and put the elements in a[100] as column based format and used for above functions,
dgemv worked but dgels give me segmentation faults error.
Thank you.
Joon.
I need to use lapack functions is C.
for example,
dgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy) for matrix vector multiplication or
dgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info) for LS solution using QR factorization,
Can someone inform me
how to define the 2 D array and 1 D array correctly ?formatrix a and vector b in above functions ?
I was using one - d array instead of 2 -d like
a[100] instead of a[10][10] and put the elements in a[100] as column based format and used for above functions,
dgemv worked but dgels give me segmentation faults error.
Thank you.
Joon.
this example should help.
A.
The example relates to statically allocated arrays, it won't work for malloc()ed data. Similar question was asked with respect to 2D Fourier transforms.
Thanks
Dima