From 33277bb97451af6eee48adfd92bb4ece97c2600c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 5 Jul 2024 18:34:19 +0000 Subject: [PATCH] Auto-generated commit --- .gitattributes | 29 +++- .github/workflows/productionize.yml | 3 - .github/workflows/publish.yml | 5 +- .github/workflows/test.yml | 1 - .github/workflows/test_bundles.yml | 3 - .github/workflows/test_coverage.yml | 1 - .github/workflows/test_install.yml | 1 - CHANGELOG.md | 133 ++++++++++++++++++- CONTRIBUTORS | 11 +- README.md | 55 +++++++- benchmark/benchmark.accessors.js | 2 +- benchmark/benchmark.ndarray.accessors.js | 2 +- examples/accessors.js | 2 +- include/stdlib/strided/base/nullary.h | 2 + include/stdlib/strided/base/nullary/b.h | 2 +- include/stdlib/strided/base/nullary/c.h | 2 +- include/stdlib/strided/base/nullary/c_as_b.h | 2 +- include/stdlib/strided/base/nullary/c_as_f.h | 2 +- include/stdlib/strided/base/nullary/c_as_k.h | 2 +- include/stdlib/strided/base/nullary/c_as_s.h | 2 +- include/stdlib/strided/base/nullary/c_as_t.h | 2 +- include/stdlib/strided/base/nullary/c_as_z.h | 2 +- include/stdlib/strided/base/nullary/d.h | 2 +- include/stdlib/strided/base/nullary/d_as_b.h | 2 +- include/stdlib/strided/base/nullary/d_as_f.h | 2 +- include/stdlib/strided/base/nullary/d_as_i.h | 2 +- include/stdlib/strided/base/nullary/d_as_k.h | 2 +- include/stdlib/strided/base/nullary/d_as_s.h | 2 +- include/stdlib/strided/base/nullary/d_as_t.h | 2 +- include/stdlib/strided/base/nullary/d_as_u.h | 2 +- include/stdlib/strided/base/nullary/f.h | 2 +- include/stdlib/strided/base/nullary/f_as_b.h | 2 +- include/stdlib/strided/base/nullary/f_as_d.h | 2 +- include/stdlib/strided/base/nullary/f_as_k.h | 2 +- include/stdlib/strided/base/nullary/f_as_s.h | 2 +- include/stdlib/strided/base/nullary/f_as_t.h | 2 +- include/stdlib/strided/base/nullary/i.h | 2 +- include/stdlib/strided/base/nullary/i_as_b.h | 2 +- include/stdlib/strided/base/nullary/i_as_k.h | 2 +- include/stdlib/strided/base/nullary/i_as_s.h | 2 +- include/stdlib/strided/base/nullary/i_as_t.h | 2 +- include/stdlib/strided/base/nullary/k.h | 2 +- include/stdlib/strided/base/nullary/k_as_b.h | 2 +- include/stdlib/strided/base/nullary/k_as_s.h | 2 +- include/stdlib/strided/base/nullary/macros.h | 6 +- include/stdlib/strided/base/nullary/s.h | 2 +- include/stdlib/strided/base/nullary/t.h | 2 +- include/stdlib/strided/base/nullary/t_as_b.h | 2 +- include/stdlib/strided/base/nullary/u.h | 2 +- include/stdlib/strided/base/nullary/u_as_b.h | 2 +- include/stdlib/strided/base/nullary/u_as_t.h | 2 +- include/stdlib/strided/base/nullary/x.h | 44 ++++++ include/stdlib/strided/base/nullary/z.h | 2 +- include/stdlib/strided/base/nullary/z_as_b.h | 2 +- include/stdlib/strided/base/nullary/z_as_c.h | 2 +- include/stdlib/strided/base/nullary/z_as_d.h | 2 +- include/stdlib/strided/base/nullary/z_as_f.h | 2 +- include/stdlib/strided/base/nullary/z_as_i.h | 2 +- include/stdlib/strided/base/nullary/z_as_k.h | 2 +- include/stdlib/strided/base/nullary/z_as_s.h | 2 +- include/stdlib/strided/base/nullary/z_as_t.h | 2 +- include/stdlib/strided/base/nullary/z_as_u.h | 2 +- manifest.json | 5 +- package.json | 4 +- scripts/loops.js | 24 +++- scripts/templates/docs.txt | 2 +- src/b.c | 2 +- src/c.c | 6 +- src/c_as_b.c | 4 +- src/c_as_f.c | 4 +- src/c_as_k.c | 4 +- src/c_as_s.c | 4 +- src/c_as_t.c | 4 +- src/c_as_z.c | 8 +- src/d.c | 2 +- src/d_as_b.c | 2 +- src/d_as_f.c | 2 +- src/d_as_i.c | 2 +- src/d_as_k.c | 2 +- src/d_as_s.c | 2 +- src/d_as_t.c | 2 +- src/d_as_u.c | 2 +- src/f.c | 2 +- src/f_as_b.c | 2 +- src/f_as_d.c | 2 +- src/f_as_k.c | 2 +- src/f_as_s.c | 2 +- src/f_as_t.c | 2 +- src/i.c | 2 +- src/i_as_b.c | 2 +- src/i_as_k.c | 2 +- src/i_as_s.c | 2 +- src/i_as_t.c | 2 +- src/k.c | 2 +- src/k_as_b.c | 2 +- src/k_as_s.c | 2 +- src/s.c | 2 +- src/t.c | 2 +- src/t_as_b.c | 2 +- src/u.c | 2 +- src/u_as_b.c | 2 +- src/u_as_t.c | 2 +- src/x.c | 65 +++++++++ src/z.c | 6 +- src/z_as_b.c | 4 +- src/z_as_c.c | 8 +- src/z_as_d.c | 4 +- src/z_as_f.c | 4 +- src/z_as_i.c | 4 +- src/z_as_k.c | 4 +- src/z_as_s.c | 4 +- src/z_as_t.c | 4 +- src/z_as_u.c | 4 +- test/test.main.js | 2 +- test/test.ndarray.js | 2 +- 115 files changed, 475 insertions(+), 159 deletions(-) create mode 100644 include/stdlib/strided/base/nullary/x.h create mode 100644 src/x.c diff --git a/.gitattributes b/.gitattributes index 10a16e6..1c88e69 100644 --- a/.gitattributes +++ b/.gitattributes @@ -40,10 +40,27 @@ *.mov binary # Override what is considered "vendored" by GitHub's linguist: -/deps/** linguist-vendored=false -/lib/node_modules/** linguist-vendored=false linguist-generated=false -test/fixtures/** linguist-vendored=false -tools/** linguist-vendored=false +/lib/node_modules/** -linguist-vendored -linguist-generated -# Override what is considered "documentation" by GitHub's linguist: -examples/** linguist-documentation=false +# Configure directories which should *not* be included in GitHub language statistics: +/deps/** linguist-vendored +/dist/** linguist-generated +/workshops/** linguist-vendored + +benchmark/** linguist-vendored +docs/* linguist-documentation +etc/** linguist-vendored +examples/** linguist-documentation +scripts/** linguist-vendored +test/** linguist-vendored +tools/** linguist-vendored + +# Configure files which should *not* be included in GitHub language statistics: +Makefile linguist-vendored +*.mk linguist-vendored +*.jl linguist-vendored +*.py linguist-vendored +*.R linguist-vendored + +# Configure files which should be included in GitHub language statistics: +docs/types/*.d.ts -linguist-documentation diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml index ec90164..f92a6c5 100644 --- a/.github/workflows/productionize.yml +++ b/.github/workflows/productionize.yml @@ -344,7 +344,6 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() @@ -518,7 +517,6 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() @@ -698,7 +696,6 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3eec50e..b1d4bb8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -94,6 +94,10 @@ jobs: # Replace branch in README.md link definitions for badges with the new version: find . -type f -name '*.md' -print0 | xargs -0 sed -Ei "s/branch([=:])[^ ]+/branch\1v${NEW_VERSION}/g" + # Rewrite CHANGELOG.md to replace "Unreleased" with the new version: + sed -Ei "s/Unreleased/${NEW_VERSION}/g" CHANGELOG.md + sed -Ei "s/unreleased/v${NEW_VERSION}/g" CHANGELOG.md + # Create a new commit and tag: git add package.json README.md git commit -m "Release v${NEW_VERSION}" @@ -218,7 +222,6 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f52372..793ab3a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,6 +95,5 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() diff --git a/.github/workflows/test_bundles.yml b/.github/workflows/test_bundles.yml index 6d77abd..5b5879a 100644 --- a/.github/workflows/test_bundles.yml +++ b/.github/workflows/test_bundles.yml @@ -94,7 +94,6 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() @@ -139,7 +138,6 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() @@ -184,6 +182,5 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index f4eda1e..2bcf0cd 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -119,7 +119,6 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index fa9dead..0dd6cbc 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -81,6 +81,5 @@ jobs: uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2 with: status: ${{ job.status }} - steps: ${{ toJson(steps) }} channel: '#npm-ci' if: failure() diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a001e1..0be1dbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,4 +2,135 @@ > Package changelog. -See [GitHub Releases](https://github.com/stdlib-js/strided-base-nullary/releases) for the changelog. \ No newline at end of file +
+ +## Unreleased (2024-07-05) + +
+ +### Features + +- [`4d3d36e`](https://github.com/stdlib-js/stdlib/commit/4d3d36e8b492c8df66a1fdbdb71ff7093d95aa9a) - add boolean dtype support to `strided/base/nullary` [(#2513)](https://github.com/stdlib-js/stdlib/pull/2513) + +
+ + + +
+ +### Bug Fixes + +- [`cf3f92e`](https://github.com/stdlib-js/stdlib/commit/cf3f92eddd20ec1a4106c8a34f7d7705a9a99dbc) - update include paths + +
+ + + +
+ +### Commits + +
+ +- [`4d3d36e`](https://github.com/stdlib-js/stdlib/commit/4d3d36e8b492c8df66a1fdbdb71ff7093d95aa9a) - **feat:** add boolean dtype support to `strided/base/nullary` [(#2513)](https://github.com/stdlib-js/stdlib/pull/2513) _(by Jaysukh Makvana, Athan Reines)_ +- [`cf3f92e`](https://github.com/stdlib-js/stdlib/commit/cf3f92eddd20ec1a4106c8a34f7d7705a9a99dbc) - **fix:** update include paths _(by Athan Reines)_ +- [`75d4f83`](https://github.com/stdlib-js/stdlib/commit/75d4f83cb85610d23a04dc21a03f8075f6d3665f) - **refactor:** update require and include paths _(by Athan Reines)_ + +
+ +
+ + + +
+ +### Contributors + +A total of 2 people contributed to this release. Thank you to the following contributors: + +- Athan Reines +- Jaysukh Makvana + +
+ + + +
+ + + +
+ +## 0.2.1 (2024-02-25) + +
+ +### Features + +- [`ca91187`](https://github.com/stdlib-js/stdlib/commit/ca9118749c1e8f3ad1f722ef69e3dc602e57b6c7) - update minimum TypeScript version + +
+ + + +
+ +### Bug Fixes + +- [`0a81f83`](https://github.com/stdlib-js/stdlib/commit/0a81f837f2eb6e7c0fec6bf5d25066f6c11095a9) - resolve C lint errors + +
+ + + +
+ +### BREAKING CHANGES + +- [`ca91187`](https://github.com/stdlib-js/stdlib/commit/ca9118749c1e8f3ad1f722ef69e3dc602e57b6c7): update minimum TypeScript version +- [`ca91187`](https://github.com/stdlib-js/stdlib/commit/ca9118749c1e8f3ad1f722ef69e3dc602e57b6c7): update minimum TypeScript version to 4.1 + + - To migrate, users should upgrade their TypeScript version to at least version 4.1. + +
+ + + +
+ +### Commits + +
+ +- [`dea49e0`](https://github.com/stdlib-js/stdlib/commit/dea49e03ab5571233e3da26835a6a6d3256d5737) - **docs:** use single quotes in require calls instead of backticks _(by Philipp Burckhardt)_ +- [`7db5611`](https://github.com/stdlib-js/stdlib/commit/7db56115b014aa41e4a3458629286ae3bd99c4e7) - **docs:** update links and fix headings _(by Athan Reines)_ +- [`f9c75ce`](https://github.com/stdlib-js/stdlib/commit/f9c75ce726ed4e5fade8622315bb98094dad8561) - **build:** remove tslint directives _(by Philipp Burckhardt)_ +- [`ca91187`](https://github.com/stdlib-js/stdlib/commit/ca9118749c1e8f3ad1f722ef69e3dc602e57b6c7) - **feat:** update minimum TypeScript version _(by Philipp Burckhardt)_ +- [`0a81f83`](https://github.com/stdlib-js/stdlib/commit/0a81f837f2eb6e7c0fec6bf5d25066f6c11095a9) - **fix:** resolve C lint errors _(by Athan Reines)_ +- [`28e1c84`](https://github.com/stdlib-js/stdlib/commit/28e1c84390d88044883c9ef940a12f38d66ea3ef) - **docs:** resolve C lint errors _(by Athan Reines)_ +- [`cf94561`](https://github.com/stdlib-js/stdlib/commit/cf94561e14fd89fed4c600352f0c638987e4a3c3) - **refactor:** add shebang to script _(by Athan Reines)_ +- [`6341e64`](https://github.com/stdlib-js/stdlib/commit/6341e64d23a90a13ac5505ca92d5e874568a9462) - **docs:** remove comment from example _(by Athan Reines)_ + +
+ +
+ + + +
+ +### Contributors + +A total of 2 people contributed to this release. Thank you to the following contributors: + +- Athan Reines +- Philipp Burckhardt + +
+ + + +
+ + + diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 4500383..7ec15a7 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -5,6 +5,7 @@ Adarsh Palaskar Aditya Sapra AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com> +Aleksandr <112382387+alextes90@users.noreply.github.com> Ali Salesi Aman Bhansali Amit Jimiwal @@ -18,6 +19,7 @@ Chinmay Joshi <86140365+JawHawk@users.noreply.github.com> Christopher Dambamuromo Dan Rose Daniel Killenberger +Daniel Yu <40680511+Daniel777y@users.noreply.github.com> Dominik Moritz Dorrin Sotoudeh EuniceSim142 <77243938+EuniceSim142@users.noreply.github.com> @@ -25,6 +27,7 @@ Frank Kovacs Golden Kumar <103646877+AuenKr@users.noreply.github.com> Gunj Joshi Harshita Kalani +Hridyanshu <124202756+HRIDYANSHU054@users.noreply.github.com> Jaimin Godhani <112328542+Jai0401@users.noreply.github.com> James Gelok Jaysukh Makvana @@ -60,6 +63,7 @@ Pushpendra Chandravanshi Raunak Kumar Gupta Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com> Ricky Reusser +Ridam Garg <67867319+RidamGarg@users.noreply.github.com> Robert Gislason Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com> Rutam <138517416+performant23@users.noreply.github.com> @@ -69,8 +73,11 @@ Seyyed Parsa Neshaei Shashank Shekhar Singh Shivam <11shivam00@gmail.com> Shraddheya Shendre +Shubh Mehta <93862397+Shubh942@users.noreply.github.com> Shubham Mishra -Snehil Shah <130062020+Snehil-Shah@users.noreply.github.com> +Sivam Das <100067002+Sivam2313@users.noreply.github.com> +Snehil Shah +Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com> Spandan Barve Stephannie Jiménez Gacha Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com> @@ -79,8 +86,10 @@ Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com> Utkarsh Utkarsh Raj Varad Gupta +Xiaochuan Ye Yernar Yergaziyev naveen nishant-s7 <97207366+nishant-s7@users.noreply.github.com> orimiles5 <97595296+orimiles5@users.noreply.github.com> +rainn <88160429+AmCodesLame@users.noreply.github.com> rei2hu diff --git a/README.md b/README.md index 4159fb0..caa4a51 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,7 @@ Character codes for data types: +- **x**: `bool` (boolean). - **z**: `complex128` (double-precision floating-point complex number). - **c**: `complex64` (single-precision floating-point complex number). - **f**: `float32` (single-precision floating-point number). @@ -326,7 +327,7 @@ void stdlib_strided_b( uint8_t *arrays[], const int64_t *shape, const int64_t *s Applies a nullary callback and assigns results to elements in a strided output array. ```c -#include "stdlib/complex/float32.h" +#include "stdlib/complex/float32/ctor.h" #include // Create underlying byte arrays: @@ -561,7 +562,7 @@ void stdlib_strided_c_as_t( uint8_t *arrays[], const int64_t *shape, const int64 Applies a nullary callback and assigns results to elements in a strided output array. ```c -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include // Create underlying byte arrays: @@ -1688,12 +1689,52 @@ The function accepts the following arguments: void stdlib_strided_u_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` +#### stdlib_strided_x( \*arrays\[], \*shape, \*strides, \*fcn ) + +Applies a nullary callback and assigns results to elements in a strided output array. + +```c +#include +#include + +// Create underlying byte arrays: +uint8_t out[] = { 0, 0, 0 }; + +// Define a pointer to an array containing pointers to strided arrays: +uint8_t *arrays[] = { out }; + +// Define the strides: +int64_t strides[] = { 1 }; + +// Define the number of elements over which to iterate: +int64_t shape[] = { 3 }; + +// Define a callback: +static bool fcn( void ) { + return true; +} + +// Apply the callback: +stdlib_strided_x( arrays, shape, strides, (void *)fcn ); +``` + +The function accepts the following arguments: + +- **arrays**: `[inout] uint8_t**` array whose only element is a pointer to a strided output array. +- **shape**: `[in] int64_t*` array whose only element is the number of elements over which to iterate. +- **strides**: `[in] int64_t*` array containing strides (in bytes) for each strided array. +- **fcn**: `[in] void*` a `bool (*f)()` function to apply provided as a `void` pointer. + +```c +void stdlib_strided_x( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); +``` + #### stdlib_strided_z( \*arrays\[], \*shape, \*strides, \*fcn ) Applies a nullary callback and assigns results to elements in a strided output array. ```c -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include // Create underlying byte arrays: @@ -1772,7 +1813,7 @@ void stdlib_strided_z_as_b( uint8_t *arrays[], const int64_t *shape, const int64 Applies a nullary callback and assigns results to elements in a strided output array. ```c -#include "stdlib/complex/float32.h" +#include "stdlib/complex/float32/ctor.h" #include // Create underlying byte arrays: @@ -2224,7 +2265,7 @@ In addition to the variables expected by `STDLIB_STRIDED_NULLARY_LOOP_PREAMBLE`, Macro for a nullary loop which invokes a callback and does not cast the return callback's return value (e.g., a `struct`). ```c -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_NOCAST( stdlib_complex128_t ) ``` @@ -2249,8 +2290,8 @@ In addition to the variables expected by `STDLIB_STRIDED_NULLARY_LOOP_PREAMBLE`, Macro for a nullary loop which invokes a callback whose return values should be cast to a different type via casting functions. ```c -#include "stdlib/complex/float32.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float32/ctor.h" +#include "stdlib/complex/float64/ctor.h" STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex64_t, stdlib_complex128_to_complex64 ) ``` diff --git a/benchmark/benchmark.accessors.js b/benchmark/benchmark.accessors.js index 50d39fe..704aac3 100644 --- a/benchmark/benchmark.accessors.js +++ b/benchmark/benchmark.accessors.js @@ -24,7 +24,7 @@ var bench = require( '@stdlib/bench-harness' ); var isnan = require( '@stdlib/math-base-assert-is-nan' ); var pow = require( '@stdlib/math-base-special-pow' ); var constantFunction = require( '@stdlib/utils-constant-function' ); -var Complex64 = require( '@stdlib/complex-float32' ); +var Complex64 = require( '@stdlib/complex-float32-ctor' ); var Complex64Array = require( '@stdlib/array-complex64' ); var filledarray = require( '@stdlib/array-filled' ); var realf = require( '@stdlib/complex-realf' ); diff --git a/benchmark/benchmark.ndarray.accessors.js b/benchmark/benchmark.ndarray.accessors.js index 3cb1d25..35b3904 100644 --- a/benchmark/benchmark.ndarray.accessors.js +++ b/benchmark/benchmark.ndarray.accessors.js @@ -24,7 +24,7 @@ var bench = require( '@stdlib/bench-harness' ); var isnan = require( '@stdlib/math-base-assert-is-nan' ); var pow = require( '@stdlib/math-base-special-pow' ); var constantFunction = require( '@stdlib/utils-constant-function' ); -var Complex64 = require( '@stdlib/complex-float32' ); +var Complex64 = require( '@stdlib/complex-float32-ctor' ); var Complex64Array = require( '@stdlib/array-complex64' ); var filledarray = require( '@stdlib/array-filled' ); var realf = require( '@stdlib/complex-realf' ); diff --git a/examples/accessors.js b/examples/accessors.js index 2196779..05266a4 100644 --- a/examples/accessors.js +++ b/examples/accessors.js @@ -21,7 +21,7 @@ var discreteUniform = require( '@stdlib/random-base-discrete-uniform' ); var filledarray = require( '@stdlib/array-filled' ); var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex64 = require( '@stdlib/complex-float32' ); +var Complex64 = require( '@stdlib/complex-float32-ctor' ); var nullary = require( './../lib' ); function fill() { diff --git a/include/stdlib/strided/base/nullary.h b/include/stdlib/strided/base/nullary.h index ad5c3b9..d5a5590 100644 --- a/include/stdlib/strided/base/nullary.h +++ b/include/stdlib/strided/base/nullary.h @@ -72,6 +72,8 @@ #include "nullary/u_as_b.h" #include "nullary/u_as_t.h" +#include "nullary/x.h" + #include "nullary/z.h" #include "nullary/z_as_b.h" #include "nullary/z_as_c.h" diff --git a/include/stdlib/strided/base/nullary/b.h b/include/stdlib/strided/base/nullary/b.h index db6ed47..4a6766e 100644 --- a/include/stdlib/strided/base/nullary/b.h +++ b/include/stdlib/strided/base/nullary/b.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/c.h b/include/stdlib/strided/base/nullary/c.h index 32fc0c9..01ac0a9 100644 --- a/include/stdlib/strided/base/nullary/c.h +++ b/include/stdlib/strided/base/nullary/c.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/c_as_b.h b/include/stdlib/strided/base/nullary/c_as_b.h index 610a985..634362d 100644 --- a/include/stdlib/strided/base/nullary/c_as_b.h +++ b/include/stdlib/strided/base/nullary/c_as_b.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/c_as_f.h b/include/stdlib/strided/base/nullary/c_as_f.h index 0e01ac5..7dc842d 100644 --- a/include/stdlib/strided/base/nullary/c_as_f.h +++ b/include/stdlib/strided/base/nullary/c_as_f.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/c_as_k.h b/include/stdlib/strided/base/nullary/c_as_k.h index 45dfab3..ec023c3 100644 --- a/include/stdlib/strided/base/nullary/c_as_k.h +++ b/include/stdlib/strided/base/nullary/c_as_k.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/c_as_s.h b/include/stdlib/strided/base/nullary/c_as_s.h index eaa5fe5..f08fa74 100644 --- a/include/stdlib/strided/base/nullary/c_as_s.h +++ b/include/stdlib/strided/base/nullary/c_as_s.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/c_as_t.h b/include/stdlib/strided/base/nullary/c_as_t.h index ba40a4c..d21c4bd 100644 --- a/include/stdlib/strided/base/nullary/c_as_t.h +++ b/include/stdlib/strided/base/nullary/c_as_t.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/c_as_z.h b/include/stdlib/strided/base/nullary/c_as_z.h index bd63c40..b9cf5cc 100644 --- a/include/stdlib/strided/base/nullary/c_as_z.h +++ b/include/stdlib/strided/base/nullary/c_as_z.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/d.h b/include/stdlib/strided/base/nullary/d.h index b056886..de4d960 100644 --- a/include/stdlib/strided/base/nullary/d.h +++ b/include/stdlib/strided/base/nullary/d.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/d_as_b.h b/include/stdlib/strided/base/nullary/d_as_b.h index de4eef5..b6e7690 100644 --- a/include/stdlib/strided/base/nullary/d_as_b.h +++ b/include/stdlib/strided/base/nullary/d_as_b.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/d_as_f.h b/include/stdlib/strided/base/nullary/d_as_f.h index 4ff458c..d465dad 100644 --- a/include/stdlib/strided/base/nullary/d_as_f.h +++ b/include/stdlib/strided/base/nullary/d_as_f.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/d_as_i.h b/include/stdlib/strided/base/nullary/d_as_i.h index e033afc..202b3b0 100644 --- a/include/stdlib/strided/base/nullary/d_as_i.h +++ b/include/stdlib/strided/base/nullary/d_as_i.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/d_as_k.h b/include/stdlib/strided/base/nullary/d_as_k.h index c11d724..7b20c83 100644 --- a/include/stdlib/strided/base/nullary/d_as_k.h +++ b/include/stdlib/strided/base/nullary/d_as_k.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/d_as_s.h b/include/stdlib/strided/base/nullary/d_as_s.h index 7a2c575..74bc9eb 100644 --- a/include/stdlib/strided/base/nullary/d_as_s.h +++ b/include/stdlib/strided/base/nullary/d_as_s.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/d_as_t.h b/include/stdlib/strided/base/nullary/d_as_t.h index 00e1736..592dfef 100644 --- a/include/stdlib/strided/base/nullary/d_as_t.h +++ b/include/stdlib/strided/base/nullary/d_as_t.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/d_as_u.h b/include/stdlib/strided/base/nullary/d_as_u.h index 8afc18f..ecc3a31 100644 --- a/include/stdlib/strided/base/nullary/d_as_u.h +++ b/include/stdlib/strided/base/nullary/d_as_u.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/f.h b/include/stdlib/strided/base/nullary/f.h index 0b985a1..c81a756 100644 --- a/include/stdlib/strided/base/nullary/f.h +++ b/include/stdlib/strided/base/nullary/f.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/f_as_b.h b/include/stdlib/strided/base/nullary/f_as_b.h index 87938c1..1735d64 100644 --- a/include/stdlib/strided/base/nullary/f_as_b.h +++ b/include/stdlib/strided/base/nullary/f_as_b.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/f_as_d.h b/include/stdlib/strided/base/nullary/f_as_d.h index d19e123..8c4fb65 100644 --- a/include/stdlib/strided/base/nullary/f_as_d.h +++ b/include/stdlib/strided/base/nullary/f_as_d.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/f_as_k.h b/include/stdlib/strided/base/nullary/f_as_k.h index 0d48239..808726b 100644 --- a/include/stdlib/strided/base/nullary/f_as_k.h +++ b/include/stdlib/strided/base/nullary/f_as_k.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/f_as_s.h b/include/stdlib/strided/base/nullary/f_as_s.h index 62457c2..05252ff 100644 --- a/include/stdlib/strided/base/nullary/f_as_s.h +++ b/include/stdlib/strided/base/nullary/f_as_s.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/f_as_t.h b/include/stdlib/strided/base/nullary/f_as_t.h index 2fe0fa4..d769738 100644 --- a/include/stdlib/strided/base/nullary/f_as_t.h +++ b/include/stdlib/strided/base/nullary/f_as_t.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/i.h b/include/stdlib/strided/base/nullary/i.h index 12c94c8..0e20a18 100644 --- a/include/stdlib/strided/base/nullary/i.h +++ b/include/stdlib/strided/base/nullary/i.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/i_as_b.h b/include/stdlib/strided/base/nullary/i_as_b.h index 44e4d03..35781d0 100644 --- a/include/stdlib/strided/base/nullary/i_as_b.h +++ b/include/stdlib/strided/base/nullary/i_as_b.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/i_as_k.h b/include/stdlib/strided/base/nullary/i_as_k.h index 480b56a..81680e1 100644 --- a/include/stdlib/strided/base/nullary/i_as_k.h +++ b/include/stdlib/strided/base/nullary/i_as_k.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/i_as_s.h b/include/stdlib/strided/base/nullary/i_as_s.h index e606efe..c67639d 100644 --- a/include/stdlib/strided/base/nullary/i_as_s.h +++ b/include/stdlib/strided/base/nullary/i_as_s.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/i_as_t.h b/include/stdlib/strided/base/nullary/i_as_t.h index d6afec7..fc4c5ab 100644 --- a/include/stdlib/strided/base/nullary/i_as_t.h +++ b/include/stdlib/strided/base/nullary/i_as_t.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/k.h b/include/stdlib/strided/base/nullary/k.h index a7eaf82..22a58a8 100644 --- a/include/stdlib/strided/base/nullary/k.h +++ b/include/stdlib/strided/base/nullary/k.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/k_as_b.h b/include/stdlib/strided/base/nullary/k_as_b.h index 8a4de3d..44ec57e 100644 --- a/include/stdlib/strided/base/nullary/k_as_b.h +++ b/include/stdlib/strided/base/nullary/k_as_b.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/k_as_s.h b/include/stdlib/strided/base/nullary/k_as_s.h index b2a7c25..93d8dff 100644 --- a/include/stdlib/strided/base/nullary/k_as_s.h +++ b/include/stdlib/strided/base/nullary/k_as_s.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/macros.h b/include/stdlib/strided/base/nullary/macros.h index 3813a96..7550c3a 100644 --- a/include/stdlib/strided/base/nullary/macros.h +++ b/include/stdlib/strided/base/nullary/macros.h @@ -119,7 +119,7 @@ * @param tout output type * * @example -* #include "stdlib/complex/float64.h" +* #include "stdlib/complex/float64/ctor.h" * * STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_NOCAST( stdlib_complex128_t ) */ @@ -140,8 +140,8 @@ * @param cout output casting function * * @example -* #include "stdlib/complex/float32.h" -* #include "stdlib/complex/float64.h" +* #include "stdlib/complex/float32/ctor.h" +* #include "stdlib/complex/float64/ctor.h" * * STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex64_t, stdlib_complex128_to_complex64 ) */ diff --git a/include/stdlib/strided/base/nullary/s.h b/include/stdlib/strided/base/nullary/s.h index ad99b1f..efe5275 100644 --- a/include/stdlib/strided/base/nullary/s.h +++ b/include/stdlib/strided/base/nullary/s.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/t.h b/include/stdlib/strided/base/nullary/t.h index c2c122f..f48aac6 100644 --- a/include/stdlib/strided/base/nullary/t.h +++ b/include/stdlib/strided/base/nullary/t.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/t_as_b.h b/include/stdlib/strided/base/nullary/t_as_b.h index ab49a57..04188ed 100644 --- a/include/stdlib/strided/base/nullary/t_as_b.h +++ b/include/stdlib/strided/base/nullary/t_as_b.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/u.h b/include/stdlib/strided/base/nullary/u.h index c58a24c..2bcce3b 100644 --- a/include/stdlib/strided/base/nullary/u.h +++ b/include/stdlib/strided/base/nullary/u.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/u_as_b.h b/include/stdlib/strided/base/nullary/u_as_b.h index 4fd2995..5da4409 100644 --- a/include/stdlib/strided/base/nullary/u_as_b.h +++ b/include/stdlib/strided/base/nullary/u_as_b.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/u_as_t.h b/include/stdlib/strided/base/nullary/u_as_t.h index 0756e96..b5615f5 100644 --- a/include/stdlib/strided/base/nullary/u_as_t.h +++ b/include/stdlib/strided/base/nullary/u_as_t.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/x.h b/include/stdlib/strided/base/nullary/x.h new file mode 100644 index 0000000..c0b8b98 --- /dev/null +++ b/include/stdlib/strided/base/nullary/x.h @@ -0,0 +1,44 @@ +/** +* @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. +*/ + +/* +* The following is auto-generated. Do not manually edit. See scripts/loops.js. +*/ + +#ifndef STDLIB_STRIDED_BASE_NULLARY_X_H +#define STDLIB_STRIDED_BASE_NULLARY_X_H + +#include + +/* +* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler. +*/ +#ifdef __cplusplus +extern "C" { +#endif + +/** +* Applies a nullary callback and assigns results to elements in a strided output array. +*/ +void stdlib_strided_x( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); + +#ifdef __cplusplus +} +#endif + +#endif // !STDLIB_STRIDED_BASE_NULLARY_X_H diff --git a/include/stdlib/strided/base/nullary/z.h b/include/stdlib/strided/base/nullary/z.h index 2ede653..bff873a 100644 --- a/include/stdlib/strided/base/nullary/z.h +++ b/include/stdlib/strided/base/nullary/z.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/z_as_b.h b/include/stdlib/strided/base/nullary/z_as_b.h index 0ccd6be..4e29190 100644 --- a/include/stdlib/strided/base/nullary/z_as_b.h +++ b/include/stdlib/strided/base/nullary/z_as_b.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/z_as_c.h b/include/stdlib/strided/base/nullary/z_as_c.h index 80f8e54..ccb4f4f 100644 --- a/include/stdlib/strided/base/nullary/z_as_c.h +++ b/include/stdlib/strided/base/nullary/z_as_c.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/z_as_d.h b/include/stdlib/strided/base/nullary/z_as_d.h index 7579f88..a7071e2 100644 --- a/include/stdlib/strided/base/nullary/z_as_d.h +++ b/include/stdlib/strided/base/nullary/z_as_d.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/z_as_f.h b/include/stdlib/strided/base/nullary/z_as_f.h index 5b22c85..154d553 100644 --- a/include/stdlib/strided/base/nullary/z_as_f.h +++ b/include/stdlib/strided/base/nullary/z_as_f.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/z_as_i.h b/include/stdlib/strided/base/nullary/z_as_i.h index 0886d27..ae1262b 100644 --- a/include/stdlib/strided/base/nullary/z_as_i.h +++ b/include/stdlib/strided/base/nullary/z_as_i.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/z_as_k.h b/include/stdlib/strided/base/nullary/z_as_k.h index d356aad..bbbd412 100644 --- a/include/stdlib/strided/base/nullary/z_as_k.h +++ b/include/stdlib/strided/base/nullary/z_as_k.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/z_as_s.h b/include/stdlib/strided/base/nullary/z_as_s.h index a274fd2..26b4bdb 100644 --- a/include/stdlib/strided/base/nullary/z_as_s.h +++ b/include/stdlib/strided/base/nullary/z_as_s.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/z_as_t.h b/include/stdlib/strided/base/nullary/z_as_t.h index baa2e00..37b1dde 100644 --- a/include/stdlib/strided/base/nullary/z_as_t.h +++ b/include/stdlib/strided/base/nullary/z_as_t.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/include/stdlib/strided/base/nullary/z_as_u.h b/include/stdlib/strided/base/nullary/z_as_u.h index 83ec457..b1a9a64 100644 --- a/include/stdlib/strided/base/nullary/z_as_u.h +++ b/include/stdlib/strided/base/nullary/z_as_u.h @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/manifest.json b/manifest.json index ada1010..602d3ee 100644 --- a/manifest.json +++ b/manifest.json @@ -61,6 +61,7 @@ "./src/u.c", "./src/u_as_b.c", "./src/u_as_t.c", + "./src/x.c", "./src/z.c", "./src/z_as_b.c", "./src/z_as_c.c", @@ -78,8 +79,8 @@ "libraries": [], "libpath": [], "dependencies": [ - "@stdlib/complex-float32", - "@stdlib/complex-float64" + "@stdlib/complex-float32-ctor", + "@stdlib/complex-float64-ctor" ] } ] diff --git a/package.json b/package.json index 3319481..a5eae3d 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,8 @@ "@stdlib/array-base-assert-is-accessor-array": "^0.2.1", "@stdlib/array-base-setter": "^0.2.1", "@stdlib/array-dtype": "^0.2.1", - "@stdlib/complex-float32": "^0.2.1", - "@stdlib/complex-float64": "^0.2.1", + "@stdlib/complex-float32-ctor": "^0.0.1", + "@stdlib/complex-float64-ctor": "^0.0.1", "@stdlib/types": "^0.3.2", "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1", "@stdlib/utils-library-manifest": "^0.2.1" diff --git a/scripts/loops.js b/scripts/loops.js index 72eed02..98f2e14 100644 --- a/scripts/loops.js +++ b/scripts/loops.js @@ -131,6 +131,9 @@ function callbackBody( ch1 ) { if ( isComplexChar( ch1 ) ) { return '// ...'; } + if ( ch1 === 'x' ) { + return 'return true;'; + } if ( ch1 === 'd' ) { return 'return 3.0;'; } @@ -378,10 +381,13 @@ function createSourceFile( signature ) { // Ensure the appropriate header files are included in source files: inc = []; if ( /c/.test( signature ) ) { - inc.push( '#include "stdlib/complex/float32.h"' ); + inc.push( '#include "stdlib/complex/float32/ctor.h"' ); } if ( /z/.test( signature ) ) { - inc.push( '#include "stdlib/complex/float64.h"' ); + inc.push( '#include "stdlib/complex/float64/ctor.h"' ); + } + if ( /x/.test( signature ) ) { + inc.push( '#include '); } if ( inc.length ) { file = replace( file, '{{INCLUDES}}', '\n'+inc.join( '\n' ) ); @@ -395,10 +401,13 @@ function createSourceFile( signature ) { tmp = signature.substring( 0, 1 ); // implicit callback signature; e.g., c, z, d, f, etc } if ( /c/.test( tmp ) ) { - inc.push( '#include "stdlib/complex/float32.h"' ); + inc.push( '#include "stdlib/complex/float32/ctor.h"' ); } if ( /z/.test( tmp ) ) { - inc.push( '#include "stdlib/complex/float64.h"' ); + inc.push( '#include "stdlib/complex/float64/ctor.h"' ); + } + if ( /x/.test( tmp ) ) { + inc.push( '#include '); } if ( inc.length ) { file = replace( file, '{{EXAMPLE_INCLUDES}}', '\n* '+inc.join( '\n* ' ) ); @@ -504,10 +513,13 @@ function createDoc( signature ) { tmp = signature.substring( 0, 1 ); // implicit callback signature; e.g., c, z, d, f, etc } if ( /c/.test( tmp ) ) { - inc.push( '#include "stdlib/complex/float32.h"' ); + inc.push( '#include "stdlib/complex/float32/ctor.h"' ); } if ( /z/.test( tmp ) ) { - inc.push( '#include "stdlib/complex/float64.h"' ); + inc.push( '#include "stdlib/complex/float64/ctor.h"' ); + } + if ( /x/.test( tmp ) ) { + inc.push( '#include '); } if ( inc.length ) { doc = replace( doc, '{{INCLUDES}}', '\n'+inc.join( '\n' ) ); diff --git a/scripts/templates/docs.txt b/scripts/templates/docs.txt index c13c93a..31258d2 100644 --- a/scripts/templates/docs.txt +++ b/scripts/templates/docs.txt @@ -1,4 +1,4 @@ -#### stdlib_strided_{{SIGNATURE}}( \*arrays[], \*shape, \*strides, \*fcn ) +#### stdlib_strided_{{SIGNATURE}}( \*arrays\[], \*shape, \*strides, \*fcn ) Applies a nullary callback and assigns results to elements in a strided output array. diff --git a/src/b.c b/src/b.c index be1ebb2..854dd53 100644 --- a/src/b.c +++ b/src/b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/c.c b/src/c.c index 7bd7fb1..0063000 100644 --- a/src/c.c +++ b/src/c.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/c.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float32.h" +#include "stdlib/complex/float32/ctor.h" #include /** @@ -35,7 +35,7 @@ * * @example * #include "stdlib/strided/base/nullary/c.h" -* #include "stdlib/complex/float32.h" +* #include "stdlib/complex/float32/ctor.h" * #include * * // Create underlying byte arrays: diff --git a/src/c_as_b.c b/src/c_as_b.c index d72bd5d..1179a28 100644 --- a/src/c_as_b.c +++ b/src/c_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/c_as_b.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float32.h" +#include "stdlib/complex/float32/ctor.h" #include /** diff --git a/src/c_as_f.c b/src/c_as_f.c index 36ed58d..893c6b3 100644 --- a/src/c_as_f.c +++ b/src/c_as_f.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/c_as_f.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float32.h" +#include "stdlib/complex/float32/ctor.h" #include /** diff --git a/src/c_as_k.c b/src/c_as_k.c index 892955e..24ec9b4 100644 --- a/src/c_as_k.c +++ b/src/c_as_k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/c_as_k.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float32.h" +#include "stdlib/complex/float32/ctor.h" #include /** diff --git a/src/c_as_s.c b/src/c_as_s.c index 65acbe4..5276478 100644 --- a/src/c_as_s.c +++ b/src/c_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/c_as_s.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float32.h" +#include "stdlib/complex/float32/ctor.h" #include /** diff --git a/src/c_as_t.c b/src/c_as_t.c index 4f97777..02fcd37 100644 --- a/src/c_as_t.c +++ b/src/c_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/c_as_t.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float32.h" +#include "stdlib/complex/float32/ctor.h" #include /** diff --git a/src/c_as_z.c b/src/c_as_z.c index a5a7f41..e73a8a8 100644 --- a/src/c_as_z.c +++ b/src/c_as_z.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,8 +22,8 @@ #include "stdlib/strided/base/nullary/c_as_z.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float32.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float32/ctor.h" +#include "stdlib/complex/float64/ctor.h" #include /** @@ -36,7 +36,7 @@ * * @example * #include "stdlib/strided/base/nullary/c_as_z.h" -* #include "stdlib/complex/float64.h" +* #include "stdlib/complex/float64/ctor.h" * #include * * // Create underlying byte arrays: diff --git a/src/d.c b/src/d.c index 182329a..7536614 100644 --- a/src/d.c +++ b/src/d.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/d_as_b.c b/src/d_as_b.c index 75b5b5d..d3cc6fb 100644 --- a/src/d_as_b.c +++ b/src/d_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/d_as_f.c b/src/d_as_f.c index fd8f877..453fc81 100644 --- a/src/d_as_f.c +++ b/src/d_as_f.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/d_as_i.c b/src/d_as_i.c index 97520de..710b742 100644 --- a/src/d_as_i.c +++ b/src/d_as_i.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/d_as_k.c b/src/d_as_k.c index 9b9b007..8097b79 100644 --- a/src/d_as_k.c +++ b/src/d_as_k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/d_as_s.c b/src/d_as_s.c index 1ec2d55..d3f4336 100644 --- a/src/d_as_s.c +++ b/src/d_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/d_as_t.c b/src/d_as_t.c index 04a8e47..b1195f7 100644 --- a/src/d_as_t.c +++ b/src/d_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/d_as_u.c b/src/d_as_u.c index 94b8e59..7be80c8 100644 --- a/src/d_as_u.c +++ b/src/d_as_u.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/f.c b/src/f.c index 9f9c0d3..0416477 100644 --- a/src/f.c +++ b/src/f.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/f_as_b.c b/src/f_as_b.c index 8b9a11a..09c35f4 100644 --- a/src/f_as_b.c +++ b/src/f_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/f_as_d.c b/src/f_as_d.c index 0954f32..47fabb1 100644 --- a/src/f_as_d.c +++ b/src/f_as_d.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/f_as_k.c b/src/f_as_k.c index 9211d7c..8ae5baf 100644 --- a/src/f_as_k.c +++ b/src/f_as_k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/f_as_s.c b/src/f_as_s.c index c99dab3..2deb048 100644 --- a/src/f_as_s.c +++ b/src/f_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/f_as_t.c b/src/f_as_t.c index 6352611..515e7ef 100644 --- a/src/f_as_t.c +++ b/src/f_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/i.c b/src/i.c index e096036..624d5f2 100644 --- a/src/i.c +++ b/src/i.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/i_as_b.c b/src/i_as_b.c index 0d22868..fd15fcd 100644 --- a/src/i_as_b.c +++ b/src/i_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/i_as_k.c b/src/i_as_k.c index d2dd929..8228e12 100644 --- a/src/i_as_k.c +++ b/src/i_as_k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/i_as_s.c b/src/i_as_s.c index 1ffa393..2a5ab88 100644 --- a/src/i_as_s.c +++ b/src/i_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/i_as_t.c b/src/i_as_t.c index 0541fc2..4694bcd 100644 --- a/src/i_as_t.c +++ b/src/i_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/k.c b/src/k.c index 7e6415c..59fe53f 100644 --- a/src/k.c +++ b/src/k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/k_as_b.c b/src/k_as_b.c index b153da4..0aa84c3 100644 --- a/src/k_as_b.c +++ b/src/k_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/k_as_s.c b/src/k_as_s.c index e77f7e9..787565b 100644 --- a/src/k_as_s.c +++ b/src/k_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/s.c b/src/s.c index d7ca65b..7b850ba 100644 --- a/src/s.c +++ b/src/s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/t.c b/src/t.c index aee8b30..4d41cb4 100644 --- a/src/t.c +++ b/src/t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/t_as_b.c b/src/t_as_b.c index dfbc7a7..4d72de9 100644 --- a/src/t_as_b.c +++ b/src/t_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/u.c b/src/u.c index 6f9e4ed..c451a82 100644 --- a/src/u.c +++ b/src/u.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/u_as_b.c b/src/u_as_b.c index ece445f..5069423 100644 --- a/src/u_as_b.c +++ b/src/u_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/u_as_t.c b/src/u_as_t.c index a0b1679..570612b 100644 --- a/src/u_as_t.c +++ b/src/u_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. diff --git a/src/x.c b/src/x.c new file mode 100644 index 0000000..a8637a1 --- /dev/null +++ b/src/x.c @@ -0,0 +1,65 @@ +/** +* @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. +*/ + +/* +* The following is auto-generated. Do not manually edit. See scripts/loops.js. +*/ + +#include "stdlib/strided/base/nullary/x.h" +#include "stdlib/strided/base/nullary/macros.h" +#include +#include + +/** +* Applies a nullary callback and assigns results to elements in a strided output array. +* +* @param arrays array whose only element is a pointer to a strided output array +* @param shape array whose only element is the number of elements over which to iterate +* @param strides array containing strides (in bytes) for each strided array +* @param fcn callback +* +* @example +* #include "stdlib/strided/base/nullary/x.h" +* #include +* #include +* +* // Create underlying byte arrays: +* uint8_t out[] = { 0, 0, 0 }; +* +* // Define a pointer to an array containing pointers to strided arrays: +* uint8_t *arrays[] = { out }; +* +* // Define the strides: +* int64_t strides[] = { 1 }; +* +* // Define the number of elements over which to iterate: +* int64_t shape[] = { 3 }; +* +* // Define a callback: +* static bool fcn( void ) { +* return true; +* } +* +* // Apply the callback: +* stdlib_strided_x( arrays, shape, strides, (void *)fcn ); +*/ +void stdlib_strided_x( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef bool func_type( void ); + func_type *f = (func_type *)fcn; + STDLIB_STRIDED_NULLARY_LOOP_CLBK( bool ) +} diff --git a/src/z.c b/src/z.c index d641790..b267049 100644 --- a/src/z.c +++ b/src/z.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/z.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include /** @@ -35,7 +35,7 @@ * * @example * #include "stdlib/strided/base/nullary/z.h" -* #include "stdlib/complex/float64.h" +* #include "stdlib/complex/float64/ctor.h" * #include * * // Create underlying byte arrays: diff --git a/src/z_as_b.c b/src/z_as_b.c index 37f7f73..dd7f6df 100644 --- a/src/z_as_b.c +++ b/src/z_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/z_as_b.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include /** diff --git a/src/z_as_c.c b/src/z_as_c.c index f62d3e2..45e556e 100644 --- a/src/z_as_c.c +++ b/src/z_as_c.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,8 +22,8 @@ #include "stdlib/strided/base/nullary/z_as_c.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float32.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float32/ctor.h" +#include "stdlib/complex/float64/ctor.h" #include /** @@ -36,7 +36,7 @@ * * @example * #include "stdlib/strided/base/nullary/z_as_c.h" -* #include "stdlib/complex/float32.h" +* #include "stdlib/complex/float32/ctor.h" * #include * * // Create underlying byte arrays: diff --git a/src/z_as_d.c b/src/z_as_d.c index 2017e1e..9087b5a 100644 --- a/src/z_as_d.c +++ b/src/z_as_d.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/z_as_d.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include /** diff --git a/src/z_as_f.c b/src/z_as_f.c index 1a919ba..ecf9851 100644 --- a/src/z_as_f.c +++ b/src/z_as_f.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/z_as_f.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include /** diff --git a/src/z_as_i.c b/src/z_as_i.c index 5cef20a..a9cf7a7 100644 --- a/src/z_as_i.c +++ b/src/z_as_i.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/z_as_i.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include /** diff --git a/src/z_as_k.c b/src/z_as_k.c index 3766207..7413b54 100644 --- a/src/z_as_k.c +++ b/src/z_as_k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/z_as_k.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include /** diff --git a/src/z_as_s.c b/src/z_as_s.c index ed71db1..2b7b4f1 100644 --- a/src/z_as_s.c +++ b/src/z_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/z_as_s.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include /** diff --git a/src/z_as_t.c b/src/z_as_t.c index cc273f9..c4b8ff6 100644 --- a/src/z_as_t.c +++ b/src/z_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/z_as_t.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include /** diff --git a/src/z_as_u.c b/src/z_as_u.c index ba19598..91ab1e2 100644 --- a/src/z_as_u.c +++ b/src/z_as_u.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2023 The Stdlib Authors. +* 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. @@ -22,7 +22,7 @@ #include "stdlib/strided/base/nullary/z_as_u.h" #include "stdlib/strided/base/nullary/macros.h" -#include "stdlib/complex/float64.h" +#include "stdlib/complex/float64/ctor.h" #include /** diff --git a/test/test.main.js b/test/test.main.js index ede7b89..9ca710b 100644 --- a/test/test.main.js +++ b/test/test.main.js @@ -28,7 +28,7 @@ var constantFunction = require( '@stdlib/utils-constant-function' ); var Float64Array = require( '@stdlib/array-float64' ); var Float32Array = require( '@stdlib/array-float32' ); var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex64 = require( '@stdlib/complex-float32' ); +var Complex64 = require( '@stdlib/complex-float32-ctor' ); var nullary = require( './../lib/main.js' ); diff --git a/test/test.ndarray.js b/test/test.ndarray.js index 1b75e2b..973a226 100644 --- a/test/test.ndarray.js +++ b/test/test.ndarray.js @@ -27,7 +27,7 @@ var constantFunction = require( '@stdlib/utils-constant-function' ); var Float64Array = require( '@stdlib/array-float64' ); var Float32Array = require( '@stdlib/array-float32' ); var Complex64Array = require( '@stdlib/array-complex64' ); -var Complex64 = require( '@stdlib/complex-float32' ); +var Complex64 = require( '@stdlib/complex-float32-ctor' ); var nullary = require( './../lib/ndarray.js' );