forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
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 numpy#25346 from Mousius/highway-vqsort-float16
ENH: Enable 16-bit VQSort routines on AArch64
- Loading branch information
Showing
5 changed files
with
42 additions
and
3 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
Submodule highway
updated
71 files
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "highway_qsort.hpp" | ||
#define VQSORT_ONLY_STATIC 1 | ||
#include "hwy/contrib/sort/vqsort-inl.h" | ||
|
||
namespace np { namespace highway { namespace qsort_simd { | ||
|
||
template<> void NPY_CPU_DISPATCH_CURFX(QSort)(Half *arr, intptr_t size) | ||
{ | ||
hwy::HWY_NAMESPACE::VQSortStatic(reinterpret_cast<hwy::float16_t*>(arr), size, hwy::SortAscending()); | ||
} | ||
template<> void NPY_CPU_DISPATCH_CURFX(QSort)(uint16_t *arr, intptr_t size) | ||
{ | ||
hwy::HWY_NAMESPACE::VQSortStatic(arr, size, hwy::SortAscending()); | ||
} | ||
template<> void NPY_CPU_DISPATCH_CURFX(QSort)(int16_t *arr, intptr_t size) | ||
{ | ||
hwy::HWY_NAMESPACE::VQSortStatic(arr, size, hwy::SortAscending()); | ||
} | ||
|
||
} } } // np::highway::qsort_simd |
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