diff options
| author | tylov <[email protected]> | 2023-07-23 23:48:00 +0200 |
|---|---|---|
| committer | tylov <[email protected]> | 2023-07-23 23:48:00 +0200 |
| commit | e8aed0431140fd0d202d302f19f756046858bad7 (patch) | |
| tree | 66040f4f4193223c503b863cd3e11bd65194cf62 /docs/cspan_api.md | |
| parent | 82668241cad0acdb6a56b0a520f496f06be9ff9a (diff) | |
| download | STC-modified-e8aed0431140fd0d202d302f19f756046858bad7.tar.gz STC-modified-e8aed0431140fd0d202d302f19f756046858bad7.zip | |
Updated docs.
Diffstat (limited to 'docs/cspan_api.md')
| -rw-r--r-- | docs/cspan_api.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/cspan_api.md b/docs/cspan_api.md index e1c92bbf..1312ae6d 100644 --- a/docs/cspan_api.md +++ b/docs/cspan_api.md @@ -21,10 +21,11 @@ using_cspan4(S, ValueType); // define span types S, S2, S3, S4 with ``` ## Methods -All functions are type-safe. Note that the span argument itself is generally not side-effect safe, -i.e., it may be expanded multiple times. However, all index arguments are safe, e.g. -`cspan_at(&ms3, i++, j++, k++)` is allowed. If the number of arguments does not match the span rank, -a compile error is issued. Runtime bounds checks are enabled by default (define `STC_NDEBUG` or `NDEBUG` to disable). +All functions are type-safe. NOTE: the span argument itself is generally **not** side-effect safe - +it may be expanded multiple times. However, all index arguments are safe, e.g. +`cspan_at(&ms3, i++, j++, k++)` is safe, but `cspan_at(&spans[n++], i, j)` is an error! If the number +of arguments does not match the span rank, a compile error is issued. Runtime bounds checks are enabled +by default (define `STC_NDEBUG` or `NDEBUG` to disable). ```c SpanType cspan_init(TYPE SpanType, {v1, v2, ...}); // make a 1-d cspan from values SpanType cspan_from(STCContainer* cnt); // make a 1-d cspan from a cvec, cstack, cpque (heap) @@ -45,7 +46,7 @@ void SpanType_next(SpanTypeN_iter* it); SpanTypeN cspan_md(ValueType* data, d1, d2, ...); // make a multi-dim cspan, row-major order. SpanTypeN cspan_md_order(char order, ValueType* data, d1, d2, ...); // order='C': row-major, 'F': column-major (FORTRAN). - // transpose a md span (inverse axes). no changes to the underlying array. + // transpose a md span (inverse axes). No changes to the underlying array. void cspan_transpose(const SpanTypeN* self); bool cspan_is_order_F(const SpanTypeN* self); |
