I have just started using SSE and I am confused how to get the maximum integer value (max
) of a __m128i
. For instance:
__m128i t = _mm_setr_ps(0,1,2,3);
// max(t) = 3;
Searching around led me to MAXPS
instruction but I can't seem to find how to use that with "xmmintrin.h"
.
Also, is there any documentation for "xmmintrin.h"
that you would recommend, rather than looking into the header file itself?
__m128i
is an integer vector.*_ps
andMAXPS
are packed-single float. For documentation, see the SSE tag wiki for links, and many more links at stackoverflow.com/tags/x86/info. One very good resource is Intel's intrinsics search/finder which has details on what each one does, but not as much detail as in the asm instruction reference manual. – Behn