Skip to content

Commit

Permalink
sleef: add arch-specific resolvers if arch is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
simoll committed Jul 19, 2018
1 parent 088e5f2 commit 3b10d5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sleefLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,13 +426,16 @@ class SleefResolverService : public ResolverService {
, config(_config)
{
// ARM
#ifdef RV_ENABLE_ADVSIMD
if (config.useADVSIMD) {
auto * advSimdArch = new ArchFunctionList(SleefISA::SLEEF_ADVSIMD, "advsimd");
InitSleefMappings(advSimdArch->commonVectorMappings, 4, 2);
archLists.push_back(advSimdArch);
}
#endif

// x86
#ifdef RV_ENABLE_X86
if (config.useAVX512) {
auto * avx512Arch = new ArchFunctionList(SleefISA::SLEEF_AVX512, "avx512");
InitSleefMappings(avx512Arch->commonVectorMappings, 16, 8);
Expand All @@ -453,6 +456,7 @@ class SleefResolverService : public ResolverService {
InitSleefMappings(sseArch->commonVectorMappings, 4, 2);
archLists.push_back(sseArch);
}
#endif

// generic
// fall back to automatic vectorization of scalar implementations (baseline)
Expand Down

0 comments on commit 3b10d5d

Please sign in to comment.