summaryrefslogtreecommitdiffhomepage
path: root/include/stc/carr2.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stc/carr2.h')
-rw-r--r--include/stc/carr2.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/stc/carr2.h b/include/stc/carr2.h
index 3f9d1540..a1dfc3ce 100644
--- a/include/stc/carr2.h
+++ b/include/stc/carr2.h
@@ -76,7 +76,10 @@ STC_INLINE size_t _cx_memb(_size)(_cx_self arr)
STC_INLINE _cx_value *_cx_memb(_data)(_cx_self* self)
{ return *self->data; }
-STC_INLINE _cx_value *_cx_memb(_at)(_cx_self* self, size_t x, size_t y)
+STC_INLINE _cx_value *_cx_memb(_elem)(_cx_self* self, size_t x, size_t y)
+ { return *self->data + self->ydim*x + y; }
+
+STC_INLINE const _cx_value *_cx_memb(_at)(const _cx_self* self, size_t x, size_t y)
{ return *self->data + self->ydim*x + y; }
STC_INLINE void _cx_memb(_copy)(_cx_self *self, _cx_self other) {