Serving the Quantitative Finance Community

  • 1
  • 2
  • 3
  • 4
  • 5
  • 9
 
User avatar
Polter
Posts: 1
Joined: April 29th, 2008, 4:55 pm

container bindings

November 12th, 2011, 8:57 pm

outrun -- there's one thing I've been wondering about. I think we all agree that fundamentally, we are going to have operator(row,column) for the basic single-coefficient-access.At the same time, I guess we'd like to go beyond that, e.g., have a vectorization features (I recall renorm was working on that, haven't seen the updates though...?) and the (intricately connected) ability to have features like row-wise, column-wise, block-wise, etc. (possible extensions would include diagonal-wise, for instance) access (I think OOglesby) touched upon this.Some examples of possible interface (implementation in this case: Eigen):http://eigen.tuxfamily.org/dox-devel/Tu ... ing.htmlAn interesting application is that of vectorized PDE stencil in Intel Array Building Blocks (ArBB):http://software.intel.com/en-us/article ... ut2.htmsee the Zhang's post here: http://software.intel.com/en-us/forums/ ... o=a&s=lrDo we plan to support something like that?I've been wondering myself what would be a good interface if we were to provide a thin, generic wrapper that would (statically) dispatch the ops to user-selected libs like Eigen.Thoughts / ideas / suggestions / comments?
Last edited by Polter on November 11th, 2011, 11:00 pm, edited 1 time in total.
 
User avatar
Polter
Posts: 1
Joined: April 29th, 2008, 4:55 pm

container bindings

November 12th, 2011, 9:09 pm

QuoteOriginally posted by: outrun TRAITS for std::vector// I cannot quote the source code, does it work for you?Regarding:"static pointer_type ptr( Type& v) { return &(*v.begin()); }"How about using data mem-fn v.data() or the address-of the result of front mem-fn &v.front() ?BTW, I have noticed you're using memsize-types, great!What is the reason to use both signed std::size_t and unsigned std::ptrdiff_t versions in the same template?Is it so that the client code cannot instantiate with a negative number, but can still get an unsigned number in return and avoid the compiler warnings on comparisons?I think in Eigen they just use signed std::ptrdiff_t consistently (there was a long discussion on signed vs. unsigned indexes...), typedefed to an Index:http://eigen.tuxfamily.org/dox-devel/cl ... tives.html
Last edited by Polter on November 11th, 2011, 11:00 pm, edited 1 time in total.
 
User avatar
Polter
Posts: 1
Joined: April 29th, 2008, 4:55 pm

container bindings

November 12th, 2011, 9:24 pm

Ah, OK, didn't realize you were still posting the code :-)Looks interesting so far (as_matrix seems pretty nifty!) -- just get rid of those ints! :-)
Last edited by Polter on November 11th, 2011, 11:00 pm, edited 1 time in total.