Vectorizing multi_normal

19 views
Skip to first unread message

Marcus Brubaker

unread,
Nov 23, 2012, 6:04:28 PM11/23/12
to stan...@googlegroups.com
Is anyone currently looking at this?  If not, I may take some time to look at it over the next week.

Cheers,
Marcus

Bob Carpenter

unread,
Nov 23, 2012, 7:51:11 PM11/23/12
to stan...@googlegroups.com
On 11/23/12 6:04 PM, Marcus Brubaker wrote:
> Is anyone currently looking at this? If not, I may take some time to look at it over the next week.

That'd be great.

Daniel's been working on vectorizations, but
he's traveling for the next week.

We have discussed what needs to be done in general, which is
creating MatrixView and TensorView expression templates along the
same lines as VectorView (and DoubleVectorView):

VectorView : T or T[] as T[]

MatrixView : T[] or T[,] as T[,]

TensorView : T[,] or T[,,] as T[,,]

How much array processing should be built in? I ask because
there are three ways to shape a vector:

vector<T>
Eigen::Matrix<T,Dynamic,1>
Eigen::Matrix<T,1,Dynamic>

four ways to shape a matrix:

vector<vector<T> >
vector<Eigen::Matrix<T,Dynamic,1> >
vector<Eigen::Matrix<T,1,Dynamic> >
Eigen::Matrix<T,Dynamic,Dynamic>

and four ways to shape a tensor:

vector<vector<vector<T> > >
vector<vector<Eigen::Matrix<T,Dynamic,1> > >
vector<vector<Eigen::Matrix<T,1,Dynamic> > >
vector<Eigen::Matrix<T,Dynamic,Dynamic> >

- Bob

Ben Goodrich

unread,
Nov 24, 2012, 1:42:35 PM11/24/12
to stan...@googlegroups.com
On Friday, November 23, 2012 6:04:29 PM UTC-5, Marcus Brubaker wrote:
Is anyone currently looking at this?  If not, I may take some time to look at it over the next week.

I started to do this months ago. It didn't get finished, but somehow it did get pushed. It doesn't do anything fancy with the derivatives,  but it allows the data to be a matrix and sums the log-density over its rows.

Ben

Reply all
Reply to author
Forward
0 new messages