首页 > 代码库 > cblas_saxpy catlas_sset

cblas_saxpy catlas_sset

---恢复内容开始---

from:

https://developer.apple.com/library/ios/documentation/Accelerate/Reference/BLAS_Ref/index.html#//apple_ref/c/func/catlas_sset

https://developer.apple.com/library/ios/documentation/Accelerate/Reference/BLAS_Ref/index.html#//apple_ref/c/func/cblas_saxpy

catlas_sset

Modifies a vector (single-precision) in place, setting each element to a given value.

Declaration

SWIFT

func catlas_sset(NInt32,
               alphaFloat,
               XUnsafeMutablePointer<Float>,
               incXInt32)

OBJECTIVE-C

void catlas_sset const int __Nconst float __alphafloat *__Xconst int __incX );

Parameters

N

The number of elements in the vector.

alpha

The new value.

X

The vector to modify.

incX

Stride within X. For example, if incX is 7, every 7th element is used.

Import Statement

import Accelerate

Availability

Available in iOS 4.0 and later.

 

Single-Precision Float Matrix Functions

Computes a constant times a vector plus a vector (single-precision).

Declaration

SWIFT

func cblas_saxpy(NInt32,
               alphaFloat,
               XUnsafePointer<Float>,
               incXInt32,
               YUnsafeMutablePointer<Float>,
               incYInt32)

OBJECTIVE-C

void cblas_saxpy const int __N

           const float __alpha

           const float *__X

           const int __incX,

           float *__Y

           const int __incY 

          );

Parameters

N

Number of elements in the vectors.

alpha

Scaling factor for the values in X.

X

Input vector X.

incX

Stride within X. For example, if incX is 7, every 7th element is used.

Y

Input vector Y.

incY

Stride within Y. For example, if incY is 7, every 7th element is used.

Discussion

On return, the contents of vector Y are replaced with the result. The value computed is (alpha * X[i]) + Y[i].

Import Statement

import Accelerate

Availability

Available in iOS 4.0 and later.

---恢复内容结束---

cblas_saxpy catlas_sset