Skip to content
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

Simplify use of ISA specific routines through a unified API for static methods #143

Merged
merged 9 commits into from
Apr 23, 2024

Conversation

r-devulap
Copy link
Contributor

@r-devulap r-devulap commented Apr 1, 2024

Simplifies use avx512/avx2 specific methods via a single header file which when complied with the right AVX-512/AVX2 flags it calls the corresponding sort routines. Example:

#include "x86simdsort-static-incl.h"
int main()
{
    const int size = 1000;
    double arrd[size];
    x86simdsortStatic::qsort(arrd, size);
    return 0;
}

When compiled with -mavx512vl -mavx512dq, it calls the avx512_qsort routine and when compiled with -mavx2 it calls the avx2_qsort.

Todo:

  • Update README

@r-devulap r-devulap changed the title Simplify use of AVX512/AVX2 specific routines through a unified API for static methods Simplify use of ISA specific routines through a unified API for static methods Apr 1, 2024
Copy link
Contributor

@sterrettm2 sterrettm2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I just had a few comments I would like you to consider before merging it

lib/x86simdsort-spr.cpp Outdated Show resolved Hide resolved
src/x86simdsort-static-incl.h Show resolved Hide resolved
Copy link
Contributor

@sterrettm2 sterrettm2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@sterrettm2 sterrettm2 merged commit 4c3ade9 into intel:main Apr 23, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants