Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extern "C" {
/**
* Determines if an array is compatible with a single memory segment.
*/
int8_t stdlib_ndarray_is_single_segment_compatible( enum STDLIB_NDARRAY_DTYPE dtype, int64_t ndims, int64_t *shape, int64_t *strides, int64_t offset );
int8_t stdlib_ndarray_is_single_segment_compatible( const enum STDLIB_NDARRAY_DTYPE dtype, const int64_t ndims, const int64_t *shape, const int64_t *strides, const int64_t offset );

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* int8_t b = stdlib_ndarray_is_single_segment_compatible( STDLIB_NDARRAY_UINT8, ndims, shape, strides, offset );
* // returns 1
*/
int8_t stdlib_ndarray_is_single_segment_compatible( enum STDLIB_NDARRAY_DTYPE dtype, int64_t ndims, int64_t *shape, int64_t *strides, int64_t offset ) {
int8_t stdlib_ndarray_is_single_segment_compatible( const enum STDLIB_NDARRAY_DTYPE dtype, const int64_t ndims, const int64_t *shape, const int64_t *strides, const int64_t offset ) {
int64_t tmp[2];
int64_t nbytes;
int64_t len;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ enum STDLIB_NDARRAY_BYTES_PER_ELEMENT {
/**
* Returns the number of bytes per element for a provided data type.
*/
int64_t stdlib_ndarray_bytes_per_element( enum STDLIB_NDARRAY_DTYPE dtype );
int64_t stdlib_ndarray_bytes_per_element( const enum STDLIB_NDARRAY_DTYPE dtype );

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* int64_t nbytes = stdlib_ndarray_bytes_per_element( STDLIB_NDARRAY_FLOAT64 );
* // returns 8
*/
int64_t stdlib_ndarray_bytes_per_element( enum STDLIB_NDARRAY_DTYPE dtype ) {
int64_t stdlib_ndarray_bytes_per_element( const enum STDLIB_NDARRAY_DTYPE dtype ) {
switch ( dtype ) {
case STDLIB_NDARRAY_FLOAT64:
return STDLIB_NDARRAY_FLOAT64_BYTES_PER_ELEMENT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C" {
/**
* Returns the number of elements in an array.
*/
int64_t stdlib_ndarray_numel( int64_t ndims, int64_t *shape );
int64_t stdlib_ndarray_numel( const int64_t ndims, const int64_t *shape );

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/ndarray/base/numel/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* int64_t n = stdlib_ndarray_numel( ndims, shape );
* // returns 80
*/
int64_t stdlib_ndarray_numel( int64_t ndims, int64_t *shape ) {
int64_t stdlib_ndarray_numel( const int64_t ndims, const int64_t *shape ) {
int64_t n;
int64_t i;

Expand Down