@@ -118,6 +118,10 @@ set(_reduction_sources
118118set (_boolean_reduction_sources
119119 ${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source /boolean_reductions.cpp
120120)
121+ set (_sorting_sources
122+ ${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source /sorting/sort .cpp
123+ ${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source /sorting/argsort.cpp
124+ )
121125set (_tensor_impl_sources
122126 ${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source /tensor_ctors.cpp
123127 ${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source /simplify_iteration_space.cpp
@@ -148,6 +152,10 @@ set(_tensor_reductions_impl_sources
148152 ${_boolean_reduction_sources}
149153 ${_reduction_sources}
150154)
155+ set (_tensor_sorting_impl_sources
156+ ${CMAKE_CURRENT_SOURCE_DIR} /libtensor/source /tensor_sorting.cpp
157+ ${_sorting_sources}
158+ )
151159
152160set (_py_trgts)
153161
@@ -166,6 +174,11 @@ pybind11_add_module(${python_module_name} MODULE ${_tensor_reductions_impl_sourc
166174add_sycl_to_target(TARGET ${python_module_name} SOURCES ${_tensor_reductions_impl_sources} )
167175list (APPEND _py_trgts ${python_module_name} )
168176
177+ set (python_module_name _tensor_sorting_impl)
178+ pybind11_add_module(${python_module_name} MODULE ${_tensor_sorting_impl_sources} )
179+ add_sycl_to_target(TARGET ${python_module_name} SOURCES ${_tensor_sorting_impl_sources} )
180+ list (APPEND _py_trgts ${python_module_name} )
181+
169182set (_clang_prefix "" )
170183if (WIN32 )
171184 set (_clang_prefix "/clang:" )
@@ -179,6 +192,7 @@ set(_no_fast_math_sources
179192list (APPEND _no_fast_math_sources
180193 ${_elementwise_sources}
181194 ${_reduction_sources}
195+ ${_sorting_sources}
182196)
183197
184198foreach (_src_fn ${_no_fast_math_sources} )
0 commit comments