Skip to content

Commit ff13973

Browse files
committed
Document C API and update description
1 parent b7a1b0f commit ff13973

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

lib/node_modules/@stdlib/ndarray/ctor/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,6 +2270,21 @@ Notes:
22702270
- The function does **not** verify that the output address type matches the underlying input ndarray data type and **assumes** that you know what you are doing.
22712271
- The function returns `-1` if unable to get an element and `0` otherwise.
22722272

2273+
* * *
2274+
2275+
#### stdlib_ndarray_iget_ptr( \*arr, idx )
2276+
2277+
Returns a pointer in the underlying byte array for an ndarray data element located at a specified linear index.
2278+
2279+
```c
2280+
uint8_t * stdlib_ndarray_iget_ptr( const struct ndarray *arr, const int64_t idx );
2281+
```
2282+
2283+
The function accepts the following arguments:
2284+
2285+
- **arr**: `[in] struct ndarray*` input ndarray.
2286+
- **idx**: `[in] int64_t` linear view index.
2287+
22732288
</section>
22742289
22752290
<!-- /.usage -->

lib/node_modules/@stdlib/ndarray/ctor/include/stdlib/ndarray/ctor/iget_ptr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <stdint.h>
2424

2525
/**
26-
* Returns an underlying byte array pointer to an ndarray data element located at a specified linear index.
26+
* Returns a pointer in the underlying byte array for an ndarray data element located at a specified linear index.
2727
*/
2828
uint8_t * stdlib_ndarray_iget_ptr( const struct ndarray *arr, const int64_t idx );
2929

lib/node_modules/@stdlib/ndarray/ctor/src/iget_ptr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <stdint.h>
2828

2929
/**
30-
* Returns an underlying byte array pointer to an ndarray data element located at a specified linear index.
30+
* Returns a pointer in the underlying byte array for an ndarray data element located at a specified linear index.
3131
*
3232
* @param arr input ndarray
3333
* @param idx linear view index

0 commit comments

Comments
 (0)