35 #if defined(__cpp_lib_parallel_algorithm) && defined(NUMCPP_USE_MULTITHREAD)
36 #define PARALLEL_ALGORITHMS_SUPPORTED
37 #define CONDITIONAL_NO_EXCEPT
40 #define CONDITIONAL_NO_EXCEPT noexcept
45 namespace stl_algorithms
56 template<
class InputIt,
class UnaryPredicate>
60 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
61 std::execution::par_unseq,
77 template<
class InputIt,
class UnaryPredicate>
81 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
82 std::execution::par_unseq,
98 template<
class InputIt,
class OutputIt>
102 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
103 std::execution::par_unseq,
119 template<
class InputIt,
class T>
120 typename std::iterator_traits<InputIt>::difference_type
124 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
125 std::execution::par_unseq,
141 template<
class InputIt1,
class InputIt2>
145 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
146 std::execution::par_unseq,
163 template<
class InputIt1,
class InputIt2,
class BinaryPredicate>
167 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
168 std::execution::par_unseq,
184 template<
class ForwardIt,
class T>
188 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
189 std::execution::par_unseq,
206 template<
class InputIt,
class T>
210 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
211 std::execution::par_unseq,
226 template<
class InputIt,
class UnaryFunction>
227 void for_each(InputIt first, InputIt last, UnaryFunction
f)
230 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
231 std::execution::par_unseq,
246 template<
class ForwardIt>
250 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
251 std::execution::par_unseq,
266 template<
class ForwardIt,
class Compare>
270 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
271 std::execution::par_unseq,
286 template<
class ForwardIt>
290 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
291 std::execution::par_unseq,
306 template<
class ForwardIt,
class Compare>
310 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
311 std::execution::par_unseq,
325 template<
class ForwardIt>
329 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
330 std::execution::par_unseq,
345 template<
class ForwardIt,
class Compare>
349 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
350 std::execution::par_unseq,
365 template<
class ForwardIt>
369 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
370 std::execution::par_unseq,
385 template<
class ForwardIt,
class Compare>
386 std::pair<ForwardIt, ForwardIt>
390 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
391 std::execution::par_unseq,
407 template<
class InputIt,
class UnaryPredicate>
411 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
412 std::execution::par_unseq,
427 template<
class RandomIt>
431 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
432 std::execution::par_unseq,
448 template<
class RandomIt,
class Compare>
452 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
453 std::execution::par_unseq,
470 template<
class ForwardIt,
class T>
474 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
475 std::execution::par_unseq,
490 template<
class B
idirIt>
494 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
495 std::execution::par_unseq,
509 template<
class ForwardIt>
513 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
514 std::execution::par_unseq,
532 template<
class InputIt1,
class InputIt2,
class OutputIt>
533 OutputIt
set_difference(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination)
536 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
537 std::execution::par_unseq,
558 template<
class InputIt1,
class InputIt2,
class OutputIt,
class Compare>
563 OutputIt destination,
567 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
568 std::execution::par_unseq,
589 template<
class InputIt1,
class InputIt2,
class OutputIt>
597 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
598 std::execution::par_unseq,
619 template<
class InputIt1,
class InputIt2,
class OutputIt,
class Compare>
624 OutputIt destination,
628 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
629 std::execution::par_unseq,
650 template<
class InputIt1,
class InputIt2,
class OutputIt>
651 OutputIt
set_union(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination)
655 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
656 std::execution::par_unseq,
677 template<
class InputIt1,
class InputIt2,
class OutputIt,
class Compare>
682 OutputIt destination,
686 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
687 std::execution::par_unseq,
704 template<
class RandomIt>
708 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
709 std::execution::par_unseq,
723 template<
class RandomIt,
class Compare>
727 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
728 std::execution::par_unseq,
742 template<
class RandomIt>
746 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
747 std::execution::par_unseq,
761 template<
class RandomIt,
class Compare>
765 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
766 std::execution::par_unseq,
783 template<
class InputIt,
class OutputIt,
class UnaryOperation>
784 OutputIt
transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
787 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
788 std::execution::par_unseq,
807 template<
class InputIt1,
class InputIt2,
class OutputIt,
class BinaryOperation>
811 OutputIt destination,
812 BinaryOperation unaryFunction)
815 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
816 std::execution::par_unseq,
834 template<
class InputIt,
class OutputIt>
838 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
839 std::execution::par_unseq,
856 template<
class InputIt,
class OutputIt,
class BinaryPredicate>
859 OutputIt destination,
863 #ifdef PARALLEL_ALGORITHMS_SUPPORTED
864 std::execution::par_unseq,
#define CONDITIONAL_NO_EXCEPT
Definition: StlAlgorithms.hpp:40
dtype f(GeneratorType &generator, dtype inDofN, dtype inDofD)
Definition: f.hpp:58
bool any_of(InputIt first, InputIt last, UnaryPredicate p) noexcept
Definition: StlAlgorithms.hpp:78
void sort(RandomIt first, RandomIt last) noexcept
Definition: StlAlgorithms.hpp:705
bool is_sorted(ForwardIt first, ForwardIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:267
std::iterator_traits< InputIt >::difference_type count(InputIt first, InputIt last, const T &value) noexcept
Definition: StlAlgorithms.hpp:121
OutputIt set_union(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination) noexcept
Definition: StlAlgorithms.hpp:651
bool none_of(InputIt first, InputIt last, UnaryPredicate p) noexcept
Definition: StlAlgorithms.hpp:408
ForwardIt max_element(ForwardIt first, ForwardIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:307
ForwardIt max_element(ForwardIt first, ForwardIt last) noexcept
Definition: StlAlgorithms.hpp:287
OutputIt set_union(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp) noexcept
Definition: StlAlgorithms.hpp:678
void stable_sort(RandomIt first, RandomIt last) noexcept
Definition: StlAlgorithms.hpp:743
void sort(RandomIt first, RandomIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:724
void reverse(BidirIt first, BidirIt last) noexcept
Definition: StlAlgorithms.hpp:491
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
Definition: StlAlgorithms.hpp:784
bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, BinaryPredicate p) noexcept
Definition: StlAlgorithms.hpp:164
bool all_of(InputIt first, InputIt last, UnaryPredicate p) noexcept
Definition: StlAlgorithms.hpp:57
void for_each(InputIt first, InputIt last, UnaryFunction f)
Definition: StlAlgorithms.hpp:227
InputIt find(InputIt first, InputIt last, const T &value) noexcept
Definition: StlAlgorithms.hpp:207
void stable_sort(RandomIt first, RandomIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:762
constexpr OutputIt unique_copy(InputIt first, InputIt last, OutputIt destination) noexcept
Definition: StlAlgorithms.hpp:835
OutputIt set_difference(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp) noexcept
Definition: StlAlgorithms.hpp:559
OutputIt set_difference(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination)
Definition: StlAlgorithms.hpp:533
std::pair< ForwardIt, ForwardIt > minmax_element(ForwardIt first, ForwardIt last) noexcept
Definition: StlAlgorithms.hpp:366
void nth_element(RandomIt first, RandomIt nth, RandomIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:449
void replace(ForwardIt first, ForwardIt last, const T &oldValue, const T &newValue) noexcept
Definition: StlAlgorithms.hpp:471
OutputIt set_intersection(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination) noexcept
Definition: StlAlgorithms.hpp:590
bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2) noexcept
Definition: StlAlgorithms.hpp:142
bool is_sorted(ForwardIt first, ForwardIt last) noexcept
Definition: StlAlgorithms.hpp:247
ForwardIt min_element(ForwardIt first, ForwardIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:346
void rotate(ForwardIt first, ForwardIt firstN, ForwardIt last) noexcept
Definition: StlAlgorithms.hpp:510
OutputIt set_intersection(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp) noexcept
Definition: StlAlgorithms.hpp:620
std::pair< ForwardIt, ForwardIt > minmax_element(ForwardIt first, ForwardIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:387
OutputIt copy(InputIt first, InputIt last, OutputIt destination) noexcept
Definition: StlAlgorithms.hpp:99
constexpr OutputIt unique_copy(InputIt first, InputIt last, OutputIt destination, BinaryPredicate binaryFunction) noexcept
Definition: StlAlgorithms.hpp:857
OutputIt transform(InputIt1 first1, InputIt1 last1, InputIt2 first2, OutputIt destination, BinaryOperation unaryFunction)
Definition: StlAlgorithms.hpp:808
void nth_element(RandomIt first, RandomIt nth, RandomIt last) noexcept
Definition: StlAlgorithms.hpp:428
ForwardIt min_element(ForwardIt first, ForwardIt last) noexcept
Definition: StlAlgorithms.hpp:326
void fill(ForwardIt first, ForwardIt last, const T &value) noexcept
Definition: StlAlgorithms.hpp:185
Definition: Coordinate.hpp:45