Community
cancel
Showing results for 
Search instead for 
Did you mean: 
SGold21
Beginner
271 Views

_mm256_load_si256

Hi

Suddenly, using this program gives strange results - only the lower 128 bits are loaded and the upper are zeroized.

What can be wrong?

I use Visual Studio 2015 with the 2017 compiler.

Thank you!

 

Sorin

0 Kudos
7 Replies
Viet_H_Intel
Moderator
271 Views

Can you provide a test case for us to investigate?

SGold21
Beginner
271 Views

Not really.

I have created a new simple project - there it works OK.

But this project - it simply doesn't - no matter where I stuck the code. 

 

for example

 

NoiseGen.rand_byte(DataB, KBytes); // This populates Data with random values
__m256i a = _mm256_load_si256((__m256i*) DataB); 

only the lower 16 bytes are loaded with data. 

In addition - doing the following

 

    __m256i CQv = _mm256_loadu_si256((__m256i *) Qv + CurrentQAddress[0]); // upper 16 bytes are 0
                __m128i aa = _mm_load_si128((__m128i *) (Qv + 8)); // load 16 bytes
                CQv = _mm256_inserti128_si256(CQv, aa, 1);// insert into the upper 16 bytes

And the 16 upper are still zero.

 

BTW, I've opened a new project (starting with new settings) and moved the old code into. It doesn't change the results.

What can be wrong?

 

 

 

 

 

SGold21
Beginner
271 Views

These lines will load 32 bytes to mSumx


 

 

These lines

__m128i mSumb = _mm_load_si128((__m128i*) (Sum + 32));

    __m256i mSumx = _mm256_load_si256((__m256i*) Sum);

won't

 

SGold21
Beginner
271 Views

OK

I think the problem is with Visual Studio 2015. 
I've downloaded Visual Studio 2019

I've installed Intel parallel 2019 update 4 which supports 2019 (so I understand).

But when I try to compile I get:

1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Platforms\x64\PlatformToolsets\Intel C++ Compiler 19.0\Toolset.targets(350,5): error : Element <LanguageStandard> has an invalid value of "Default".
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Platforms\x64\PlatformToolsets\Intel C++ Compiler 19.0\Toolset.targets(350,5): error MSB6011: Invalid parameters passed to the Intel.Build.ICLTasks.ICL task.
 

What can I do. I am stuck.

Thanks

jimdempseyatthecove
Black Belt
271 Views

What does examining the disassembly with op codes show as the instruction byte sequence?

As a work around, you may be able to cast as a different variable type (#define _mm256_load_si256 ...)

Jim Dempsey

SGold21
Beginner
271 Views

jimdempseyatthecove (Blackbelt) wrote:

What does examining the disassembly with op codes show as the instruction byte sequence?

As a work around, you may be able to cast as a different variable type (#define _mm256_load_si256 ...)

Jim Dempsey

 

Seems that Visual Studio is the problem. 
I have an old code. When running - it's perfect. When debugging - it shows the error.
When debugging the code in Visual Studio 2019, the debugging shows everything is OK.
But, I have a problem debugging.

SGold21
Beginner
271 Views

Visual Studio 2017 works

Reply