What is the best way to load from a const pointer using altivec?
According to the documentation (and my results) vec_ld doesn't take a const pointer as an argument: http://www-01.ibm.com/support/knowledgecenter/SS2LWA_12.1.0/com.ibm.xlcpp121.bg.doc/compiler_ref/vec_ld.html
Hence something like this will fail:
void foo(const float* A){
vector4double a = vec_ld(0,A);
...
}
A nasty work-around would be:
void foo(const float* A){
vector4double a = vec_ld(0,const_cast<float*>A);
...
}
Is there a better way to do this? Thank you.