Skip to content

Commit

Permalink
Convert selection.c.src to selection.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-sans-paille committed Jan 17, 2022
1 parent b83286e commit 584ddc9
Show file tree
Hide file tree
Showing 4 changed files with 654 additions and 420 deletions.
2 changes: 1 addition & 1 deletion numpy/core/setup.py
Expand Up @@ -952,7 +952,7 @@ def gl_if_msvc(build_cmd):
join('src', 'npysort', 'heapsort.cpp'),
join('src', 'npysort', 'radixsort.cpp'),
join('src', 'common', 'npy_partition.h.src'),
join('src', 'npysort', 'selection.c.src'),
join('src', 'npysort', 'selection.cpp'),
join('src', 'common', 'npy_binsearch.h'),
join('src', 'npysort', 'binsearch.cpp'),
]
Expand Down
8 changes: 8 additions & 0 deletions numpy/core/src/common/npy_partition.h.src
Expand Up @@ -28,6 +28,10 @@

#define NPY_MAX_PIVOT_STACK 50

#ifdef __cplusplus
extern "C" {
#endif

/**begin repeat
*
* #TYPE = BOOL, BYTE, UBYTE, SHORT, USHORT, INT, UINT, LONG, ULONG,
Expand Down Expand Up @@ -56,6 +60,10 @@ NPY_NO_EXPORT int aintroselect_@suff@(@type@ *v, npy_intp* tosort, npy_intp num,

/**end repeat**/

#ifdef __cplusplus
}
#endif

typedef struct {
int typenum;
PyArray_PartitionFunc * part[NPY_NSELECTS];
Expand Down

0 comments on commit 584ddc9

Please sign in to comment.