8000 Use Highway with Static Dispatch for some types in Absolute by Mousius · Pull Request #24385 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Use Highway with Static Dispatch for some types in Absolute #24385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove dispatcher singleton
  • Loading branch information
Mousius committed Sep 7, 2023
commit b794bf202c3d3457ef4dc3f01a8dc002454a0f53
9 changes: 3 additions & 6 deletions numpy/core/src/umath/absolute.dispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,19 @@ extern "C" {
NPY_NO_EXPORT void
INT_absolute(char **args, npy_intp const *dimensions, npy_intp const *steps, void *NPY_UNUSED(func))
{
static auto dispatcher = HWY_STATIC_DISPATCH(INT_SuperAbsolute);
return dispatcher(args, dimensions, steps);
HWY_STATIC_DISPATCH(INT_SuperAbsolute)(args, dimensions, steps);
}

NPY_NO_EXPORT void
DOUBLE_absolute(char **args, npy_intp const *dimensions, npy_intp const *steps, void *NPY_UNUSED(func))
{
static auto dispatcher = HWY_STATIC_DISPATCH(DOUBLE_SuperAbsolute);
return dispatcher(args, dimensions, steps);
HWY_STATIC_DISPATCH(DOUBLE_SuperAbsolute)(args, dimensions, steps);
}

NPY_NO_EXPORT void
FLOAT_absolute(char **args, npy_intp const *dimensions, npy_intp const *steps, void *NPY_UNUSED(func))
{
static auto dispatcher = HWY_STATIC_DISPATCH(FLOAT_SuperAbsolute);
return dispatcher(args, dimensions, steps);
HWY_STATIC_DISPATCH(FLOAT_SuperAbsolute)(args, dimensions, steps);
}

} // extern "C"
Expand Down
0