Home » Developing U++ » U++ Developers corner » SSE2(/AVX) and alignment issues
Re: SSE2(/AVX) and alignment issues [message #30925 is a reply to message #30916] |
Fri, 28 January 2011 13:48 |
|
mirek wrote on Fri, 28 January 2011 11:55 | I have spent some time thinking about some more direct support of SSE2 in U++ and there is a stupid problem:
U++ allocator guarantees 8 byte alignment only, while SSE2 requests 16 bytes alignment.
I am now undecided which approach would be good:
- I could make allocator 16-byte aligned, at the price of about 4% less space effectivity. This is fine, but when AVX comes, we are then at 32bytes alignment, then with another AVX version at 64 bytes etc... and that would have much worse results.
- I could make _containers_ (Vector etc) alignment aware. This is much superior approach as it does not require any sacrifices in space efficiency and is future proof w.r.t. changing alinment requirements as AVX grows in width. However, one big problem is that you would not be able to use 'new' to allocate SSE2 objects.
Of course, there is not much use for 'new' in U++ anyway, but still...
(Actually, life would be much easier in C++ if there would not be any 'new' and 'delete'
Mirek
|
I vote for first realization. It is impossible to live without new and delete.
|
|
|
|
|
SSE2(/AVX) and alignment issues
By: mirek on Fri, 28 January 2011 10:55
|
|
|
Re: SSE2(/AVX) and alignment issues
By: tojocky on Fri, 28 January 2011 13:48
|
|
|
Re: SSE2(/AVX) and alignment issues
|
|
|
Re: SSE2(/AVX) and alignment issues
By: Didier on Fri, 28 January 2011 18:43
|
|
|
Re: SSE2(/AVX) and alignment issues
By: mirek on Sat, 29 January 2011 00:05
|
|
|
Re: SSE2(/AVX) and alignment issues
By: mirek on Fri, 28 January 2011 23:59
|
|
|
Re: SSE2(/AVX) and alignment issues
By: Novo on Fri, 28 January 2011 21:53
|
|
|
Re: SSE2(/AVX) and alignment issues
By: mirek on Sat, 29 January 2011 00:03
|
|
|
Re: SSE2(/AVX) and alignment issues
By: Novo on Sat, 29 January 2011 02:07
|
|
|
Re: SSE2(/AVX) and alignment issues
By: tojocky on Sat, 29 January 2011 09:23
|
|
|
Re: SSE2(/AVX) and alignment issues
By: mirek on Sat, 29 January 2011 20:29
|
|
|
Re: SSE2(/AVX) and alignment issues
By: tojocky on Sun, 30 January 2011 11:34
|
|
|
Re: SSE2(/AVX) and alignment issues
By: mirek on Sun, 30 January 2011 11:51
|
|
|
Re: SSE2(/AVX) and alignment issues
By: tojocky on Sun, 30 January 2011 16:52
|
|
|
Re: SSE2(/AVX) and alignment issues
By: mirek on Sun, 30 January 2011 18:24
|
|
|
Re: SSE2(/AVX) and alignment issues
By: Novo on Sun, 30 January 2011 19:35
|
|
|
Re: SSE2(/AVX) and alignment issues
By: mirek on Sun, 30 January 2011 20:08
|
|
|
Re: SSE2(/AVX) and alignment issues
By: Novo on Sun, 30 January 2011 20:50
|
|
|
Re: SSE2(/AVX) and alignment issues
|
|
|
Re: SSE2(/AVX) and alignment issues
By: tojocky on Sun, 30 January 2011 22:03
|
Goto Forum:
Current Time: Sat May 11 10:51:07 CEST 2024
Total time taken to generate the page: 0.02921 seconds
|