You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
even if there is no plan to implement arm-instructions, it is moslty possible to use the sse2neon lib to emulate sse instructions on ARM.
So you can use vectorclass on ARM
i found some things to be defined before including the vectroclass.h
and a small change that has to be made to the instrset.h file.
it is working as far as i could test on apple M1 chips
maybe those changes can be directly applied to vectorclass due to a preprocesse like "VCL_USE_SSE2NEON"
cheers
/*
ARM compatible include of the vectorclass
on ARM/MAC the sse2neon lib will be imported
and some parameters for the vectorclass are prepared.
#IMPORTANT in vectorclass.h->instrset.h the cpuid function must be
hidden, since it is not compatible with ARM-compilers.
if missing, add the header-include check #if !defined(SSE2NEON_H)
to the function to hide it when compiling on ARM
remember that a dispatcher is not possible in this case.
*/
#if __arm64
#include <sse2neon.h>
// limit to 128byte, since we want to use ARM-neon
#define MAX_VECTOR_SIZE 128
//limit to sse4.2, sse2neon does not have any AVX instructions ( so far )
#define INSTRSET 6
//define unknown function
#define _mm_getcsr() 1
//simulate header included
#define __X86INTRIN_H
#endif
// finally include vectorclass
#include <vectorclass.h>
The text was updated successfully, but these errors were encountered:
Thank you for your suggestion.
I don't want to include any support for ARM in the vector class library because I have no access to test it. All functions have to be tested thoroughly in all possible configurations. I have automated test scripts that make thousands of tests for all possible configurations and compilers on x86. Making similar tests for ARM would be a lot of work and would undoubtedly reveal a lot of problems. I think it would be better to make a separate version of VCL for ARM, but somebody else will have to do this.
even if there is no plan to implement arm-instructions, it is moslty possible to use the sse2neon lib to emulate sse instructions on ARM.
So you can use vectorclass on ARM
i found some things to be defined before including the vectroclass.h
and a small change that has to be made to the instrset.h file.
it is working as far as i could test on apple M1 chips
maybe those changes can be directly applied to vectorclass due to a preprocesse like "VCL_USE_SSE2NEON"
cheers
/*
ARM compatible include of the vectorclass
on ARM/MAC the sse2neon lib will be imported
and some parameters for the vectorclass are prepared.
#IMPORTANT in vectorclass.h->instrset.h the cpuid function must be
hidden, since it is not compatible with ARM-compilers.
if missing, add the header-include check #if !defined(SSE2NEON_H)
to the function to hide it when compiling on ARM
remember that a dispatcher is not possible in this case.
*/
#if __arm64
#include <sse2neon.h>
// limit to 128byte, since we want to use ARM-neon
#define MAX_VECTOR_SIZE 128
//limit to sse4.2, sse2neon does not have any AVX instructions ( so far )
#define INSTRSET 6
//define unknown function
#define _mm_getcsr() 1
//simulate header included
#define __X86INTRIN_H
#endif
// finally include vectorclass
#include <vectorclass.h>
The text was updated successfully, but these errors were encountered: