Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Wolfram_R_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-09-2014
02:22 PM

31 Views

mkl_?csradd

Dear all

looks as if I need to use mkl_?csradd (C++).

However, my csr matrix is zero based; mkl_?csradd does only support one based sparse matrices.

I would appreciate any suggestions for a pragmatic solution.

A simple application example of mkl_?csradd would be nice, too.

Kind regards

Wolfram

Link Copied

1 Reply

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-09-2014
03:38 PM

31 Views

I cannot help you as to zero-based indexing, other than to point out something for you to consider: although some programming languages default to zero-based indexing, in mathematics and physics it is more common to use 1-based indices. For example, we use *x*_{1}, *x*_{2} and *x*_{3} as position coordinates rather than *x*_{0}, *x*_{1} and *x _{2 }*. What are the natural indices in your subject domain?

MKL provides the following Fortran examples in examples_core.zip:

spblasf/source/zcsr_addition.f

spblasf/source/dcsr_addition.f

spblasf/source/scsr_addition.f

spblasf/source/ccsr_addition.f

As it is, addition of sparse matrices is not a complicated subject. An entry in the result matrix C is non-zero if either or both of the corresponding entries in A and B are non-zero. If only one of the two is non-zero, we copy the value to C; when both are non-zero, we place the sum in C.

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

For more complete information about compiler optimizations, see our Optimization Notice.