Closed juanlucasrey closed 4 years ago
It looks like the Microsoft compiler doesn't define the SSE2 to indicate that SSE2 instructions are available (which they always are if AVX is available). Could you try adding the block of code beginning with the comment about the Microsoft compiler near the top of Packet.h (I've given you a few lines of context)? If this works I'll push the fix. Thanks.
// Microsoft compiler doesn't define SSE2 even if AVX is // defined
// Headers needed for x86 vector intrinsics
Arg, my code has been rewritten by the stupid markdown feature! Should be:
#ifndef AdeptPacket_H
#define AdeptPacket_H 1
#include <iostream>
#include <cstdlib>
// Microsoft compiler doesn't define __SSE2__ even if __AVX__ is
// defined
#ifdef __AVX__
#ifndef __SSE2__
#define __SSE2__ 1
#endif
#endif
// Headers needed for x86 vector intrinsics
#ifdef __SSE2__
I'll try a little later to see if this works and report back. thanks!
this works, thanks.
by the way I am also getting this minor warnings: adept/Stack.h(353,34): warning C4267: 'return': conversion from 'size_t' to 'adept::uIndex', possible loss of data adept/Stack.h(354,32): warning C4267: 'return': conversion from 'size_t' to 'adept::uIndex', possible loss of data adept/Stack.h(634,35): warning C4267: 'return': conversion from 'size_t' to 'adept::uIndex', possible loss of data adept/Stack.h(635,33): warning C4267: 'return': conversion from 'size_t' to 'adept::uIndex', possible loss of data
That's because by default Adept uses 4-byte integers for indexing the stack, whereas on a 64-bit system the STL containers use 8-byte integers to describe their size. 4-byte integers work out faster. For very large problems, you can use 8-byte integers by compiling with ADEPT_SUPPORT_HUGE_ARRAYS defined and you would probably find this warning disappears.
this leads to following errors on packet.h on windows:
adept/Packet.h(400,14): error C3861: 'mm_hprod_pd': identifier not found adept/Packet.h(404,14): error C3861: 'mm_hmin_pd': identifier not found adept/Packet.h(408,14): error C3861: 'mm_hmax_pd': identifier not found