Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to load a vector of double. #42

Closed
soga-denken opened this issue Jun 2, 2016 · 2 comments
Closed

failed to load a vector of double. #42

soga-denken opened this issue Jun 2, 2016 · 2 comments

Comments

@soga-denken
Copy link

I tried to load a vector of double into float64<2,void> but it encountered a segmentation error.

OS: Windows 10 64bit
platform: Visual Studio 2015 with 32 bits debug mode

#define  SIMDPP_ARCH_X86_AVX2

//float vec[2]; // this works
double vec[2]; // this results in seg. error.

vec[0] = 0;
vec[1] = 1;

float64<2, void> vec64_4 = load(&vec[0]);
@p12tic
Copy link
Owner

p12tic commented Jun 2, 2016

The issue is likely that vec is not aligned on 16-byte boundary and load can only perform aligned loads. Try either load_u or SIMDPP_ALIGN(16) double vec[2];.

@soga-denken
Copy link
Author

ah, I forgot about alignment...

Thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants