Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Nov 14, 2023
1 parent a902ad1 commit 253fd49
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 26 deletions.
1 change: 0 additions & 1 deletion .github/.keepalive

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Ognjen Jevremović <[email protected]>
Philipp Burckhardt <[email protected]>
Pranav Goswami <[email protected]>
Ricky Reusser <[email protected]>
Robert Gislason <[email protected]>
Roman Stetsyk <[email protected]>
Ryan Seal <[email protected]>
Seyyed Parsa Neshaei <[email protected]>
Expand All @@ -37,4 +38,3 @@ Stephannie Jiménez Gacha <[email protected]>
Yernar Yergaziyev <[email protected]>
orimiles5 <[email protected]>
rei2hu <[email protected]>
Robert Gislason <[email protected]>
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,11 @@ Rounds each element in a single-precision floating-point strided array `X` towar
```c
#include <stdint.h>

float X[] = { 1.1, 2.5, -3.5, 4.0, -5.9, 6.4, -7.0, 8.2 };
uint8_t Mask[] = { 0, 0, 1, 0, 1, 1, 0, 0 };
const float X[] = { 1.1, 2.5, -3.5, 4.0, -5.9, 6.4, -7.0, 8.2 };
const uint8_t Mask[] = { 0, 0, 1, 0, 1, 1, 0, 0 };
float Y[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };

int64_t N = 4;
const int64_t N = 4;

stdlib_strided_smsktrunc( N, X, 2, Mask, 2, Y, 2 );
```
Expand Down Expand Up @@ -289,21 +289,21 @@ void stdlib_strided_smsktrunc( const int64_t N, const float *X, const int64_t st

int main( void ) {
// Create an input strided array:
float X[] = { 1.1, 2.5, -3.5, 4.0, -5.9, 6.4, -7.0, 8.2 };
const float X[] = { 1.1, 2.5, -3.5, 4.0, -5.9, 6.4, -7.0, 8.2 };

// Create a mask strided array:
uint8_t M[] = { 0, 0, 1, 0, 1, 1, 0, 0 };
const uint8_t M[] = { 0, 0, 1, 0, 1, 1, 0, 0 };

// Create an output strided array:
float Y[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };

// Specify the number of elements:
int64_t N = 4;
const int64_t N = 4;

// Specify the stride lengths:
int64_t strideX = 2;
int64_t strideM = 2;
int64_t strideY = 2;
const int64_t strideX = 2;
const int64_t strideM = 2;
const int64_t strideY = 2;

// Compute the results:
stdlib_strided_smsktrunc( N, X, strideX, M, strideM, Y, strideY );
Expand Down
4 changes: 2 additions & 2 deletions docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface Routine {
* smsktrunc( x.length, x, 1, m, 1, y, 1 );
* // y => <Float32Array>[ 1.0, 2.0, 0.0, 4.0, 0.0 ]
*/
( N: number, x: Float32Array, strideX: number, mask: Uint8Array, strideMask: number, y: Float32Array, strideY: number ): Float32Array; // tslint:disable-line:max-line-length
( N: number, x: Float32Array, strideX: number, mask: Uint8Array, strideMask: number, y: Float32Array, strideY: number ): Float32Array;

/**
* Rounds each element in a single-precision floating-point strided array `x` toward zero according to a strided mask array and assigns the results to elements in a single-precision floating-point strided array `y` using alternative indexing semantics.
Expand Down Expand Up @@ -73,7 +73,7 @@ interface Routine {
* smsktrunc.ndarray( x.length, x, 1, 0, m, 1, 0, y, 1, 0 );
* // y => <Float32Array>[ 1.0, 2.0, 0.0, 4.0, 0.0 ]
*/
ndarray( N: number, x: Float32Array, strideX: number, offsetX: number, mask: Uint8Array, strideMask: number, offsetMask: number, y: Float32Array, strideY: number, offsetY: number ): Float32Array; // tslint:disable-line:max-line-length
ndarray( N: number, x: Float32Array, strideX: number, offsetX: number, mask: Uint8Array, strideMask: number, offsetMask: number, y: Float32Array, strideY: number, offsetY: number ): Float32Array;
}

/**
Expand Down
12 changes: 6 additions & 6 deletions examples/c/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@

int main( void ) {
// Create an input strided array:
float x[] = { 1.1, 2.5, -3.5, 4.0, -5.9, 6.4, -7.0, 8.2 };
const float x[] = { 1.1, 2.5, -3.5, 4.0, -5.9, 6.4, -7.0, 8.2 };

// Create a mask strided array:
uint8_t m[] = { 0, 0, 1, 0, 1, 1, 0, 0 };
const uint8_t m[] = { 0, 0, 1, 0, 1, 1, 0, 0 };

// Create an output strided array:
float y[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };

// Specify the number of elements:
int64_t N = 4;
const int64_t N = 4;

// Specify the stride lengths:
int64_t strideX = 2;
int64_t strideM = 2;
int64_t strideY = 2;
const int64_t strideX = 2;
const int64_t strideM = 2;
const int64_t strideY = 2;

// Compute the results:
stdlib_strided_smsktrunc( N, x, strideX, m, strideM, y, strideY );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@stdlib/array-float32": "^0.1.1",
"@stdlib/array-uint8": "^0.1.1",
"@stdlib/assert-is-browser": "^0.1.1",
"@stdlib/bench": "^0.1.0",
"@stdlib/bench": "^0.2.0",
"@stdlib/math-base-assert-is-nanf": "^0.1.1",
"@stdlib/math-base-special-pow": "^0.1.0",
"@stdlib/random-base-uniform": "^0.1.0",
Expand Down
12 changes: 6 additions & 6 deletions src/smsktrunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@
* include <stdint.h>
*
* // Create an input strided array:
* float x[] = { 1.1, 2.5, -3.5, 4.0, -5.9, 6.4, -7.0, 8.2 };
* const float x[] = { 1.1, 2.5, -3.5, 4.0, -5.9, 6.4, -7.0, 8.2 };
*
* // Create a mask strided array:
* uint8_t m[] = { 0, 0, 1, 0, 1, 1, 0, 0 };
* const uint8_t m[] = { 0, 0, 1, 0, 1, 1, 0, 0 };
*
* // Create an output strided array:
* float y[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
*
* // Specify the number of elements:
* int64_t N = 4;
* const int64_t N = 4;
*
* // Specify the stride lengths:
* int64_t strideX = 2;
* int64_t strideM = 2;
* int64_t strideY = 2;
* const int64_t strideX = 2;
* const int64_t strideM = 2;
* const int64_t strideY = 2;
*
* // Compute the results:
* stdlib_strided_smsktrunc( N, x, strideX, m, strideM, y, strideY );
Expand Down

0 comments on commit 253fd49

Please sign in to comment.