|
| 1 | +/* |
| 2 | +* @license Apache-2.0 |
| 3 | +* |
| 4 | +* Copyright (c) 2024 The Stdlib Authors. |
| 5 | +* |
| 6 | +* Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +* you may not use this file except in compliance with the License. |
| 8 | +* You may obtain a copy of the License at |
| 9 | +* |
| 10 | +* http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +* |
| 12 | +* Unless required by applicable law or agreed to in writing, software |
| 13 | +* distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +* See the License for the specific language governing permissions and |
| 16 | +* limitations under the License. |
| 17 | +*/ |
| 18 | + |
| 19 | +// TypeScript Version: 4.1 |
| 20 | + |
| 21 | +/// <reference types="@stdlib/types"/> |
| 22 | + |
| 23 | +import { Layout, TransposeOperation } from '@stdlib/types/blas'; |
| 24 | + |
| 25 | +/** |
| 26 | +* Interface describing `sgbmv`. |
| 27 | +*/ |
| 28 | +interface Routine { |
| 29 | + /** |
| 30 | + * Performs one of the matrix-vector operations `y := α*A*x + β*y, or y := α*A**T*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors and `A` is an `M` by `N` band matrix, with `KL` sub-diagonals and `KU` super-diagonals. |
| 31 | + * |
| 32 | + * @param order - storage layout |
| 33 | + * @param trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed |
| 34 | + * @param M - number of rows in the matrix `A` |
| 35 | + * @param N - number of columns in the matrix `A` |
| 36 | + * @param KL - number of sub-diagonals of matrix `A` |
| 37 | + * @param KU - number of super-diagonals of matrix `A` |
| 38 | + * @param alpha - scalar constant |
| 39 | + * @param A - input matrix |
| 40 | + * @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) |
| 41 | + * @param x - first input vector |
| 42 | + * @param strideX - `x` stride length |
| 43 | + * @param beta - scalar constant |
| 44 | + * @param y - second input vector |
| 45 | + * @param strideY - `y` stride length |
| 46 | + * @returns `y` |
| 47 | + * |
| 48 | + * @example |
| 49 | + * var Float32Array = require( '@stdlib/array/float32' ); |
| 50 | + * |
| 51 | + * var A = new Float32Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 0.0 ] ); |
| 52 | + * var x = new Float32Array( [ 1.0, 1.0, 1.0 ] ); |
| 53 | + * var y = new Float32Array( [ 0.0, 0.0, 0.0 ] ); |
| 54 | + * |
| 55 | + * sgbmv( 'row-major', 'no-transpose', 3, 3, 1, 1, 1.0, A, 3, x, 1, 1.0, y, 1 ); |
| 56 | + * // y => <Float32Array>[ 7.0, 16.0 ] |
| 57 | + */ |
| 58 | + ( order: Layout, trans: TransposeOperation, M: number, N: number, KL: number, KU: number, alpha: number, A: Float32Array, LDA: number, x: Float32Array, strideX: number, beta: number, y: Float32Array, strideY: number ): Float32Array; |
| 59 | + |
| 60 | + /** |
| 61 | + * Performs one of the matrix-vector operations `y := α*A*x + β*y, or y := α*A**T*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors and `A` is an `M` by `N` band matrix, with `KL` sub-diagonals and `KU` super-diagonals. |
| 62 | + * |
| 63 | + * @param trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed |
| 64 | + * @param M - number of rows in the matrix `A` |
| 65 | + * @param N - number of columns in the matrix `A` |
| 66 | + * @param KL - number of sub-diagonals of matrix `A` |
| 67 | + * @param KU - number of super-diagonals of matrix `A` |
| 68 | + * @param alpha - scalar constant |
| 69 | + * @param A - input matrix |
| 70 | + * @param strideA1 - stride of the first dimension of `A` |
| 71 | + * @param strideA2 - stride of the second dimension of `A` |
| 72 | + * @param offsetA - starting index for `A` |
| 73 | + * @param x - first input vector |
| 74 | + * @param strideX - `x` stride length |
| 75 | + * @param offsetX - starting index for `x` |
| 76 | + * @param beta - scalar constant |
| 77 | + * @param y - second input vector |
| 78 | + * @param strideY - `y` stride length |
| 79 | + * @param offsetY - starting index for `y` |
| 80 | + * @returns `y` |
| 81 | + * |
| 82 | + * @example |
| 83 | + * var Float32Array = require( '@stdlib/array/float32' ); |
| 84 | + * |
| 85 | + * var A = new Float32Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 0.0 ] ); |
| 86 | + * var x = new Float32Array( [ 1.0, 1.0, 1.0 ] ); |
| 87 | + * var y = new Float32Array( [ 0.0, 0.0, 0.0 ] ); |
| 88 | + * |
| 89 | + * sgbmv( 'no-transpose', 3, 3, 1, 1, 1.0, A, 3, 1, 0, x, 1, 0, 1.0, y, 1, 0 ); |
| 90 | + * // y => <Float32Array>[ 7.0, 16.0 ] |
| 91 | + */ |
| 92 | + ndarray( trans: TransposeOperation, M: number, N: number, KL: number, KU: number, alpha: number, A: Float32Array, strideA1: number, strideA2: number, offsetA: number, x: Float32Array, strideX: number, offsetX: number, beta: number, y: Float32Array, strideY: number, offsetY: number ): Float32Array; |
| 93 | +} |
| 94 | + |
| 95 | +/** |
| 96 | +* Performs one of the matrix-vector operations `y := α*A*x + β*y, or y := α*A**T*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors and `A` is an `M` by `N` band matrix, with `KL` sub-diagonals and `KU` super-diagonals. |
| 97 | +* |
| 98 | +* @param order - storage layout |
| 99 | +* @param trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed |
| 100 | +* @param M - number of rows in the matrix `A` |
| 101 | +* @param N - number of columns in the matrix `A` |
| 102 | +* @param KL - number of sub-diagonals of matrix `A` |
| 103 | +* @param KU - number of super-diagonals of matrix `A` |
| 104 | +* @param alpha - scalar constant |
| 105 | +* @param A - input matrix |
| 106 | +* @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) |
| 107 | +* @param x - first input vector |
| 108 | +* @param strideX - `x` stride length |
| 109 | +* @param beta - scalar constant |
| 110 | +* @param y - second input vector |
| 111 | +* @param strideY - `y` stride length |
| 112 | +* @returns `y` |
| 113 | +* |
| 114 | +* @example |
| 115 | +* var Float32Array = require( '@stdlib/array/float32' ); |
| 116 | +* |
| 117 | +* var A = new Float32Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 0.0 ] ); |
| 118 | +* var x = new Float32Array( [ 1.0, 1.0, 1.0 ] ); |
| 119 | +* var y = new Float32Array( [ 0.0, 0.0, 0.0 ] ); |
| 120 | +* |
| 121 | +* sgbmv( 'row-major', 'no-transpose', 3, 3, 1, 1, 1.0, A, 3, x, 1, 1.0, y, 1 ); |
| 122 | +* // y => <Float32Array>[ 7.0, 16.0 ] |
| 123 | +* |
| 124 | +* @example |
| 125 | +* var Float32Array = require( '@stdlib/array/float32' ); |
| 126 | +* |
| 127 | +* var A = new Float32Array( [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 0.0 ] ); |
| 128 | +* var x = new Float32Array( [ 1.0, 1.0, 1.0 ] ); |
| 129 | +* var y = new Float32Array( [ 0.0, 0.0, 0.0 ] ); |
| 130 | +* |
| 131 | +* sgbmv.ndarray( 'no-transpose', 3, 3, 1, 1, 1.0, A, 3, 1, 0, x, 1, 0, 1.0, y, 1, 0 ); |
| 132 | +* // y => <Float32Array>[ 7.0, 16.0 ] |
| 133 | +*/ |
| 134 | +declare var sgbmv: Routine; |
| 135 | + |
| 136 | + |
| 137 | +// EXPORTS // |
| 138 | + |
| 139 | +export = sgbmv; |
0 commit comments