blas
in package
OpenBlas
php interface for OpenBLAS
Tags
Table of Contents
- CblasColMajor = 102
- CblasConjTrans = 113
- CblasLeft = 141
- CblasLower = 122
- CblasNonUnit = 131
- CblasNoTrans = 111
- CblasRight = 142
- CblasRowMajor = 101
- CblasTrans = 112
- CblasUnit = 132
- CblasUpper = 121
- $ffi_blas : mixed
- asum() : float
- Calculates the sum of the absolute values of each component of the vector.
- axpy() : mixed
- Add vectors Y := alpha * X + Y
- copy() : mixed
- Copy the vector from X to Y.
- dot() : mixed
- drotg() : mixed
- Give the point P (a, b).
- gbmv() : mixed
- Compute the product of a general matrix and a vector stored in band format.
- gemm() : CData
- Product of general matrix and general matrix C := alpha * AB + beta * C
- gemv() : CData
- ger() : void
- Compute the product of a column vector and a row vector. (Real number) A := alpha * x y^t + A
- getConfig() : mixed
- getCoreName() : mixed
- getNumParallel() : int
- getNumPorcs() : int
- getNumThreads() : int
- init() : mixed
- max() : int
- Calculates the index of the element with the largest absolute value in the vector.
- min() : int
- Calculates the index of the element with the smallest absolute value in the vector.
- nrm2() : float
- Compute the Euclidean norm of a vector.
- rotate() : mixed
- Rotate about a given point.
- scale() : CData
- Multiply vector by scalar.
- setNumThreads() : mixed
- srotg() : mixed
- swap() : mixed
- Exchange the contents of the vector.
- symm() : mixed
- Product of symmetric matrix and general matrix C := alpha * AB + beta * C or C := alpha * BA + beta * C
- syr2k() : mixed
- Update rank 2k of symmetric matrix C := alpha * A B^T + alpha B A^T + beta * C or C := alpha * B^T A + alpha A^T B + beta * C
- syrk() : mixed
- Update rank n of symmetric matrix C := alpha * A A^T + beta * C or C := alpha * A^T A + beta * C
Constants
CblasColMajor
public
mixed
CblasColMajor
= 102
CblasConjTrans
public
mixed
CblasConjTrans
= 113
CblasLeft
public
mixed
CblasLeft
= 141
CblasLower
public
mixed
CblasLower
= 122
CblasNonUnit
public
mixed
CblasNonUnit
= 131
CblasNoTrans
public
mixed
CblasNoTrans
= 111
CblasRight
public
mixed
CblasRight
= 142
CblasRowMajor
public
mixed
CblasRowMajor
= 101
CblasTrans
public
mixed
CblasTrans
= 112
CblasUnit
public
mixed
CblasUnit
= 132
CblasUpper
public
mixed
CblasUpper
= 121
Properties
$ffi_blas
public
static mixed
$ffi_blas
= null
Methods
asum()
Calculates the sum of the absolute values of each component of the vector.
public
static asum(vector $v) : float
ret := |x_1| + ... + |x_n|
Parameters
- $v : vector
-
Vector X buffer @return float
Return values
float —axpy()
Add vectors Y := alpha * X + Y
public
static axpy(float $alpha, vector $vect_X, vector $vect_Y) : mixed
@param float $alpha Coefficient of scalar multiple of X vector
Parameters
- $alpha : float
- $vect_X : vector
-
Vector X buffer @param \Np\vector $vect_Y Vector Y buffer @return void
- $vect_Y : vector
Return values
mixed —copy()
Copy the vector from X to Y.
public
static copy(vector $vect_X, vector $vect_Y[, int $invX = 1 ][, int $invY = 1 ]) : mixed
Y := X
Parameters
- $vect_X : vector
-
Vector X buffer @param \Np\vector $vect_Y Vector Y buffer @param int $invX @param int $invY @return void
- $vect_Y : vector
- $invX : int = 1
- $invY : int = 1
Return values
mixed —dot()
public
static dot(vector $v1, vector $v2) : mixed
Parameters
Tags
Return values
mixed —drotg()
Give the point P (a, b).
public
static drotg(float $a, float $b, float $c, float $s) : mixed
Rotate this point to givens and calculate the parameters a, b, c, and s to make the y coordinate zero. Conditions description: c * a + s * b = r -s * a + c * b = 0 r = ||(a,b)|| c^2 + s^2 = 1 z=s if |a| > |b| z=1/c if |a| <= |b| and c != 0 and r != 0 Find r, z, c, s that satisfies the above description. However, when r = 0, z = 0, c = 1, and s = 0 are returned. Also, if c = 0, | a | <= | b | and c! = 0 and r! = 0, z = 1 is returned.
Parameters
- $a : float
-
X-coordinate of P: The calculated r value is stored and returned @param float $b Y-coordinate of P: The calculated z value is stored and returned @param float $c Stores the calculated value of c @param float $s Stores the calculated value of s @return void
- $b : float
- $c : float
- $s : float
Return values
mixed —gbmv()
Compute the product of a general matrix and a vector stored in band format.
public
static gbmv(int $KL, int $KU, float $alpha, float $beta, matrix $matrix, vector $vector, vector $mvr) : mixed
y := alpha * Ax + beta * y
Parameters
- $KL : int
-
Number of elements in the lower left part
- $KU : int
-
Number of elements in the upper right part
- $alpha : float
-
Coefficient of scalar multiple of vector
- $beta : float
-
Coefficient of scalar multiple of mvr
- $matrix : matrix
- $vector : vector
- $mvr : vector
Return values
mixed —gemm()
Product of general matrix and general matrix C := alpha * AB + beta * C
public
static gemm(matrix $m1, matrix $m2, matrix $mr[, int $trans1 = self::CblasNoTrans ][, int $trans2 = self::CblasNoTrans ]) : CData
Parameters
- $m1 : matrix
- $m2 : matrix
- $mr : matrix
- $trans1 : int = self::CblasNoTrans
- $trans2 : int = self::CblasNoTrans
Tags
Return values
CData —gemv()
public
static gemv(matrix $m, vector $v, vector $mvr) : CData
Parameters
Tags
Return values
CData —ger()
Compute the product of a column vector and a row vector. (Real number) A := alpha * x y^t + A
public
static ger(vector $v1, vector $v2, matrix $m) : void
Parameters
Return values
void —getConfig()
public
static getConfig() : mixed
Return values
mixed —getCoreName()
public
static getCoreName() : mixed
Return values
mixed —getNumParallel()
public
static getNumParallel() : int
Return values
int —getNumPorcs()
public
static getNumPorcs() : int
Return values
int —getNumThreads()
public
static getNumThreads() : int
Return values
int —init()
public
static init() : mixed
Return values
mixed —max()
Calculates the index of the element with the largest absolute value in the vector.
public
static max(vector $v) : int
Note that this subscript starts from 1. If 0 is returned, n is invalid. ret := arg max |X(i)|
Parameters
- $v : vector
Return values
int —index of the element(Note that start from 0 according to cblas)
min()
Calculates the index of the element with the smallest absolute value in the vector.
public
static min(vector $v) : int
Note that this subscript starts from 1. If 0 is returned, n is invalid. ret := arg min |X(i)|
Parameters
- $v : vector
Return values
int —nrm2()
Compute the Euclidean norm of a vector.
public
static nrm2(vector $v) : float
ret := ||X||
Parameters
- $v : vector
Return values
float —rotate()
Rotate about a given point.
public
static rotate(vector $v1, vector $v2, float $c, float $s) : mixed
X(i) := c * X(i) + s * Y(i) Y(i) :=-s * X(i) + c * Y(i)
Parameters
- $v1 : vector
-
Vector X buffer
- $v2 : vector
-
Vector Y buffer
- $c : float
-
value of cos A(Value obtained with rotg function.)
- $s : float
-
value of sin A(Value obtained with rotg function.)
Return values
mixed —scale()
Multiply vector by scalar.
public
static scale(float $alpha, vector|matrix $v) : CData
Parameters
Return values
CData —setNumThreads()
public
static setNumThreads(int $num_threads) : mixed
Parameters
- $num_threads : int
Return values
mixed —srotg()
public
static srotg(float $a, float $b, float $c, float $s) : mixed
Parameters
- $a : float
- $b : float
- $c : float
- $s : float
Return values
mixed —swap()
Exchange the contents of the vector.
public
static swap(vector $v1, vector $v2[, int $inv1 = 1 ][, int $inv2 = 1 ]) : mixed
X := Y Y := X
Parameters
Return values
mixed —symm()
Product of symmetric matrix and general matrix C := alpha * AB + beta * C or C := alpha * BA + beta * C
public
static symm(matrix $m1, matrix $m2, matrix $mr) : mixed
Parameters
Return values
mixed —syr2k()
Update rank 2k of symmetric matrix C := alpha * A B^T + alpha B A^T + beta * C or C := alpha * B^T A + alpha A^T B + beta * C
public
static syr2k(matrix $m1, matrix $m2, matrix $mr) : mixed
Parameters
Return values
mixed —syrk()
Update rank n of symmetric matrix C := alpha * A A^T + beta * C or C := alpha * A^T A + beta * C
public
static syrk(matrix $m1, matrix $m2) : mixed