Boost logo

Boost :

Subject: [boost] [variadic_templates][mpl]interest in compile time matrix multiplication?
From: Larry Evans (cppljevans_at_[hidden])
Date: 2010-02-16 14:37:19


For example, with:

> ***domain_matrix:
> ( 11 12 13 )
> ( 21 22 23 )

the following:

> typedef
> outer_product_pack
> < plus_times_row_column<arg<1>,arg<2> >
> >::apply
> < domain_matrix
> , domain_matrix
> >::type
> outer_plus_times_rows_rows;
>
> std::cout<<"***outer_plus_times_rows_rows:\n";
> for_each<outer_plus_times_rows_rows>(printer);

produces:

> ***outer_plus_times_rows_rows:
> ( 434 794 )
> ( 794 1454 )

The plus and times operations can be replaced with any
compile-time binary operation.

Any interest?

-regards,
Larry


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk