diff --git a/lib/node_modules/@stdlib/strided/base/smap/README.md b/lib/node_modules/@stdlib/strided/base/smap/README.md index 448cbc549d4d..6ee18eac4c05 100644 --- a/lib/node_modules/@stdlib/strided/base/smap/README.md +++ b/lib/node_modules/@stdlib/strided/base/smap/README.md @@ -205,10 +205,10 @@ static float scale( const float x ) { return x * 10.0f; } -float X[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 }; +const float X[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 }; float Y[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; -int64_t N = 6; +const int64_t N = 6; stdlib_strided_smap( N, X, 1, Y, 1, scale ); ``` @@ -257,17 +257,17 @@ static float scale( const float x ) { int main( void ) { // Create an input strided array: - float X[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 }; + const float X[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 }; // Create an output strided array: float Y[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; // Specify the number of elements: - int64_t N = 6; + const int64_t N = 6; // Define the strides: - int64_t strideX = 1; - int64_t strideY = -1; + const int64_t strideX = 1; + const int64_t strideY = -1; // Apply the callback: stdlib_strided_smap( N, X, strideX, Y, strideY, scale ); diff --git a/lib/node_modules/@stdlib/strided/base/smap/examples/c/example.c b/lib/node_modules/@stdlib/strided/base/smap/examples/c/example.c index 76eaf0771166..1960cc74a44c 100644 --- a/lib/node_modules/@stdlib/strided/base/smap/examples/c/example.c +++ b/lib/node_modules/@stdlib/strided/base/smap/examples/c/example.c @@ -28,17 +28,17 @@ static float scale( const float x ) { int main( void ) { // Create an input strided array: - float X[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 }; + const float X[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 }; // Create an output strided array: float Y[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; // Specify the number of elements: - int64_t N = 6; + const int64_t N = 6; // Define the strides: - int64_t strideX = 1; - int64_t strideY = -1; + const int64_t strideX = 1; + const int64_t strideY = -1; // Apply the callback: stdlib_strided_smap( N, X, strideX, Y, strideY, scale );