-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from r-devulap/maint
Simplify use of ISA specific routines through a unified API for static methods
- Loading branch information
Showing
37 changed files
with
284 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
CXX ?= g++-12 | ||
CFLAGS = -I../src -std=c++17 -O3 $(if $(CXXFLAGS),$(CXXFLAGS),) | ||
EXE = qsort32avx2 argsort kvsort qsortfp16 qsort16 qsort32 qsort64 | ||
CXX ?= g++-13 | ||
CFLAGS = -I../src -std=c++17 -O3 | ||
EXE = kvsort qsortavx2 qsortavx512 qsortspr qsorticl | ||
|
||
default: all | ||
all : $(EXE) | ||
|
||
qsortfp16: avx512fp-16bit-qsort.cpp | ||
$(CXX) -o qsortfp16 -march=sapphirerapids $(CFLAGS) avx512fp-16bit-qsort.cpp | ||
|
||
qsort16: avx512-16bit-qsort.cpp | ||
$(CXX) -o qsort16 -march=icelake-client $(CFLAGS) avx512-16bit-qsort.cpp | ||
|
||
qsort32: avx512-32bit-qsort.cpp | ||
$(CXX) -o qsort32 -march=skylake-avx512 $(CFLAGS) avx512-32bit-qsort.cpp | ||
kvsort: avx512-kv.cpp | ||
$(CXX) -o kvsort -mavx512vl -mavx512dq $(CFLAGS) avx512-kv.cpp | ||
|
||
qsort32avx2: avx2-32bit-qsort.cpp | ||
$(CXX) -o qsort32avx2 -march=haswell $(CFLAGS) avx2-32bit-qsort.cpp | ||
qsortavx512: skx-avx2.cpp | ||
$(CXX) -o qsortavx512 -mavx512vl -mavx512dq $(CFLAGS) skx-avx2.cpp | ||
|
||
qsort64: avx512-64bit-qsort.cpp | ||
$(CXX) -o qsort64 -march=skylake-avx512 $(CFLAGS) avx512-64bit-qsort.cpp | ||
qsortavx2: skx-avx2.cpp | ||
$(CXX) -o qsortavx2 -mavx2 $(CFLAGS) skx-avx2.cpp | ||
|
||
argsort: avx512-argsort.cpp | ||
$(CXX) -o argsort -march=skylake-avx512 $(CFLAGS) avx512-argsort.cpp | ||
qsorticl: icl-16bit.cpp | ||
$(CXX) -o qsorticl -mavx512vl -mavx512bw -mavx512dq -mavx512vbmi2 $(CFLAGS) icl-16bit.cpp | ||
|
||
kvsort: avx512-kv.cpp | ||
$(CXX) -o kvsort -march=skylake-avx512 $(CFLAGS) avx512-kv.cpp | ||
qsortspr: spr-16bit.cpp | ||
$(CXX) -o qsortspr -mavx512vl -mavx512dq -mavx512vbmi2 -mavx512fp16 $(CFLAGS) spr-16bit.cpp | ||
|
||
clean: | ||
$(RM) $(EXE) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "x86simdsort-static-incl.h" | ||
|
||
int main() | ||
{ | ||
const int size = 1000; | ||
short arr[size]; | ||
x86simdsortStatic::qsort(arr, size); | ||
x86simdsortStatic::qselect(arr, 10, size); | ||
x86simdsortStatic::partial_qsort(arr, 10, size); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "x86simdsort-static-incl.h" | ||
|
||
int main() | ||
{ | ||
const int size = 1000; | ||
double arrd[size]; | ||
float arrf[size]; | ||
x86simdsortStatic::qsort(arrf, size); | ||
x86simdsortStatic::qsort(arrd, size); | ||
x86simdsortStatic::qselect(arrf, 10, size); | ||
x86simdsortStatic::qselect(arrd, 10, size); | ||
x86simdsortStatic::partial_qsort(arrf, 10, size); | ||
x86simdsortStatic::partial_qsort(arrd, 10, size); | ||
auto arg1 = x86simdsortStatic::argsort(arrf, size); | ||
auto arg2 = x86simdsortStatic::argselect(arrf, 10, size); | ||
auto arg3 = x86simdsortStatic::argsort(arrd, size); | ||
auto arg4 = x86simdsortStatic::argselect(arrd, 10, size); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "x86simdsort-static-incl.h" | ||
|
||
int main() | ||
{ | ||
const int size = 1000; | ||
_Float16 arr[size]; | ||
x86simdsortStatic::qsort(arr, size); | ||
x86simdsortStatic::qselect(arr, 10, size); | ||
x86simdsortStatic::partial_qsort(arr, 10, size); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.