- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page