简体   繁体   English

用MKL减去两个矩阵

[英]Subtracting two matrices with MKL

I am unable to find out which function to use in MKL for subtracting two 1D matrices (ex. Y = A - B). 我无法找出在MKL中使用哪个函数来减去两个1D矩阵(例如Y = A-B)。

I went over the documentation related to multiplying matrices ( http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/tutorials/mkl_mmx_c/GUID-36BFBCE9-EB0A-43B0-ADAF-2B65275726EA.htm ) but there doesn't seem to be any addition/subtraction examples out there. 我查看了与乘法矩阵相关的文档( http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/tutorials/mkl_mmx_c/GUID-36BFBCE9-EB0A-43B0-ADAF-2B65275726EA.htm )但似乎没有任何加法/减法的例子。

对于密集矩阵,您总是将矩阵分配为长度为n*m的向量,因此您使用相应的BLAS 1级例程,例如: SAXPY(N,SA,SX,INCX,SY,INCY) <==> y = alpha*x+y

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM