Two comments: I'm a bit rusty with my C structs... but you would need two distinct static classes to have const and non-const data pointers for your view right?
Also, it sounds like writing code that will work for a tensor of any rank (e.g. add two tensors together) might be either tedious or impossible. I recognize that part of the problem is the lack of templating and polymorphism, but it would at least be comforting to see just how bad the situation is via a use case or two in the design documentation. I (naively?) fear that to get good performance will require a whole library of functions for even the most basic of operations. gsl_marray_add_1_0( gsl_marray_1, double ); gsl_marray_add_1_1( gsl_marray_1, gsl_marray_1); gsl_marray_add_1_2( gsl_marray_1, gsl_marray_2); gsl_marray_add_2_2(... ) ... gsl_marray_sub_1_0( ... ) Maybe a system of macros could be designed to help here, but it sounds like it will never be as easy as writing a couple of for-loops. James On Sun, Oct 4, 2009 at 10:05 PM, Gerard Jungman <jung...@cybermesa.com> wrote: > A summary of the tentative design for containers. Code will follow, > as soon as a few things are sorted out. (See previous post on > questions about block/vector/matrix). > > -- > G. Jungman > > -- http://www-etud.iro.umontreal.ca/~bergstrj