Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #3801
| From | jacob navia <jacob@spamsink.net> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Understanding ValArray slices |
| Date | 2011-04-15 23:24 +0200 |
| Organization | lccwin |
| Message-ID | <ioad1i$bkd$1@speranza.aioe.org> (permalink) |
| References | (5 earlier) <01b3d7b2-ba1c-439b-8524-babd0fcdb598@x37g2000prb.googlegroups.com> <io7mmh$22l$1@speranza.aioe.org> <068fc503-45d6-441e-b1c6-db9594166418@j17g2000vbr.googlegroups.com> <ioa97l$2g7$1@speranza.aioe.org> <90rnmpFojcU5@mid.individual.net> |
Le 15/04/11 22:21, Ian Collins a écrit : > On 04/16/11 08:19 AM, jacob navia wrote: >> Le 15/04/11 07:47, gwowen a écrit : >> >>> On a tangent, I can imagine an implementation that provides and easily- >>> sliceable valarray that stores the the start,stride,size and reindexes >>> on the fly, in operator[]. >> >> I am doing exactly that. > > In C? > For instance: int Multiply(ValArray *left,ValArray *right); This will multiply left *= right. You can set a Slice into a ValArray with: int SetSlice(ValArray *a,size_t start,size_t length,size_t increment); From now on, all operations will only use the slice in the array until you reset it with int ResetSlice(ValArray *array); Yes, in C and the main version is in C90, I do not use even my own extensions to get maximum portability. In lcc win you will be able to use the overloaded operators, but not in the versions I will present to the C standards committee. You can read the docs and download the source code from http://code.google.com/p/ccl/
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Understanding ValArray slices jacob navia <jacob@spamsink.net> - 2011-04-13 23:44 +0200
Re: Understanding ValArray slices Ian Collins <ian-news@hotmail.com> - 2011-04-14 09:50 +1200
Re: Understanding ValArray slices jacob navia <jacob@spamsink.net> - 2011-04-14 00:22 +0200
Re: Understanding ValArray slices gwowen <gwowen@gmail.com> - 2011-04-14 01:59 -0700
Re: Understanding ValArray slices jacob navia <jacob@spamsink.net> - 2011-04-14 14:48 +0200
Re: Understanding ValArray slices gwowen <gwowen@gmail.com> - 2011-04-14 09:53 -0700
Re: Understanding ValArray slices jacob navia <jacob@spamsink.net> - 2011-04-14 22:50 +0200
Re: Understanding ValArray slices jacob navia <jacob@spamsink.net> - 2011-04-14 22:51 +0200
Re: Understanding ValArray slices gwowen <gwowen@gmail.com> - 2011-04-14 22:47 -0700
Re: Understanding ValArray slices jacob navia <jacob@spamsink.net> - 2011-04-15 22:19 +0200
Re: Understanding ValArray slices Ian Collins <ian-news@hotmail.com> - 2011-04-16 08:21 +1200
Re: Understanding ValArray slices gwowen <gwowen@gmail.com> - 2011-04-15 14:13 -0700
Re: Understanding ValArray slices jacob navia <jacob@spamsink.net> - 2011-04-15 23:24 +0200
Re: Understanding ValArray slices gwowen <gwowen@gmail.com> - 2011-04-15 23:05 -0700
Re: Understanding ValArray slices jacob navia <jacob@spamsink.net> - 2011-04-16 12:00 +0200
Re: Understanding ValArray slices gwowen <gwowen@gmail.com> - 2011-04-15 14:23 -0700
csiph-web