November 15th, 2011, 2:37 am
So far I like the generic bindings, one concern is that a container and any of its advantages is reduced to a simple C array. This restriction is fine for initial versions, but needs to be addressed in the future.QuoteMy bindings start to look a lot like boost::multi_array_refIn my other thread, containers that allow external memory mean that a user's container can be transformed into qfcl internal's format with no copying.Quote have seen that multiarray [][][] is very inefficientI have looked at the muliarray internals, and it does not look like any rewrite or major updates have happened in many years. some of the techniques performed look to ensure compatibility over speed.Quote=================================================RFC=================================================1.1) get the dimensionality of the container: vector = 1, matrix = 2, etc.1.2) dimension sizes, the number of elements along a dimension.1.3) a way for element acces via (i,j,k,..) or via [ i][j][k].. doesn;'t matter as long as it gets formalized1.4) base either base 0 or base 1 indicesI really like outrun's TensorIndex interface. It is lightweight, generic, and fast. In fact, I had considered lifting a version of that code for some of the tables for computing general finite differences. Now, I am planning on the matrix_interface<T> instead since all I need is 2-D.Cuchulainn has said this already, but an arbitrary bas index would be helpful. Finite difference or PDE grids can become more readable with this ability.Otherwise, these requirements look to be a good start. Right now, I am not sure performance or fancy features matter. We need a consistent, agreed upon interface to building algorithms.