diff --git a/CHANGELOG.md b/CHANGELOG.md
index 990b731ad..9d1aba447 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@
##### Features
+- [`31aa8db`](https://github.com/stdlib-js/stdlib/commit/31aa8dbfb2c0a722710adc8a399e703b224cadab) - add `transposeOperations` to namespace
- [`378240f`](https://github.com/stdlib-js/stdlib/commit/378240f1bb93253435f89aec4d5c7ce64eae4703) - update namespace
@@ -629,6 +630,7 @@ This release closes the following issue:
##### Bug Fixes
+- [`258cc06`](https://github.com/stdlib-js/stdlib/commit/258cc060947be206b283ff4d066953dcebb0143f) - assign enum values to CBLAS compatible aliases
- [`0992fe2`](https://github.com/stdlib-js/stdlib/commit/0992fe22060cb8f860cfd9e8f590d4c7a83c7287) - replace semicolons with commas
@@ -675,6 +677,28 @@ This release closes the following issue:
+
+
+#### [@stdlib/blas/base/transpose-operations](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/transpose-operations)
+
+
+
+
+
+##### Features
+
+- [`87a0d77`](https://github.com/stdlib-js/stdlib/commit/87a0d77b81cc5bc8c05e40d6ec22f548c5d3dd14) - add `blas/base/transpose-operations`
+
+
+
+
+
+
+
+
+
+
+
#### [@stdlib/blas/base/xerbla](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/xerbla)
@@ -1517,6 +1541,10 @@ A total of 35 people contributed to this release. Thank you to the following con
+- [`73cf5f1`](https://github.com/stdlib-js/stdlib/commit/73cf5f1bb0dba7e320518e6b530a98004ef86aef) - **refactor:** assign enum values to CBLAS compatible aliases _(by Athan Reines)_
+- [`258cc06`](https://github.com/stdlib-js/stdlib/commit/258cc060947be206b283ff4d066953dcebb0143f) - **fix:** assign enum values to CBLAS compatible aliases _(by Athan Reines)_
+- [`31aa8db`](https://github.com/stdlib-js/stdlib/commit/31aa8dbfb2c0a722710adc8a399e703b224cadab) - **feat:** add `transposeOperations` to namespace _(by Athan Reines)_
+- [`87a0d77`](https://github.com/stdlib-js/stdlib/commit/87a0d77b81cc5bc8c05e40d6ec22f548c5d3dd14) - **feat:** add `blas/base/transpose-operations` _(by Athan Reines)_
- [`85ec173`](https://github.com/stdlib-js/stdlib/commit/85ec1734c06b80b13eb607576e592414047c90a7) - **remove:** delete `blas/base/orders` _(by Athan Reines)_
- [`c61cc17`](https://github.com/stdlib-js/stdlib/commit/c61cc17ca682a9dfe76246ab9dc852c0044c6cbf) - **refactor:** migrate to `blas/base/layouts` _(by Athan Reines)_
- [`0c3213e`](https://github.com/stdlib-js/stdlib/commit/0c3213e4e3219c0574d0c49e2486db1ac714c952) - **fix:** rename `orders` to `layouts` _(by Athan Reines)_
diff --git a/base/lib/index.js b/base/lib/index.js
index b19535de2..1f028ec86 100644
--- a/base/lib/index.js
+++ b/base/lib/index.js
@@ -333,6 +333,15 @@ setReadOnly( blas, 'sscal', require( './../../base/sscal' ) );
*/
setReadOnly( blas, 'sswap', require( './../../base/sswap' ) );
+/**
+* @name transposeOperations
+* @memberof blas
+* @readonly
+* @type {Function}
+* @see {@link module:@stdlib/blas/base/transpose-operations}
+*/
+setReadOnly( blas, 'transposeOperations', require( './../../base/transpose-operations' ) );
+
/**
* @name zcopy
* @memberof blas
diff --git a/base/shared/include/stdlib/blas/base/shared/cblas.h b/base/shared/include/stdlib/blas/base/shared/cblas.h
index 6358f17c4..e58e7468f 100644
--- a/base/shared/include/stdlib/blas/base/shared/cblas.h
+++ b/base/shared/include/stdlib/blas/base/shared/cblas.h
@@ -23,6 +23,7 @@
#include
#include
#include "stdlib/blas/base/orders.h"
+#include "stdlib/blas/base/transpose_operations.h"
/*
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.
@@ -65,20 +66,26 @@ extern "C" {
// Array storage layout:
#ifndef CBLAS_LAYOUT
-typedef STDLIB_BLAS_LAYOUT CBLAS_LAYOUT;
+typedef enum CBLAS_LAYOUT {
+ // Row-major order (C-style):
+ CblasRowMajor = STDLIB_BLAS_ROW_MAJOR,
+
+ // Column-major order (Fortran-style):
+ CblasColMajor = STDLIB_BLAS_COLUMN_MAJOR,
+} CBLAS_LAYOUT;
#endif
// Transpose operation:
#ifndef CBLAS_TRANSPOSE
typedef enum CBLAS_TRANSPOSE {
// No transposition:
- CblasNoTrans = 111,
+ CblasNoTrans = STDLIB_BLAS_NO_TRANSPOSE,
// Transposition:
- CblasTrans = 112,
+ CblasTrans = STDLIB_BLAS_TRANSPOSE,
// Conjugate transposition:
- CblasConjTrans = 113,
+ CblasConjTrans = STDLIB_BLAS_CONJUGATE_TRANSPOSE,
} CBLAS_TRANSPOSE;
#endif
diff --git a/base/shared/manifest.json b/base/shared/manifest.json
index 880829967..b8e8beb87 100644
--- a/base/shared/manifest.json
+++ b/base/shared/manifest.json
@@ -33,7 +33,8 @@
"libraries": [],
"libpath": [],
"dependencies": [
- "@stdlib/blas/base/layouts"
+ "@stdlib/blas/base/layouts",
+ "@stdlib/blas/base/transpose-operations"
]
}
]
diff --git a/base/transpose-operations/README.md b/base/transpose-operations/README.md
new file mode 100644
index 000000000..f0a6823fa
--- /dev/null
+++ b/base/transpose-operations/README.md
@@ -0,0 +1,188 @@
+
+
+# Transpose Operations
+
+> BLAS transpose operations.
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var transposeOperations = require( '@stdlib/blas/base/transpose-operations' );
+```
+
+#### transposeOperations()
+
+Returns a list of BLAS transpose operations.
+
+```javascript
+var out = transposeOperations();
+// e.g., returns [ 'none', 'transpose', 'conjugate-transpose' ]
+```
+
+The output array contains the following operations:
+
+- `none`: no transposition.
+- `transpose`: transposition.
+- `conjugate-transpose`: conjugate transposition.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var contains = require( '@stdlib/array/base/assert/contains' ).factory;
+var transposeOperations = require( '@stdlib/blas/base/transpose-operations' );
+
+var isOp = contains( transposeOperations() );
+
+var bool = isOp( 'transpose' );
+// returns true
+
+bool = isOp( 'conjugate-transpose' );
+// returns true
+
+bool = isOp( 'beep' );
+// returns false
+```
+
+
+
+
+
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+#include "stdlib/blas/base/transpose_operations.h"
+```
+
+#### STDLIB_BLAS_TRANSPOSE_OPERATION
+
+An enumeration of BLAS transpose operations with the following fields:
+
+- **STDLIB_BLAS_NO_TRANSPOSE**: no transposition.
+- **STDLIB_BLAS_TRANSPOSE**: transposition.
+- **STDLIB_BLAS_CONJUGATE_TRANSPOSE**: conjugate transposition.
+
+```c
+#include "stdlib/blas/base/transpose_operations.h"
+
+const enum STDLIB_BLAS_TRANSPOSE_OPERATION op = STDLIB_BLAS_TRANSPOSE;
+```
+
+
+
+
+
+
+
+
+
+### Notes
+
+- Enumeration constants should be considered opaque values, and one should **not** rely on specific integer values.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/base/transpose-operations/benchmark/benchmark.js b/base/transpose-operations/benchmark/benchmark.js
new file mode 100644
index 000000000..5fd5f7fc2
--- /dev/null
+++ b/base/transpose-operations/benchmark/benchmark.js
@@ -0,0 +1,48 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var isStringArray = require( '@stdlib/assert/is-string-array' ).primitives;
+var pkg = require( './../package.json' ).name;
+var ops = require( './../lib' );
+
+
+// MAIN //
+
+bench( pkg, function benchmark( b ) {
+ var out;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ out = ops();
+ if ( out.length < 2 ) {
+ b.fail( 'should return an array' );
+ }
+ }
+ b.toc();
+ if ( !isStringArray( out ) ) {
+ b.fail( 'should return an array of strings' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/base/transpose-operations/docs/repl.txt b/base/transpose-operations/docs/repl.txt
new file mode 100644
index 000000000..232752a45
--- /dev/null
+++ b/base/transpose-operations/docs/repl.txt
@@ -0,0 +1,23 @@
+
+{{alias}}()
+ Returns a list of transpose operations.
+
+ The output array contains the following operations:
+
+ - none: no transposition.
+ - transpose: transposition.
+ - conjugate-transpose: conjugate transposition.
+
+ Returns
+ -------
+ out: Array
+ List of operations.
+
+ Examples
+ --------
+ > var out = {{alias}}()
+ [ 'none', 'transpose', 'conjugate-transpose' ]
+
+ See Also
+ --------
+
diff --git a/base/transpose-operations/docs/types/index.d.ts b/base/transpose-operations/docs/types/index.d.ts
new file mode 100644
index 000000000..63deecf47
--- /dev/null
+++ b/base/transpose-operations/docs/types/index.d.ts
@@ -0,0 +1,35 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+// TypeScript Version: 4.1
+
+/**
+* Returns a list of transpose operations.
+*
+* @returns list of transpose operations
+*
+* @example
+* var list = transposeOperations();
+* // e.g., returns [ 'none', 'transpose', 'conjugate-transpose' ]
+*/
+declare function transposeOperations(): Array;
+
+
+// EXPORTS //
+
+export = transposeOperations;
diff --git a/base/transpose-operations/docs/types/test.ts b/base/transpose-operations/docs/types/test.ts
new file mode 100644
index 000000000..fffc6e734
--- /dev/null
+++ b/base/transpose-operations/docs/types/test.ts
@@ -0,0 +1,32 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import transposeOperations = require( './index' );
+
+
+// TESTS //
+
+// The function returns an array of strings...
+{
+ transposeOperations(); // $ExpectType string[]
+}
+
+// The compiler throws an error if the function is provided any arguments...
+{
+ transposeOperations( 9 ); // $ExpectError
+}
diff --git a/base/transpose-operations/examples/index.js b/base/transpose-operations/examples/index.js
new file mode 100644
index 000000000..e31a30d6a
--- /dev/null
+++ b/base/transpose-operations/examples/index.js
@@ -0,0 +1,36 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+var contains = require( '@stdlib/array/base/assert/contains' ).factory;
+var transposeOperations = require( './../lib' );
+
+var isOp = contains( transposeOperations() );
+
+var bool = isOp( 'transpose' );
+console.log( bool );
+// => true
+
+bool = isOp( 'conjugate-transpose' );
+console.log( bool );
+// => true
+
+bool = isOp( 'beep' );
+console.log( bool );
+// => false
diff --git a/base/transpose-operations/include/stdlib/blas/base/transpose_operations.h b/base/transpose-operations/include/stdlib/blas/base/transpose_operations.h
new file mode 100644
index 000000000..ecda6168c
--- /dev/null
+++ b/base/transpose-operations/include/stdlib/blas/base/transpose_operations.h
@@ -0,0 +1,36 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef STDLIB_BLAS_BASE_TRANSPOSE_OPERATIONS_H
+#define STDLIB_BLAS_BASE_TRANSPOSE_OPERATIONS_H
+
+/**
+* Enumeration of array transpose operations.
+*/
+enum STDLIB_BLAS_TRANSPOSE_OPERATION {
+ // No transposition:
+ STDLIB_BLAS_NO_TRANSPOSE = 111,
+
+ // Transposition:
+ STDLIB_BLAS_TRANSPOSE = 112,
+
+ // Conjugate transposition:
+ STDLIB_BLAS_CONJUGATE_TRANSPOSE = 113
+};
+
+#endif // !STDLIB_BLAS_BASE_TRANSPOSE_OPERATIONS_H
diff --git a/base/transpose-operations/lib/enum.js b/base/transpose-operations/lib/enum.js
new file mode 100644
index 000000000..1f49e2d74
--- /dev/null
+++ b/base/transpose-operations/lib/enum.js
@@ -0,0 +1,54 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MAIN //
+
+/**
+* Returns an object mapping supported transpose operations to integer values for purposes of C inter-operation.
+*
+* ## Notes
+*
+* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `transpose == 112`). Instead, the object should be used in an opaque manner.
+* - The main purpose of this function is JavaScript and C inter-operation of array objects.
+*
+* @returns {Object} object mapping supported transpose operations to integer values
+*
+* @example
+* var table = enumerated();
+* // returns