Registered Member
|
In thread vectorization-for- ... 34043.html the question arose if a vectorization of 3-dimensional vectors makes sense by virtually enhancing the vector size to 4 elements. I wonder if it is possible/already planned to do something similar for all fixed-sized matrices/vectors which are not of size (k*4*double)?
The reason for asking this follows: I made a small benchmark regarding the possible benefits of vectorization using a small energy function. Given a 9x9 matrix "D" and 9-elemental vector F I computed vector9 stress=D*F; scalar energy = 0.5*stress*F; in one flow. Since the matrix D is not arbitrary in my case I was able to reduce the problem. By defining a transformation matrix T of size 9x6 I could transform the vector F and temporary products. First I precomputed the reduced 6x6 matrix D_reduced from D. Then again: Vector6 F_reduced = linear function of F; Vector6 stress_reduced = D_reduced*F_reduced; Vector9 stress = T * stress_reduced; scalar energy = 0.5*stress_reduced*F_reduced; As you can see, there are far more operations involved. But still, it is considerable faster (factor >2). This is quite contradictious and gives me a bad feeling in my stomach when I need to chose a complex operation because it is faster compared with the simple one, won't you agree? |
Registered Member
|
There's been a thread on the mailing list recently where this was discussed, and Gael had some ideas,
http://listengine.tuxfamily.org/lists.t ... 00041.html perhaps in a future release...
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell