diff options
| author | Tyge Løvset <[email protected]> | 2023-02-03 20:08:03 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-02-03 20:08:03 +0100 |
| commit | dc2c5fa4f1b319988c622f6172926652cabfd1aa (patch) | |
| tree | 38d9cc99d01ff4b9a27fc48e9feee00ad4a9a466 /docs/cspan_api.md | |
| parent | 5f4076de684da4507943a86e26dcaa5479cdf69b (diff) | |
| download | STC-modified-dc2c5fa4f1b319988c622f6172926652cabfd1aa.tar.gz STC-modified-dc2c5fa4f1b319988c622f6172926652cabfd1aa.zip | |
Feature completed cspan.
Diffstat (limited to 'docs/cspan_api.md')
| -rw-r--r-- | docs/cspan_api.md | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/docs/cspan_api.md b/docs/cspan_api.md index 70587f3e..e8c53965 100644 --- a/docs/cspan_api.md +++ b/docs/cspan_api.md @@ -35,18 +35,19 @@ ValueType* cspan_at(SpanTypeN* self, intptr_t x, ...); // at(): num ValueType* cspan_front(SpanTypeN* self); ValueType* cspan_back(SpanTypeN* self); + // general slicing: create a subspan. can do the same as submd() and subspan(). +SpanTypeN cspan_slice(T SpanTypeN, SpanTypeM* parent, {x0,x1}, {y0,y1}, ...); // {v} reduces rank. {v,-1} slice to end. + // return a subspan of lower rank: -SpanType cspan_submd2(SpanType2* self, intptr_t x); // return a 1d subspan from a 2d span. -SpanTypeN cspan_submd3(SpanType3* self, intptr_t x, ...); // return a 1d or 2d subspan from a 3d span. -SpanTypeN cspan_submd4(SpanType4* self, intptr_t x, ...); // number of args determines rank of output span. +SpanType cspan_submd2(SpanType2* self, intptr_t x); // return a 1d subspan from a 2d span. +SpanTypeN cspan_submd3(SpanType3* self, intptr_t x, ...); // return a 1d or 2d subspan from a 3d span. +SpanTypeN cspan_submd4(SpanType4* self, intptr_t x, ...); // number of args determines rank of output span. SpanTypeN cspan_submd5(SpanType5* self, intptr_t x, ...); -void cspan_slice(SpanTypeN* self, {x0,x1}, {y0,y1},...); // slice a span to make it a subspan of same rank - // return a subspan of same rank. Similar to e.g. cspan_slice(&ms3, {offset, offset+count}, {0}, {0}); -SpanType cspan_subspan(const SpanType* self, intptr_t offset, intptr_t count); -SpanType2 cspan_subspan2(const SpanType2 self, intptr_t offset, intptr_t count); -SpanType3 cspan_subspan3(const SpanType3 self, intptr_t offset, intptr_t count); +SpanType cspan_subspan(SpanType* self, intptr_t offset, intptr_t count); +SpanType2 cspan_subspan2(SpanType2 self, intptr_t offset, intptr_t count); +SpanType3 cspan_subspan3(SpanType3 self, intptr_t offset, intptr_t count); SpanTypeN_iter SpanType_begin(const SpanTypeN* self); SpanTypeN_iter SpanType_end(const SpanTypeN* self); |
