This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Firstly, the ndarray untyped. The data is in a void * pointer or a char * pointer or something, and there is an extra enum-valued field that indicates what sort of elements make up the data. For example, 0 might mean int8, 1 might mean uint8, 2 might mean int32, 10 might mean float32, 11 float64, 12 complex64, and so on. There is support for
Secondly, there is no notion of a 'layout' in the ndarray, so I wonder if it is necessary here? When you explicitly store the strides for traversing the tensor in each dimension... what is left for the 'layout' to specify?
Thirdly, the dimensions are logical things, not physical ones. So perhaps they belong in the view rather than the base block? I think the simple { size_t n_allocated; char * buf } structure is sufficient for the base block.
The biggest advantage of moving the dimensions from the base_block to the view that it allows in-place reshaping and transposing of views, which would be awkward otherwise.
-- Tuomo.Keskitalo@iki.fi http://iki.fi/tuomo.keskitalo
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |