diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml index 3e8e2db..91f2b93 100644 --- a/.github/workflows/productionize.yml +++ b/.github/workflows/productionize.yml @@ -82,21 +82,6 @@ jobs: id: transform-error-messages uses: stdlib-js/transform-errors-action@main - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - name: 'Update dependencies in package.json' run: | @@ -349,7 +334,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -520,7 +505,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -697,7 +682,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cfba892..474004b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -149,6 +149,12 @@ jobs: # Add link definition for CLI package to README.md: find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/
/
\n\n[$escapedPkg]: https:\/\/www.npmjs.com\/package\/$escapedPkg/" + # Replace GitHub MathJax equations with SVGs: + - name: 'Replace GitHub MathJax equations with SVGs' + run: | + find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe 's/```math\n([\s\S]+?)\n```\n\n//g' + find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe 's/)/
/sg' + # Replace GitHub links to individual packages with npm links: - name: 'Replace all GitHub links to individual packages with npm links' run: | @@ -191,7 +197,7 @@ jobs: # Publish package to npm: - name: 'Publish package to npm' - uses: JS-DevTools/npm-publish@v1 + uses: JS-DevTools/npm-publish@v2 with: token: ${{ secrets.NPM_TOKEN }} access: public @@ -203,7 +209,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b2f9e4..bebda78 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: # Send status to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_bundles.yml b/.github/workflows/test_bundles.yml index e9df6a0..172cb2d 100644 --- a/.github/workflows/test_bundles.yml +++ b/.github/workflows/test_bundles.yml @@ -88,7 +88,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -130,7 +130,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} @@ -172,7 +172,7 @@ jobs: # Send notification to Slack channel if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_coverage.yml b/.github/workflows/test_coverage.yml index 6d8aa0b..a73c515 100644 --- a/.github/workflows/test_coverage.yml +++ b/.github/workflows/test_coverage.yml @@ -106,7 +106,7 @@ jobs: # Send Slack notification if job fails: - name: 'Send status to Slack channel in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 077f343..95a73ef 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -75,7 +75,7 @@ jobs: # Send Slack notification if job fails: - name: 'Send notification to Slack in case of failure' - uses: act10ns/slack@v1 + uses: act10ns/slack@v2 with: status: ${{ job.status }} steps: ${{ toJson(steps) }} diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 2cb9b1c..93c4bde 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3,30 +3,37 @@ # Contributors listed in alphabetical order. Ali Salesi +Amit Jimiwal Athan Reines Brendan Graetz Bruno Fenzl Christopher Dambamuromo +Dan Rose Dominik Moritz +Dorrin Sotoudeh Frank Kovacs -Harshita Kalani <95532771+HarshitaKalani@users.noreply.github.com> -James +Harshita Kalani +James Gelok Jithin KS Joey Reed -Jordan-Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com> +Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com> Joris Labie Justin Dennison -Marcus +Marcus Fantham Matt Cochrane Milan Raj Momtchil Momtchev +Naresh Jagadeesan +Nithin Katta <88046362+nithinkatta@users.noreply.github.com> Ognjen Jevremović Philipp Burckhardt -Pranav <85227306+Pranavchiku@users.noreply.github.com> +Pranav Goswami Ricky Reusser +Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com> Ryan Seal Seyyed Parsa Neshaei Shraddheya Shendre Stephannie Jiménez Gacha -dorrin-sot <59933477+dorrin-sot@users.noreply.github.com> -rei2hu +Yernar Yergaziyev +orimiles5 <97595296+orimiles5@users.noreply.github.com> +rei2hu diff --git a/README.md b/README.md index 8fdfcf0..0436388 100644 --- a/README.md +++ b/README.md @@ -289,7 +289,7 @@ int64_t strides[] = { 1 }; int64_t shape[] = { 3 }; // Define a callback: -uint8_t fcn() { +static uint8_t fcn( void ) { return 3; } @@ -305,7 +305,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_c( \*arrays[], \*shape, \*strides, \*fcn ) @@ -329,7 +329,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -stdlib_complex64_t fcn() { +static stdlib_complex64_t fcn( void ) { // ... } @@ -345,7 +345,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `stdlib_complex64_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_c( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_c_as_b( \*arrays[], \*shape, \*strides, \*fcn ) @@ -368,7 +368,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -uint8_t fcn() { +static uint8_t fcn( void ) { return 3; } @@ -384,7 +384,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_c_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_c_as_f( \*arrays[], \*shape, \*strides, \*fcn ) @@ -407,7 +407,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -float fcn() { +static float fcn( void ) { return 3.0f; } @@ -423,7 +423,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `float (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_c_as_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_c_as_k( \*arrays[], \*shape, \*strides, \*fcn ) @@ -446,7 +446,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -int16_t fcn() { +static int16_t fcn( void ) { return 3; } @@ -462,7 +462,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_c_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_c_as_s( \*arrays[], \*shape, \*strides, \*fcn ) @@ -485,7 +485,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -int8_t fcn() { +static int8_t fcn( void ) { return 3; } @@ -501,7 +501,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_c_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_c_as_t( \*arrays[], \*shape, \*strides, \*fcn ) @@ -524,7 +524,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -uint16_t fcn() { +static uint16_t fcn( void ) { return 3; } @@ -540,7 +540,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_c_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_c_as_z( \*arrays[], \*shape, \*strides, \*fcn ) @@ -564,7 +564,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -stdlib_complex128_t fcn() { +static stdlib_complex128_t fcn( void ) { // ... } @@ -580,7 +580,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `stdlib_complex128_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_c_as_z( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_z( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_d( \*arrays[], \*shape, \*strides, \*fcn ) @@ -603,7 +603,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -double fcn() { +static double fcn( void ) { return 3.0; } @@ -619,7 +619,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `double (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_d_as_b( \*arrays[], \*shape, \*strides, \*fcn ) @@ -642,7 +642,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -uint8_t fcn() { +static uint8_t fcn( void ) { return 3; } @@ -658,7 +658,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_d_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_d_as_f( \*arrays[], \*shape, \*strides, \*fcn ) @@ -681,7 +681,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -float fcn() { +static float fcn( void ) { return 3.0f; } @@ -697,7 +697,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `float (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_d_as_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_d_as_i( \*arrays[], \*shape, \*strides, \*fcn ) @@ -720,7 +720,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -int32_t fcn() { +static int32_t fcn( void ) { return 3; } @@ -736,7 +736,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int32_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_d_as_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_i( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_d_as_k( \*arrays[], \*shape, \*strides, \*fcn ) @@ -759,7 +759,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -int16_t fcn() { +static int16_t fcn( void ) { return 3; } @@ -775,7 +775,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_d_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_d_as_s( \*arrays[], \*shape, \*strides, \*fcn ) @@ -798,7 +798,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -int8_t fcn() { +static int8_t fcn( void ) { return 3; } @@ -814,7 +814,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_d_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_d_as_t( \*arrays[], \*shape, \*strides, \*fcn ) @@ -837,7 +837,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -uint16_t fcn() { +static uint16_t fcn( void ) { return 3; } @@ -853,7 +853,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_d_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_d_as_u( \*arrays[], \*shape, \*strides, \*fcn ) @@ -876,7 +876,7 @@ int64_t strides[] = { 8 }; int64_t shape[] = { 3 }; // Define a callback: -uint32_t fcn() { +static uint32_t fcn( void ) { return 3; } @@ -892,7 +892,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint32_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_d_as_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_u( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_f( \*arrays[], \*shape, \*strides, \*fcn ) @@ -915,7 +915,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -float fcn() { +static float fcn( void ) { return 3.0f; } @@ -931,7 +931,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `float (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_f_as_b( \*arrays[], \*shape, \*strides, \*fcn ) @@ -954,7 +954,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -uint8_t fcn() { +static uint8_t fcn( void ) { return 3; } @@ -970,7 +970,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_f_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_f_as_d( \*arrays[], \*shape, \*strides, \*fcn ) @@ -993,7 +993,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -double fcn() { +static double fcn( void ) { return 3.0; } @@ -1009,7 +1009,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `double (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_f_as_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f_as_d( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_f_as_k( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1032,7 +1032,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -int16_t fcn() { +static int16_t fcn( void ) { return 3; } @@ -1048,7 +1048,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_f_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_f_as_s( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1071,7 +1071,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -int8_t fcn() { +static int8_t fcn( void ) { return 3; } @@ -1087,7 +1087,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_f_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_f_as_t( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1110,7 +1110,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -uint16_t fcn() { +static uint16_t fcn( void ) { return 3; } @@ -1126,7 +1126,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_f_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_i( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1149,7 +1149,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -int32_t fcn() { +static int32_t fcn( void ) { return 3; } @@ -1165,7 +1165,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int32_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_i( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_i_as_b( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1188,7 +1188,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -uint8_t fcn() { +static uint8_t fcn( void ) { return 3; } @@ -1204,7 +1204,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_i_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_i_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_i_as_k( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1227,7 +1227,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -int16_t fcn() { +static int16_t fcn( void ) { return 3; } @@ -1243,7 +1243,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_i_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_i_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_i_as_s( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1266,7 +1266,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -int8_t fcn() { +static int8_t fcn( void ) { return 3; } @@ -1282,7 +1282,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_i_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_i_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_i_as_t( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1305,7 +1305,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -uint16_t fcn() { +static uint16_t fcn( void ) { return 3; } @@ -1321,7 +1321,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_i_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_i_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_k( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1344,7 +1344,7 @@ int64_t strides[] = { 2 }; int64_t shape[] = { 3 }; // Define a callback: -int16_t fcn() { +static int16_t fcn( void ) { return 3; } @@ -1360,7 +1360,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_k_as_b( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1383,7 +1383,7 @@ int64_t strides[] = { 2 }; int64_t shape[] = { 3 }; // Define a callback: -uint8_t fcn() { +static uint8_t fcn( void ) { return 3; } @@ -1399,7 +1399,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_k_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_k_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_k_as_s( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1422,7 +1422,7 @@ int64_t strides[] = { 2 }; int64_t shape[] = { 3 }; // Define a callback: -int8_t fcn() { +static int8_t fcn( void ) { return 3; } @@ -1438,7 +1438,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_k_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_k_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_s( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1461,7 +1461,7 @@ int64_t strides[] = { 1 }; int64_t shape[] = { 3 }; // Define a callback: -int8_t fcn() { +static int8_t fcn( void ) { return 3; } @@ -1477,7 +1477,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_t( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1500,7 +1500,7 @@ int64_t strides[] = { 2 }; int64_t shape[] = { 3 }; // Define a callback: -uint16_t fcn() { +static uint16_t fcn( void ) { return 3; } @@ -1516,7 +1516,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_t_as_b( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1539,7 +1539,7 @@ int64_t strides[] = { 2 }; int64_t shape[] = { 3 }; // Define a callback: -uint8_t fcn() { +static uint8_t fcn( void ) { return 3; } @@ -1555,7 +1555,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_t_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_t_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_u( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1578,7 +1578,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -uint32_t fcn() { +static uint32_t fcn( void ) { return 3; } @@ -1594,7 +1594,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint32_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_u( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_u_as_b( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1617,7 +1617,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -uint8_t fcn() { +static uint8_t fcn( void ) { return 3; } @@ -1633,7 +1633,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_u_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_u_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_u_as_t( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1656,7 +1656,7 @@ int64_t strides[] = { 4 }; int64_t shape[] = { 3 }; // Define a callback: -uint16_t fcn() { +static uint16_t fcn( void ) { return 3; } @@ -1672,7 +1672,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_u_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_u_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_z( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1696,7 +1696,7 @@ int64_t strides[] = { 16 }; int64_t shape[] = { 3 }; // Define a callback: -stdlib_complex128_t fcn() { +static stdlib_complex128_t fcn( void ) { // ... } @@ -1712,7 +1712,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `stdlib_complex128_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_z( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_z_as_b( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1735,7 +1735,7 @@ int64_t strides[] = { 16 }; int64_t shape[] = { 3 }; // Define a callback: -uint8_t fcn() { +static uint8_t fcn( void ) { return 3; } @@ -1751,7 +1751,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_z_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_z_as_c( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1775,7 +1775,7 @@ int64_t strides[] = { 16 }; int64_t shape[] = { 3 }; // Define a callback: -stdlib_complex64_t fcn() { +static stdlib_complex64_t fcn( void ) { // ... } @@ -1791,7 +1791,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `stdlib_complex64_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_z_as_c( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_c( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_z_as_d( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1814,7 +1814,7 @@ int64_t strides[] = { 16 }; int64_t shape[] = { 3 }; // Define a callback: -double fcn() { +static double fcn( void ) { return 3.0; } @@ -1830,7 +1830,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `double (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_z_as_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_d( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_z_as_f( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1853,7 +1853,7 @@ int64_t strides[] = { 16 }; int64_t shape[] = { 3 }; // Define a callback: -float fcn() { +static float fcn( void ) { return 3.0f; } @@ -1869,7 +1869,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `float (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_z_as_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_z_as_i( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1892,7 +1892,7 @@ int64_t strides[] = { 16 }; int64_t shape[] = { 3 }; // Define a callback: -int32_t fcn() { +static int32_t fcn( void ) { return 3; } @@ -1908,7 +1908,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int32_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_z_as_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_i( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_z_as_k( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1931,7 +1931,7 @@ int64_t strides[] = { 16 }; int64_t shape[] = { 3 }; // Define a callback: -int16_t fcn() { +static int16_t fcn( void ) { return 3; } @@ -1947,7 +1947,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_z_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_z_as_s( \*arrays[], \*shape, \*strides, \*fcn ) @@ -1970,7 +1970,7 @@ int64_t strides[] = { 16 }; int64_t shape[] = { 3 }; // Define a callback: -int8_t fcn() { +static int8_t fcn( void ) { return 3; } @@ -1986,7 +1986,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `int8_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_z_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_z_as_t( \*arrays[], \*shape, \*strides, \*fcn ) @@ -2009,7 +2009,7 @@ int64_t strides[] = { 16 }; int64_t shape[] = { 3 }; // Define a callback: -uint16_t fcn() { +static uint16_t fcn( void ) { return 3; } @@ -2025,7 +2025,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint16_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_z_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` #### stdlib_strided_z_as_u( \*arrays[], \*shape, \*strides, \*fcn ) @@ -2048,7 +2048,7 @@ int64_t strides[] = { 16 }; int64_t shape[] = { 3 }; // Define a callback: -uint32_t fcn() { +static uint32_t fcn( void ) { return 3; } @@ -2064,7 +2064,7 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `uint32_t (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_z_as_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_u( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` @@ -2287,11 +2287,11 @@ In addition to the variables expected by `STDLIB_STRIDED_NULLARY_LOOP_PREAMBLE`, #include // Define a callback: -static double fill() { +static double fill( void ) { return 10.0; } -int main() { +int main( void ) { // Create underlying byte arrays: uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..74ee023 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import nullary from '../docs/types/index'; +export = nullary; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..07329e5 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,16 @@ +"use strict";var o=function(t,i){return function(){return i||t((i={exports:{}}).exports,i),i.exports}};var q=o(function(W,l){ +function w(t,i,s,n){var e,r,a,u,v;if(u=i[0],!(u<=0))for(e=s[0],e<0?r=(1-u)*e:r=0,a=t[0],v=0;v} arrays - array-like object containing one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride length for the output array\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function fill() {\n* return 3.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n*\n* var shape = [ x.length ];\n* var strides = [ 1 ];\n*\n* nullary( [ x ], shape, strides, fill );\n*\n* console.log( x );\n* // => [ 3.0, 3.0, 3.0, 3.0, 3.0 ]\n*/\nfunction nullary( arrays, shape, strides, fcn ) {\n\tvar sx;\n\tvar ix;\n\tvar x;\n\tvar N;\n\tvar i;\n\n\tN = shape[ 0 ];\n\tif ( N <= 0 ) {\n\t\treturn;\n\t}\n\tsx = strides[ 0 ];\n\tif ( sx < 0 ) {\n\t\tix = (1-N) * sx;\n\t} else {\n\t\tix = 0;\n\t}\n\tx = arrays[ 0 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] = fcn();\n\t\tix += sx;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in a strided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - array-like object containing one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride length for the output array\n* @param {Array} accessors - array-like object containing accessors for the output array\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function fill() {\n* return 3.0;\n* }\n*\n* function set( buf, idx, value ) {\n* buf[ idx ] = value * 2.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n*\n* var shape = [ x.length ];\n* var strides = [ 1 ];\n*\n* nullary( [ x ], shape, strides, [ set ], fill );\n*\n* console.log( x );\n* // => [ 6.0, 6.0, 6.0, 6.0, 6.0 ]\n*/\nfunction nullary( arrays, shape, strides, accessors, fcn ) {\n\tvar xset;\n\tvar sx;\n\tvar ix;\n\tvar x;\n\tvar N;\n\tvar i;\n\n\tN = shape[ 0 ];\n\tif ( N <= 0 ) {\n\t\treturn;\n\t}\n\tsx = strides[ 0 ];\n\tif ( sx < 0 ) {\n\t\tix = (1-N) * sx;\n\t} else {\n\t\tix = 0;\n\t}\n\tx = arrays[ 0 ];\n\txset = accessors[ 0 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\txset( x, ix, fcn() );\n\t\tix += sx;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' );\nvar accessorSetter = require( '@stdlib/array-base-accessor-setter' );\nvar setter = require( '@stdlib/array-base-setter' );\nvar dtype = require( '@stdlib/array-dtype' );\nvar strided = require( './nullary.js' );\nvar accessors = require( './accessors.js' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in a strided output array.\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride length for the output array\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function fill() {\n* return 3.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n*\n* var shape = [ x.length ];\n* var strides = [ 1 ];\n*\n* nullary( [ x ], shape, strides, fill );\n*\n* console.log( x );\n* // => [ 3.0, 3.0, 3.0, 3.0, 3.0 ]\n*/\nfunction nullary( arrays, shape, strides, fcn ) {\n\tvar xset;\n\tvar x;\n\n\tx = arrays[ 0 ];\n\tif ( isAccessorArray( x ) ) {\n\t\txset = accessorSetter( dtype( x ) );\n\t}\n\tif ( xset ) {\n\t\txset = xset || setter( dtype( x ) );\n\t\treturn accessors( arrays, shape, strides, [ xset ], fcn );\n\t}\n\treturn strided( arrays, shape, strides, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in a strided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - array-like object containing one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride length for the output array\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting index (i.e., index offset) for the output array\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function fill() {\n* return 3.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n*\n* var shape = [ x.length ];\n* var strides = [ 1 ];\n* var offsets = [ 0 ];\n*\n* nullary( [ x ], shape, strides, offsets, fill );\n*\n* console.log( x );\n* // => [ 3.0, 3.0, 3.0, 3.0, 3.0 ]\n*/\nfunction nullary( arrays, shape, strides, offsets, fcn ) {\n\tvar sx;\n\tvar ix;\n\tvar x;\n\tvar N;\n\tvar i;\n\n\tN = shape[ 0 ];\n\tif ( N <= 0 ) {\n\t\treturn;\n\t}\n\tix = offsets[ 0 ];\n\tsx = strides[ 0 ];\n\tx = arrays[ 0 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tx[ ix ] = fcn();\n\t\tix += sx;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in a strided output array.\n*\n* @private\n* @param {ArrayLikeObject} arrays - array-like object containing one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride length for the output array\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting indices (i.e., index offsets) for the output array\n* @param {Array} accessors - array-like object containing accessors for the output array\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function fill() {\n* return 3.0;\n* }\n*\n* function set( buf, idx, value ) {\n* buf[ idx ] = value * 2.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n*\n* var shape = [ x.length ];\n* var strides = [ 1 ];\n* var offsets = [ 0 ];\n*\n* nullary( [ x ], shape, strides, offsets, [ set ], fill );\n*\n* console.log( x );\n* // => [ 6.0, 6.0, 6.0, 6.0, 6.0 ]\n*/\nfunction nullary( arrays, shape, strides, offsets, accessors, fcn ) {\n\tvar xset;\n\tvar sx;\n\tvar ix;\n\tvar x;\n\tvar N;\n\tvar i;\n\n\tN = shape[ 0 ];\n\tif ( N <= 0 ) {\n\t\treturn;\n\t}\n\tix = offsets[ 0 ];\n\tsx = strides[ 0 ];\n\tx = arrays[ 0 ];\n\txset = accessors[ 0 ];\n\tfor ( i = 0; i < N; i++ ) {\n\t\txset( x, ix, fcn() );\n\t\tix += sx;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array-base-assert-is-accessor-array' );\nvar accessorSetter = require( '@stdlib/array-base-accessor-setter' );\nvar setter = require( '@stdlib/array-base-setter' );\nvar dtype = require( '@stdlib/array-dtype' );\nvar strided = require( './nullary.ndarray.js' );\nvar accessors = require( './accessors.ndarray.js' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in a strided output array.\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one output array\n* @param {NonNegativeIntegerArray} shape - array-like object containing a single element, the number of indexed elements\n* @param {IntegerArray} strides - array-like object containing the stride length for the output array\n* @param {NonNegativeIntegerArray} offsets - array-like object containing the starting indices (i.e., index offsets) for the output array\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n*\n* function fill() {\n* return 3.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n*\n* var shape = [ x.length ];\n* var strides = [ 1 ];\n* var offsets = [ 0 ];\n*\n* nullary( [ x ], shape, strides, offsets, fill );\n*\n* console.log( x );\n* // => [ 3.0, 3.0, 3.0, 3.0, 3.0 ]\n*/\nfunction nullary( arrays, shape, strides, offsets, fcn ) {\n\tvar xset;\n\tvar x;\n\n\tx = arrays[ 0 ];\n\tif ( isAccessorArray( x ) ) {\n\t\txset = accessorSetter( dtype( x ) );\n\t}\n\tif ( xset ) {\n\t\txset = xset || setter( dtype( x ) );\n\t\treturn accessors( arrays, shape, strides, offsets, [ xset ], fcn );\n\t}\n\treturn strided( arrays, shape, strides, offsets, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a nullary callback and assign results to elements in a strided output array.\n*\n* @module @stdlib/strided-base-nullary\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var nullary = require( '@stdlib/strided-base-nullary' );\n*\n* function fill() {\n* return 3.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n*\n* var shape = [ x.length ];\n* var strides = [ 1 ];\n*\n* nullary( [ x ], shape, strides, fill );\n*\n* console.log( x );\n* // => [ 3.0, 3.0, 3.0, 3.0, 3.0 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var nullary = require( '@stdlib/strided-base-nullary' );\n*\n* function fill() {\n* return 3.0;\n* }\n*\n* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );\n*\n* var shape = [ x.length ];\n* var strides = [ 1 ];\n* var offsets = [ 0 ];\n*\n* nullary.ndarray( [ x ], shape, strides, offsets, fill );\n*\n* console.log( x );\n* // => [ 3.0, 3.0, 3.0, 3.0, 3.0 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAiDA,SAASC,EAASC,EAAQC,EAAOC,EAASC,EAAM,CAC/C,IAAIC,EACAC,EACAC,EACAC,EACAC,EAGJ,GADAD,EAAIN,EAAO,CAAE,EACR,EAAAM,GAAK,GAUV,IAPAH,EAAKF,EAAS,CAAE,EACXE,EAAK,EACTC,GAAM,EAAEE,GAAKH,EAEbC,EAAK,EAENC,EAAIN,EAAQ,CAAE,EACRQ,EAAI,EAAGA,EAAID,EAAGC,IACnBF,EAAGD,CAAG,EAAIF,EAAI,EACdE,GAAMD,CAER,CAKAN,EAAO,QAAUC,IC5EjB,IAAAU,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsDA,SAASC,EAASC,EAAQC,EAAOC,EAASC,EAAWC,EAAM,CAC1D,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGJ,GADAD,EAAIR,EAAO,CAAE,EACR,EAAAQ,GAAK,GAWV,IARAH,EAAKJ,EAAS,CAAE,EACXI,EAAK,EACTC,GAAM,EAAEE,GAAKH,EAEbC,EAAK,EAENC,EAAIR,EAAQ,CAAE,EACdK,EAAOF,EAAW,CAAE,EACdO,EAAI,EAAGA,EAAID,EAAGC,IACnBL,EAAMG,EAAGD,EAAIH,EAAI,CAAE,EACnBG,GAAMD,CAER,CAKAR,EAAO,QAAUC,ICnFjB,IAAAY,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAkB,QAAS,6CAA8C,EACzEC,EAAiB,QAAS,oCAAqC,EAC/DC,EAAS,QAAS,2BAA4B,EAC9CC,EAAQ,QAAS,qBAAsB,EACvCC,EAAU,IACVC,EAAY,IA+BhB,SAASC,EAASC,EAAQC,EAAOC,EAASC,EAAM,CAC/C,IAAIC,EACAC,EAMJ,OAJAA,EAAIL,EAAQ,CAAE,EACTP,EAAiBY,CAAE,IACvBD,EAAOV,EAAgBE,EAAOS,CAAE,CAAE,GAE9BD,GACJA,EAAOA,GAAQT,EAAQC,EAAOS,CAAE,CAAE,EAC3BP,EAAWE,EAAQC,EAAOC,EAAS,CAAEE,CAAK,EAAGD,CAAI,GAElDN,EAASG,EAAQC,EAAOC,EAASC,CAAI,CAC7C,CAKAX,EAAO,QAAUO,IC5EjB,IAAAO,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAmDA,SAASC,EAASC,EAAQC,EAAOC,EAASC,EAASC,EAAM,CACxD,IAAIC,EACAC,EACAC,EACAC,EACAC,EAGJ,GADAD,EAAIP,EAAO,CAAE,EACR,EAAAO,GAAK,GAMV,IAHAF,EAAKH,EAAS,CAAE,EAChBE,EAAKH,EAAS,CAAE,EAChBK,EAAIP,EAAQ,CAAE,EACRS,EAAI,EAAGA,EAAID,EAAGC,IACnBF,EAAGD,CAAG,EAAIF,EAAI,EACdE,GAAMD,CAER,CAKAP,EAAO,QAAUC,IC1EjB,IAAAW,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAwDA,SAASC,EAASC,EAAQC,EAAOC,EAASC,EAASC,EAAWC,EAAM,CACnE,IAAIC,EACAC,EACAC,EACA,EACAC,EACAC,EAGJ,GADAD,EAAIR,EAAO,CAAE,EACR,EAAAQ,GAAK,GAOV,IAJAD,EAAKL,EAAS,CAAE,EAChBI,EAAKL,EAAS,CAAE,EAChB,EAAIF,EAAQ,CAAE,EACdM,EAAOF,EAAW,CAAE,EACdM,EAAI,EAAGA,EAAID,EAAGC,IACnBJ,EAAM,EAAGE,EAAIH,EAAI,CAAE,EACnBG,GAAMD,CAER,CAKAT,EAAO,QAAUC,ICjFjB,IAAAY,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAkB,QAAS,6CAA8C,EACzEC,EAAiB,QAAS,oCAAqC,EAC/DC,EAAS,QAAS,2BAA4B,EAC9CC,EAAQ,QAAS,qBAAsB,EACvCC,EAAU,IACVC,EAAY,IAiChB,SAASC,EAASC,EAAQC,EAAOC,EAASC,EAASC,EAAM,CACxD,IAAIC,EACAC,EAMJ,OAJAA,EAAIN,EAAQ,CAAE,EACTP,EAAiBa,CAAE,IACvBD,EAAOX,EAAgBE,EAAOU,CAAE,CAAE,GAE9BD,GACJA,EAAOA,GAAQV,EAAQC,EAAOU,CAAE,CAAE,EAC3BR,EAAWE,EAAQC,EAAOC,EAASC,EAAS,CAAEE,CAAK,EAAGD,CAAI,GAE3DP,EAASG,EAAQC,EAAOC,EAASC,EAASC,CAAI,CACtD,CAKAZ,EAAO,QAAUO,ICbjB,IAAIQ,EAAc,QAAS,uDAAwD,EAC/EC,EAAO,IACPC,EAAU,IAKdF,EAAaC,EAAM,UAAWC,CAAQ,EAKtC,OAAO,QAAUD", + "names": ["require_nullary", "__commonJSMin", "exports", "module", "nullary", "arrays", "shape", "strides", "fcn", "sx", "ix", "x", "N", "i", "require_accessors", "__commonJSMin", "exports", "module", "nullary", "arrays", "shape", "strides", "accessors", "fcn", "xset", "sx", "ix", "x", "N", "i", "require_main", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorSetter", "setter", "dtype", "strided", "accessors", "nullary", "arrays", "shape", "strides", "fcn", "xset", "x", "require_nullary_ndarray", "__commonJSMin", "exports", "module", "nullary", "arrays", "shape", "strides", "offsets", "fcn", "sx", "ix", "x", "N", "i", "require_accessors_ndarray", "__commonJSMin", "exports", "module", "nullary", "arrays", "shape", "strides", "offsets", "accessors", "fcn", "xset", "sx", "ix", "N", "i", "require_ndarray", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorSetter", "setter", "dtype", "strided", "accessors", "nullary", "arrays", "shape", "strides", "offsets", "fcn", "xset", "x", "setReadOnly", "main", "ndarray"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index 4bdddd5..c00d946 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -// TypeScript Version: 2.0 +// TypeScript Version: 4.1 /// diff --git a/examples/c/example.c b/examples/c/example.c index acda96b..f40204e 100644 --- a/examples/c/example.c +++ b/examples/c/example.c @@ -26,7 +26,7 @@ static double fill() { return 10.0; } -int main() { +int main( void ) { // Create underlying byte arrays: uint8_t out[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; diff --git a/include/stdlib/strided/base/nullary/b.h b/include/stdlib/strided/base/nullary/b.h index 9c02a0e..db6ed47 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/c.h b/include/stdlib/strided/base/nullary/c.h index 980c7e5..32fc0c9 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_c( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/c_as_b.h b/include/stdlib/strided/base/nullary/c_as_b.h index 5a21b82..610a985 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_c_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/c_as_f.h b/include/stdlib/strided/base/nullary/c_as_f.h index 9d47a8c..0e01ac5 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_c_as_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/c_as_k.h b/include/stdlib/strided/base/nullary/c_as_k.h index c88d2d3..45dfab3 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_c_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/c_as_s.h b/include/stdlib/strided/base/nullary/c_as_s.h index 2a9952a..eaa5fe5 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_c_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/c_as_t.h b/include/stdlib/strided/base/nullary/c_as_t.h index 3493a35..ba40a4c 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_c_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/c_as_z.h b/include/stdlib/strided/base/nullary/c_as_z.h index 60dfd43..bd63c40 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_c_as_z( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_c_as_z( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/d.h b/include/stdlib/strided/base/nullary/d.h index 10738e8..b056886 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/d_as_b.h b/include/stdlib/strided/base/nullary/d_as_b.h index add46da..de4eef5 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_d_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/d_as_f.h b/include/stdlib/strided/base/nullary/d_as_f.h index a735cfa..4ff458c 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_d_as_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/d_as_i.h b/include/stdlib/strided/base/nullary/d_as_i.h index 30a9898..e033afc 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_d_as_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_i( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/d_as_k.h b/include/stdlib/strided/base/nullary/d_as_k.h index 9c03999..c11d724 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_d_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/d_as_s.h b/include/stdlib/strided/base/nullary/d_as_s.h index 0151512..7a2c575 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_d_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/d_as_t.h b/include/stdlib/strided/base/nullary/d_as_t.h index 2745d33..00e1736 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_d_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/d_as_u.h b/include/stdlib/strided/base/nullary/d_as_u.h index f0d3e21..8afc18f 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_d_as_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_d_as_u( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/f.h b/include/stdlib/strided/base/nullary/f.h index d5c907f..0b985a1 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/f_as_b.h b/include/stdlib/strided/base/nullary/f_as_b.h index 96d00b2..87938c1 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_f_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/f_as_d.h b/include/stdlib/strided/base/nullary/f_as_d.h index 3e60112..d19e123 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_f_as_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f_as_d( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/f_as_k.h b/include/stdlib/strided/base/nullary/f_as_k.h index 907c6c3..0d48239 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_f_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/f_as_s.h b/include/stdlib/strided/base/nullary/f_as_s.h index 5c39e0e..62457c2 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_f_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/f_as_t.h b/include/stdlib/strided/base/nullary/f_as_t.h index 587aff3..2fe0fa4 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_f_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_f_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/i.h b/include/stdlib/strided/base/nullary/i.h index 17e25ae..12c94c8 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_i( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/i_as_b.h b/include/stdlib/strided/base/nullary/i_as_b.h index 7e2c645..44e4d03 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_i_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_i_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/i_as_k.h b/include/stdlib/strided/base/nullary/i_as_k.h index 3071ab0..480b56a 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_i_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_i_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/i_as_s.h b/include/stdlib/strided/base/nullary/i_as_s.h index 01e8fd4..e606efe 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_i_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_i_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/i_as_t.h b/include/stdlib/strided/base/nullary/i_as_t.h index 75f5386..d6afec7 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_i_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_i_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/k.h b/include/stdlib/strided/base/nullary/k.h index c9a36b7..a7eaf82 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/k_as_b.h b/include/stdlib/strided/base/nullary/k_as_b.h index f71133f..8a4de3d 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_k_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_k_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/k_as_s.h b/include/stdlib/strided/base/nullary/k_as_s.h index 103d7f8..b2a7c25 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_k_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_k_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/s.h b/include/stdlib/strided/base/nullary/s.h index 490d794..ad99b1f 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/t.h b/include/stdlib/strided/base/nullary/t.h index 44ac4db..c2c122f 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/t_as_b.h b/include/stdlib/strided/base/nullary/t_as_b.h index 8d96d31..ab49a57 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_t_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_t_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/u.h b/include/stdlib/strided/base/nullary/u.h index 59fb36a..c58a24c 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_u( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/u_as_b.h b/include/stdlib/strided/base/nullary/u_as_b.h index 5d72c7c..4fd2995 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_u_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_u_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/u_as_t.h b/include/stdlib/strided/base/nullary/u_as_t.h index 9f5e604..0756e96 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_u_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_u_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/z.h b/include/stdlib/strided/base/nullary/z.h index cf93c1a..2ede653 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_z( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/z_as_b.h b/include/stdlib/strided/base/nullary/z_as_b.h index ccc5b21..0ccd6be 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_z_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/z_as_c.h b/include/stdlib/strided/base/nullary/z_as_c.h index 971a2d9..80f8e54 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_z_as_c( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_c( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/z_as_d.h b/include/stdlib/strided/base/nullary/z_as_d.h index 15d92dc..7579f88 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_z_as_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_d( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/z_as_f.h b/include/stdlib/strided/base/nullary/z_as_f.h index 6808ce7..5b22c85 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_z_as_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/z_as_i.h b/include/stdlib/strided/base/nullary/z_as_i.h index 6c64440..0886d27 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_z_as_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_i( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/z_as_k.h b/include/stdlib/strided/base/nullary/z_as_k.h index f6dc83a..d356aad 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_z_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/z_as_s.h b/include/stdlib/strided/base/nullary/z_as_s.h index da117b4..a274fd2 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_z_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/z_as_t.h b/include/stdlib/strided/base/nullary/z_as_t.h index f755f3a..baa2e00 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_z_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/include/stdlib/strided/base/nullary/z_as_u.h b/include/stdlib/strided/base/nullary/z_as_u.h index 1f6b3ba..83ec457 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) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_z_as_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_z_as_u( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/scripts/templates/docs.txt b/scripts/templates/docs.txt index 2fa9be6..c13c93a 100644 --- a/scripts/templates/docs.txt +++ b/scripts/templates/docs.txt @@ -18,7 +18,7 @@ int64_t strides[] = { {{OUTPUT_ARRAY_STRIDE}} }; int64_t shape[] = { {{N}} }; // Define a callback: -{{CALLBACK_RETURN_TYPE}} fcn() { +static {{CALLBACK_RETURN_TYPE}} fcn( void ) { {{CALLBACK_BODY}} } @@ -34,5 +34,5 @@ The function accepts the following arguments: - **fcn**: `[in] void*` a `{{CALLBACK_RETURN_TYPE}} (*f)()` function to apply provided as a `void` pointer. ```c -void stdlib_strided_{{SIGNATURE}}( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_{{SIGNATURE}}( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); ``` diff --git a/scripts/templates/header.txt b/scripts/templates/header.txt index 39abc02..8fa1b78 100644 --- a/scripts/templates/header.txt +++ b/scripts/templates/header.txt @@ -35,7 +35,7 @@ extern "C" { /** * Applies a nullary callback and assigns results to elements in a strided output array. */ -void stdlib_strided_{{SIGNATURE}}( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ); +void stdlib_strided_{{SIGNATURE}}( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ); #ifdef __cplusplus } diff --git a/scripts/templates/source.txt b/scripts/templates/source.txt index 2217aa1..ff379e3 100644 --- a/scripts/templates/source.txt +++ b/scripts/templates/source.txt @@ -49,15 +49,15 @@ * int64_t shape[] = { {{N}} }; * * // Define a callback: -* {{CALLBACK_RETURN_TYPE}} fcn() { +* static {{CALLBACK_RETURN_TYPE}} fcn( void ) { * {{CALLBACK_BODY}} * } * * // Apply the callback: * stdlib_strided_{{SIGNATURE}}( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_{{SIGNATURE}}( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef {{CALLBACK_RETURN_TYPE}} func_type(); +void stdlib_strided_{{SIGNATURE}}( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef {{CALLBACK_RETURN_TYPE}} func_type( void ); func_type *f = (func_type *)fcn; {{LOOP_MACRO}}( {{LOOP_MACRO_ARGUMENTS}} ) } diff --git a/src/b.c b/src/b.c index b5a471e..be1ebb2 100644 --- a/src/b.c +++ b/src/b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint8_t fcn() { +* static uint8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_b( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint8_t func_type(); +void stdlib_strided_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( uint8_t ) } diff --git a/src/c.c b/src/c.c index a6ba847..7bd7fb1 100644 --- a/src/c.c +++ b/src/c.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -51,15 +51,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* stdlib_complex64_t fcn() { +* static stdlib_complex64_t fcn( void ) { * // ... * } * * // Apply the callback: * stdlib_strided_c( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_c( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef stdlib_complex64_t func_type(); +void stdlib_strided_c( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef stdlib_complex64_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_NOCAST( stdlib_complex64_t ) } diff --git a/src/c_as_b.c b/src/c_as_b.c index a98febb..d72bd5d 100644 --- a/src/c_as_b.c +++ b/src/c_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint8_t fcn() { +* static uint8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_c_as_b( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_c_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint8_t func_type(); +void stdlib_strided_c_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex64_t, stdlib_complex64_from_uint8 ) } diff --git a/src/c_as_f.c b/src/c_as_f.c index f852b40..36ed58d 100644 --- a/src/c_as_f.c +++ b/src/c_as_f.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* float fcn() { +* static float fcn( void ) { * return 3.0f; * } * * // Apply the callback: * stdlib_strided_c_as_f( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_c_as_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef float func_type(); +void stdlib_strided_c_as_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef float func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex64_t, stdlib_complex64_from_float32 ) } diff --git a/src/c_as_k.c b/src/c_as_k.c index 0ef7fee..892955e 100644 --- a/src/c_as_k.c +++ b/src/c_as_k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int16_t fcn() { +* static int16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_c_as_k( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_c_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int16_t func_type(); +void stdlib_strided_c_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex64_t, stdlib_complex64_from_int16 ) } diff --git a/src/c_as_s.c b/src/c_as_s.c index dcd5fd7..65acbe4 100644 --- a/src/c_as_s.c +++ b/src/c_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int8_t fcn() { +* static int8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_c_as_s( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_c_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int8_t func_type(); +void stdlib_strided_c_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex64_t, stdlib_complex64_from_int8 ) } diff --git a/src/c_as_t.c b/src/c_as_t.c index 1eebd2c..4f97777 100644 --- a/src/c_as_t.c +++ b/src/c_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint16_t fcn() { +* static uint16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_c_as_t( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_c_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint16_t func_type(); +void stdlib_strided_c_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex64_t, stdlib_complex64_from_uint16 ) } diff --git a/src/c_as_z.c b/src/c_as_z.c index 7c9ffac..a5a7f41 100644 --- a/src/c_as_z.c +++ b/src/c_as_z.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -52,15 +52,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* stdlib_complex128_t fcn() { +* static stdlib_complex128_t fcn( void ) { * // ... * } * * // Apply the callback: * stdlib_strided_c_as_z( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_c_as_z( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef stdlib_complex128_t func_type(); +void stdlib_strided_c_as_z( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef stdlib_complex128_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex64_t, stdlib_complex128_to_complex64 ) } diff --git a/src/d.c b/src/d.c index 23c12f7..182329a 100644 --- a/src/d.c +++ b/src/d.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* double fcn() { +* static double fcn( void ) { * return 3.0; * } * * // Apply the callback: * stdlib_strided_d( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef double func_type(); +void stdlib_strided_d( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef double func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( double ) } diff --git a/src/d_as_b.c b/src/d_as_b.c index 65b4819..75b5b5d 100644 --- a/src/d_as_b.c +++ b/src/d_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint8_t fcn() { +* static uint8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_d_as_b( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_d_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint8_t func_type(); +void stdlib_strided_d_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( double ) } diff --git a/src/d_as_f.c b/src/d_as_f.c index ef1a269..fd8f877 100644 --- a/src/d_as_f.c +++ b/src/d_as_f.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* float fcn() { +* static float fcn( void ) { * return 3.0f; * } * * // Apply the callback: * stdlib_strided_d_as_f( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_d_as_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef float func_type(); +void stdlib_strided_d_as_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef float func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( double ) } diff --git a/src/d_as_i.c b/src/d_as_i.c index 070ec51..97520de 100644 --- a/src/d_as_i.c +++ b/src/d_as_i.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int32_t fcn() { +* static int32_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_d_as_i( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_d_as_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int32_t func_type(); +void stdlib_strided_d_as_i( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( double ) } diff --git a/src/d_as_k.c b/src/d_as_k.c index ce09f88..9b9b007 100644 --- a/src/d_as_k.c +++ b/src/d_as_k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int16_t fcn() { +* static int16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_d_as_k( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_d_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int16_t func_type(); +void stdlib_strided_d_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( double ) } diff --git a/src/d_as_s.c b/src/d_as_s.c index 30eb066..1ec2d55 100644 --- a/src/d_as_s.c +++ b/src/d_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int8_t fcn() { +* static int8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_d_as_s( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_d_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int8_t func_type(); +void stdlib_strided_d_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( double ) } diff --git a/src/d_as_t.c b/src/d_as_t.c index ac7a9d7..04a8e47 100644 --- a/src/d_as_t.c +++ b/src/d_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint16_t fcn() { +* static uint16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_d_as_t( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_d_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint16_t func_type(); +void stdlib_strided_d_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( double ) } diff --git a/src/d_as_u.c b/src/d_as_u.c index c8023f5..94b8e59 100644 --- a/src/d_as_u.c +++ b/src/d_as_u.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint32_t fcn() { +* static uint32_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_d_as_u( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_d_as_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint32_t func_type(); +void stdlib_strided_d_as_u( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( double ) } diff --git a/src/f.c b/src/f.c index 9d80a83..9f9c0d3 100644 --- a/src/f.c +++ b/src/f.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* float fcn() { +* static float fcn( void ) { * return 3.0f; * } * * // Apply the callback: * stdlib_strided_f( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef float func_type(); +void stdlib_strided_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef float func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( float ) } diff --git a/src/f_as_b.c b/src/f_as_b.c index 729686d..8b9a11a 100644 --- a/src/f_as_b.c +++ b/src/f_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint8_t fcn() { +* static uint8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_f_as_b( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_f_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint8_t func_type(); +void stdlib_strided_f_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( float ) } diff --git a/src/f_as_d.c b/src/f_as_d.c index 32747dd..0954f32 100644 --- a/src/f_as_d.c +++ b/src/f_as_d.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* double fcn() { +* static double fcn( void ) { * return 3.0; * } * * // Apply the callback: * stdlib_strided_f_as_d( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_f_as_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef double func_type(); +void stdlib_strided_f_as_d( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef double func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( float ) } diff --git a/src/f_as_k.c b/src/f_as_k.c index 91d3b3c..9211d7c 100644 --- a/src/f_as_k.c +++ b/src/f_as_k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int16_t fcn() { +* static int16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_f_as_k( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_f_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int16_t func_type(); +void stdlib_strided_f_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( float ) } diff --git a/src/f_as_s.c b/src/f_as_s.c index 4d0350a..c99dab3 100644 --- a/src/f_as_s.c +++ b/src/f_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int8_t fcn() { +* static int8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_f_as_s( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_f_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int8_t func_type(); +void stdlib_strided_f_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( float ) } diff --git a/src/f_as_t.c b/src/f_as_t.c index 0879209..6352611 100644 --- a/src/f_as_t.c +++ b/src/f_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint16_t fcn() { +* static uint16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_f_as_t( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_f_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint16_t func_type(); +void stdlib_strided_f_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( float ) } diff --git a/src/i.c b/src/i.c index 10ed8e0..e096036 100644 --- a/src/i.c +++ b/src/i.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int32_t fcn() { +* static int32_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_i( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int32_t func_type(); +void stdlib_strided_i( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( int32_t ) } diff --git a/src/i_as_b.c b/src/i_as_b.c index b81424f..0d22868 100644 --- a/src/i_as_b.c +++ b/src/i_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint8_t fcn() { +* static uint8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_i_as_b( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_i_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint8_t func_type(); +void stdlib_strided_i_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( int32_t ) } diff --git a/src/i_as_k.c b/src/i_as_k.c index 05934b6..d2dd929 100644 --- a/src/i_as_k.c +++ b/src/i_as_k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int16_t fcn() { +* static int16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_i_as_k( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_i_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int16_t func_type(); +void stdlib_strided_i_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( int32_t ) } diff --git a/src/i_as_s.c b/src/i_as_s.c index 86f8838..1ffa393 100644 --- a/src/i_as_s.c +++ b/src/i_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int8_t fcn() { +* static int8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_i_as_s( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_i_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int8_t func_type(); +void stdlib_strided_i_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( int32_t ) } diff --git a/src/i_as_t.c b/src/i_as_t.c index c476cf3..0541fc2 100644 --- a/src/i_as_t.c +++ b/src/i_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint16_t fcn() { +* static uint16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_i_as_t( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_i_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint16_t func_type(); +void stdlib_strided_i_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( int32_t ) } diff --git a/src/k.c b/src/k.c index 873c068..7e6415c 100644 --- a/src/k.c +++ b/src/k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int16_t fcn() { +* static int16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_k( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int16_t func_type(); +void stdlib_strided_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( int16_t ) } diff --git a/src/k_as_b.c b/src/k_as_b.c index 3c8e89e..b153da4 100644 --- a/src/k_as_b.c +++ b/src/k_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint8_t fcn() { +* static uint8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_k_as_b( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_k_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint8_t func_type(); +void stdlib_strided_k_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( int16_t ) } diff --git a/src/k_as_s.c b/src/k_as_s.c index 455f826..e77f7e9 100644 --- a/src/k_as_s.c +++ b/src/k_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int8_t fcn() { +* static int8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_k_as_s( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_k_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int8_t func_type(); +void stdlib_strided_k_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( int16_t ) } diff --git a/src/s.c b/src/s.c index 353b2eb..d7ca65b 100644 --- a/src/s.c +++ b/src/s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int8_t fcn() { +* static int8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_s( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int8_t func_type(); +void stdlib_strided_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( int8_t ) } diff --git a/src/t.c b/src/t.c index d6b2fd9..aee8b30 100644 --- a/src/t.c +++ b/src/t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint16_t fcn() { +* static uint16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_t( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint16_t func_type(); +void stdlib_strided_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( uint16_t ) } diff --git a/src/t_as_b.c b/src/t_as_b.c index bebac41..dfbc7a7 100644 --- a/src/t_as_b.c +++ b/src/t_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint8_t fcn() { +* static uint8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_t_as_b( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_t_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint8_t func_type(); +void stdlib_strided_t_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( uint16_t ) } diff --git a/src/u.c b/src/u.c index 47bffdd..6f9e4ed 100644 --- a/src/u.c +++ b/src/u.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint32_t fcn() { +* static uint32_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_u( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint32_t func_type(); +void stdlib_strided_u( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( uint32_t ) } diff --git a/src/u_as_b.c b/src/u_as_b.c index 1d075b6..ece445f 100644 --- a/src/u_as_b.c +++ b/src/u_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint8_t fcn() { +* static uint8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_u_as_b( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_u_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint8_t func_type(); +void stdlib_strided_u_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( uint32_t ) } diff --git a/src/u_as_t.c b/src/u_as_t.c index 7a2d5a4..a0b1679 100644 --- a/src/u_as_t.c +++ b/src/u_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -49,15 +49,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint16_t fcn() { +* static uint16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_u_as_t( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_u_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint16_t func_type(); +void stdlib_strided_u_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK( uint32_t ) } diff --git a/src/z.c b/src/z.c index 7a65673..d641790 100644 --- a/src/z.c +++ b/src/z.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -51,15 +51,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* stdlib_complex128_t fcn() { +* static stdlib_complex128_t fcn( void ) { * // ... * } * * // Apply the callback: * stdlib_strided_z( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_z( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef stdlib_complex128_t func_type(); +void stdlib_strided_z( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef stdlib_complex128_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_NOCAST( stdlib_complex128_t ) } diff --git a/src/z_as_b.c b/src/z_as_b.c index 00120e6..37f7f73 100644 --- a/src/z_as_b.c +++ b/src/z_as_b.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint8_t fcn() { +* static uint8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_z_as_b( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_z_as_b( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint8_t func_type(); +void stdlib_strided_z_as_b( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_uint8 ) } diff --git a/src/z_as_c.c b/src/z_as_c.c index b94a3ee..f62d3e2 100644 --- a/src/z_as_c.c +++ b/src/z_as_c.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -52,15 +52,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* stdlib_complex64_t fcn() { +* static stdlib_complex64_t fcn( void ) { * // ... * } * * // Apply the callback: * stdlib_strided_z_as_c( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_z_as_c( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef stdlib_complex64_t func_type(); +void stdlib_strided_z_as_c( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef stdlib_complex64_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 ) } diff --git a/src/z_as_d.c b/src/z_as_d.c index 3331af3..2017e1e 100644 --- a/src/z_as_d.c +++ b/src/z_as_d.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* double fcn() { +* static double fcn( void ) { * return 3.0; * } * * // Apply the callback: * stdlib_strided_z_as_d( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_z_as_d( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef double func_type(); +void stdlib_strided_z_as_d( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef double func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_float64 ) } diff --git a/src/z_as_f.c b/src/z_as_f.c index 333bad9..1a919ba 100644 --- a/src/z_as_f.c +++ b/src/z_as_f.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* float fcn() { +* static float fcn( void ) { * return 3.0f; * } * * // Apply the callback: * stdlib_strided_z_as_f( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_z_as_f( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef float func_type(); +void stdlib_strided_z_as_f( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef float func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_float32 ) } diff --git a/src/z_as_i.c b/src/z_as_i.c index fea32f9..5cef20a 100644 --- a/src/z_as_i.c +++ b/src/z_as_i.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int32_t fcn() { +* static int32_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_z_as_i( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_z_as_i( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int32_t func_type(); +void stdlib_strided_z_as_i( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_int32 ) } diff --git a/src/z_as_k.c b/src/z_as_k.c index 0477b9e..3766207 100644 --- a/src/z_as_k.c +++ b/src/z_as_k.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int16_t fcn() { +* static int16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_z_as_k( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_z_as_k( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int16_t func_type(); +void stdlib_strided_z_as_k( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_int16 ) } diff --git a/src/z_as_s.c b/src/z_as_s.c index 3ec5296..ed71db1 100644 --- a/src/z_as_s.c +++ b/src/z_as_s.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* int8_t fcn() { +* static int8_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_z_as_s( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_z_as_s( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef int8_t func_type(); +void stdlib_strided_z_as_s( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef int8_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_int8 ) } diff --git a/src/z_as_t.c b/src/z_as_t.c index b89b5d9..cc273f9 100644 --- a/src/z_as_t.c +++ b/src/z_as_t.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint16_t fcn() { +* static uint16_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_z_as_t( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_z_as_t( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint16_t func_type(); +void stdlib_strided_z_as_t( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint16_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_uint16 ) } diff --git a/src/z_as_u.c b/src/z_as_u.c index 7febded..ba19598 100644 --- a/src/z_as_u.c +++ b/src/z_as_u.c @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2022 The Stdlib Authors. +* Copyright (c) 2023 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. @@ -50,15 +50,15 @@ * int64_t shape[] = { 3 }; * * // Define a callback: -* uint32_t fcn() { +* static uint32_t fcn( void ) { * return 3; * } * * // Apply the callback: * stdlib_strided_z_as_u( arrays, shape, strides, (void *)fcn ); */ -void stdlib_strided_z_as_u( uint8_t *arrays[], int64_t *shape, int64_t *strides, void *fcn ) { - typedef uint32_t func_type(); +void stdlib_strided_z_as_u( uint8_t *arrays[], const int64_t *shape, const int64_t *strides, void *fcn ) { + typedef uint32_t func_type( void ); func_type *f = (func_type *)fcn; STDLIB_STRIDED_NULLARY_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_uint32 ) }