Hey guys,
I've been coding a project using AVX and I got to a point where I needed to use the _mm256_cvtss_f32() instruction. I have AVX2 checked off in my compile commands and other AVX instructions compile and run correctly, but when I write _mm256_cvtss_f32(), the compiler tells me the function cannot be found. I made sure I included immintrin.h and when I go to immintrin.h, the function isn't defined there, but online, it says Visual Studio 2013 supports AVX2. Below I put the build commands I use for my project, does anyone know how to make Visual Studio 2013 have all of the AVX instructions? Thanks in advance.
@echo off
set CodeDir=..\code
set OutputDir=..\build_win32
set CommonCompilerFlags=-Od -arch:AVX2 -MTd -nologo -fp:fast -fp:except- -Gm- -GR- -EHa- -Zo -Oi -WX -W4 -wd4127 -wd4201 -wd4100 -wd4189 -wd4505 -wd4324 -Z7 -FC
set CommonCompilerFlags=-DOCTREE_DEBUG=1 -DOCTREE_WIN32=1 %CommonCompilerFlags%
set CommonLinkerFlags=-incremental:no -opt:ref user32.lib gdi32.lib Winmm.lib opengl32.lib
IF NOT EXIST %OutputDir% mkdir %OutputDir%
pushd %OutputDir%
del *.pdb > NUL 2> NUL
REM Asset File Builder
cl %CommonCompilerFlags% -D_CRT_SECURE_NO_WARNINGS %CodeDir%\octree_asset_builder.cpp /link %CommonLinkerFlags%
REM For VS 2017, for some reason it needs a path to gl even tho it knows where it is...
REM 64-bit build
echo WAITING FOR PDB > lock.tmp
cl %CommonCompilerFlags% %CodeDir%\octree.cpp -Fmoctree.map -LD /link %CommonLinkerFlags% -incremental:no -opt:ref -PDB:octree_%random%.pdb -EXPORT:GameInit -EXPORT:GameUpdateAndRender -EXPORT:GameProcessDebugData -EXPORT:GameSyncDebugStatePtrs
del lock.tmp
cl %CommonCompilerFlags% %CodeDir%\win32_octree.cpp -Fmwin32_octree.map /link %CommonLinkerFlags%
popd