使用BLAS进行积分类型的矩阵乘法 [英] matrix multiplication for integral types using BLAS

查看:260
本文介绍了使用BLAS进行积分类型的矩阵乘法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于整数类型,是否有相当于dgemm(来自BLAS)?
我只知道dgemm,sgemm用于双精度/单精度矩阵,但是想要它用于整数类型的矩阵,如int(或short int ...)。

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...).

注意:我不是在寻找一个涉及转换为float / double的解决方案,而是在寻找快速的库实现。

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

此外,dgemms的相同问题(使用strassen算法)。

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

推荐答案

您没有指定编程语言。在C ++中,您可以使用矩阵库进行交互,例如 Eigen (免责声明:我与这个项目有关)。 Eigen使用矢量化所以它应该非常快 - 确保你启用矢量化 - 但我没有做任何实验,所以我不确定。有一些复杂的对齐问题可能对您有问题,但我是不熟悉它们。

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.

这个SO问题讨论了各种C ++矩阵库,主要是在计算机图形学的背景下。

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

这篇关于使用BLAS进行积分类型的矩阵乘法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆