学习BLAS库 -- COPY

这篇博客介绍了BLAS库中COPY函数的基本用法,包括其函数语法和参数含义。COPY函数用于将一个向量X复制到另一个向量Y,属于BLAS级别1的功能。文中还提到了如何使用f2c转换出dcopy函数的代码。
摘要由CSDN通过智能技术生成

函数语法: 

    XCOPY(  N,  X, INCX,  Y,  INCY)  

功能

        COPY copies a vector X to a vector Y.

        BLAS level 1 function

参数

      Input, int N, the number of elements in DX and DY.
      Input, double  X[*], the first vector.
      Input, int  incX, the increment between successive entries of  X.
      Output, double Y[*], the second vector.
      Input, int incY, the increment between successive entries of  Y. 

void cblas_dcopy(const int N, const double *X, const int incX, double *Y,
		const int incY)
{

	if (N <= 0)
	{
		return;
	}
	//
	//        code for unequal increments or equal increments
	//          not equal to 1
	//
	int i;
	if ((incX != 1) || (incY != 1)
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值