matrix multiplication for integral types using BLAS

十年热恋 提交于 2019-12-23 12:56:30

问题


Is there an equivalent of dgemm (from BLAS) for integral types? I only know of dgemm, sgemm for double precision / single precision matrices, but would like to have it for matrices that are of integral type such as int (or short int...).

Note: I'm not looking for a solution that involves converting to float/double, and am looking for a fast library implementation.

Also, same question for dgemms (using strassen algorithm).


回答1:


BLAS algorithms don't natively support integer types.




回答2:


You did not specify a programming language. In C++, you could interface with a matrix library such as Eigen (disclaimer: I'm associated with this project). Eigen uses vectorization so it should be pretty fast - make sure you enable vectorization - but I didn't do any experiments so I'm not sure. There are some complicated alignment issues that may be a problem for you, but I'm not familiar with them.

This SO question discusses various C++ matrix libraries, mainly in the context of computer graphics.



来源:https://stackoverflow.com/questions/1830118/matrix-multiplication-for-integral-types-using-blas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!