This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Writing a function whose input and output are constant sized

Tags: None
(comma "," separated)
meyeraufderheide
Registered Member
Posts
2
Karma
0
I am writing a program which operate solely on matrices of size that is constant, that is, determined at the compile time. I am trying to write a subroutine that computes the column-wise Kronecker product, aka Khatris-Rao product, for the program.

The subroutine will have as input matrices of constant size, outputs a matrix of size dependent on the input, but still constant. It will have a loop for a number of times dependent on the input, but again, still determined at compile time. I might want to allocate a matrix of size dependent on the input, but, again, still constant.

What is the right way of writing such a function, with the optimization for temporaries and constant-sized matrices working?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Why not using the unsupported module for Kronecker products:

http://eigen.tuxfamily.org/dox-devel/un ... odule.html
meyeraufderheide
Registered Member
Posts
2
Karma
0
ggael wrote:Why not using the unsupported module for Kronecker products:

http://eigen.tuxfamily.org/dox-devel/un ... odule.html


Yes, of course I could, but I'm trying to learn how to write functions that uses the infrastructure offered by Eigen.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]