Bugzilla – Attachment 163 Details for
Bug 256
Assigning a vectorizable expression to an unaligned destination loses vectorization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
hand-coded test
unaligned.cc (text/source), 712 bytes, created by
Christoph Hertzberg
on 2011-04-26 21:31:11 UTC
(
hide
)
Description:
hand-coded test
Filename:
MIME Type:
Creator:
Christoph Hertzberg
Created:
2011-04-26 21:31:11 UTC
Size:
712 bytes
patch
obsolete
> >#include <Eigen/Core> > > >inline void store_sum(float *dest, const __m128 &a, const __m128 &b){ > _mm_storeu_ps(dest, _mm_add_ps(a, b)); >} > >inline void store_sum(double *dest, const __m128d &a, const __m128d &b){ > _mm_storeu_pd(dest, _mm_add_pd(a, b)); >} > > >enum{ > dim = 1000 >}; > >typedef double scalar; > >void unaligned_store(){ > scalar res[dim]; > typedef Eigen::Matrix<scalar, dim, 1> mat100; > mat100 a, b; > a.fill(1); > b.fill(2); > > for(int j=0; j<10000000; ++j){ >#ifdef UNALIGNED_PACKET > for(int i=0; i<dim; i+=16/sizeof(scalar)){ > store_sum(res + i, a.packet<Eigen::Aligned>(i), b.packet<Eigen::Aligned>(i)); > } >#else > mat100::Map(res) = a+b; >#endif > } >} > > > >int main(){ > > unaligned_store(); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 256
: 163 |
164
|
709