- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps I am not understanding correctly how it should be used, but mkl_?omatadd is not working for me.
I have tried with this test:
auto A = new float[4] {1,2,3,4};
auto B = new float[4] {1,2,3,4};
auto C = new float[4] {-1,-1,-1,-1};
auto E = new float[4] {2,4,6,8};
mkl_somatadd(
CblasRowMajor,
CblasNoTrans,
CblasNoTrans,
2, 2,
1.0, A, 2,
1.0, B, 2,
C, 2
);
ASSERT_THAT(
std::vector<float>(A, A+2*2),
testing::Pointwise(testing::FloatEq(), std::vector<float>(E, E+4))
);
The C matrix is not modified at all. After going through mkl_somatadd, C is still {-1, -1, -1, -1}
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Were there any errors captured by oneMKL error handler?
It might be caused by the wrong setting of the first three parameters. I tried
mkl_somatadd(
'R',
'N',
'N',
2, 2,
1.0, A, 2,
1.0, B, 2,
C, 2
);
and got C={2, 4, 6, 8}.
Thanks,
Fengrui

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