Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

bug in cblas_sscal ( ) ?

Customer__Intel4
Beginner
283 Views
Hi
I discovered that when usingcblas_sscal ( ) to scale an array to zero values, sometimes ( not every time) an entry of the array after scaling becomes nan. The command simply reads:cblas_sscal(L, 0.0, A, 1); where L is the length of the array A.
0 Kudos
3 Replies
TimP
Black Belt
283 Views
cblas_sscal() requires a float constant. If you have a correct prototype in scope (by the supplied include files), the compiler would take care of cast from the double value you supplied.
0 Kudos
Chao_Y_Intel
Moderator
283 Views

Hi,
If input the data type is no problem, it needs a test code that could show thi problem. Feel free to post here if you have.

Thanks,
Chao

0 Kudos
Murat_G_Intel
Employee
283 Views
If your input array A contains NaNs, then scaling a NaN value with 0.0 will still give a NaN.
0 Kudos
Reply