首页 > 代码库 > 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(_
N
: Int32,
_ alpha
: Float,
_ X
: UnsafeMutablePointer<Float>,
_ incX
: Int32)
OBJECTIVE-C
void catlas_sset ( const int __N, const float __alpha, float *__X, const int __incX );
Parameters
N | The number of elements in the vector. |
alpha | The new value. |
X | The vector to modify. |
incX | Stride within |
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(_
N
: Int32,
_ alpha
: Float,
_ X
: UnsafePointer<Float>,
_ incX
: Int32,
_ Y
: UnsafeMutablePointer<Float>,
_ incY
: Int32)
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 | Input vector |
incX | Stride within |
Y | Input vector |
incY | Stride within |
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