Given this code:
using vec = uint32_t __attribute__ ((vector_size (16)));
How can it be rewritten for MSVC 2015?
Given this code:
using vec = uint32_t __attribute__ ((vector_size (16)));
How can it be rewritten for MSVC 2015?
It's a GCC specific extension for creating integer & float types that are larger than 64 bits, and as far as I know there is no direct replacement in VC++, but there is an __m128d type that you may be able to use instead.
It is an example of the gcc vector extensions which are an abstraction over the SIMD instructions.
This particular line creates a type alias vec
for a vector that is a total of 16 bytes long, and consists of 32 bit sized unsigned itegers.
MSVC doesn't appear to have an equivalent extension. The use of SIMD is supported through alignment routines and inline assembly. As such, there is no way to exactly rewrite the line and it is not sufficient to rewrite just this line, but also the lines where the alias or objects using the type, are used.