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
54 template<
class InputIt,
class UnaryPredicate>
58#ifdef PARALLEL_ALGORITHMS_SUPPORTED
59 std::execution::par_unseq,
75 template<
class InputIt,
class UnaryPredicate>
79#ifdef PARALLEL_ALGORITHMS_SUPPORTED
80 std::execution::par_unseq,
96 template<
class InputIt,
class OutputIt>
100#ifdef PARALLEL_ALGORITHMS_SUPPORTED
101 std::execution::par_unseq,
117 template<
class InputIt,
class T>
118 typename std::iterator_traits<InputIt>::difference_type
122#ifdef PARALLEL_ALGORITHMS_SUPPORTED
123 std::execution::par_unseq,
139 template<
class InputIt1,
class InputIt2>
143#ifdef PARALLEL_ALGORITHMS_SUPPORTED
144 std::execution::par_unseq,
161 template<
class InputIt1,
class InputIt2,
class BinaryPredicate>
165#ifdef PARALLEL_ALGORITHMS_SUPPORTED
166 std::execution::par_unseq,
182 template<
class ForwardIt,
class T>
186#ifdef PARALLEL_ALGORITHMS_SUPPORTED
187 std::execution::par_unseq,
204 template<
class InputIt,
class T>
208#ifdef PARALLEL_ALGORITHMS_SUPPORTED
209 std::execution::par_unseq,
224 template<
class InputIt,
class UnaryFunction>
225 void for_each(InputIt first, InputIt last, UnaryFunction
f)
228#ifdef PARALLEL_ALGORITHMS_SUPPORTED
229 std::execution::par_unseq,
244 template<
class ForwardIt>
248#ifdef PARALLEL_ALGORITHMS_SUPPORTED
249 std::execution::par_unseq,
264 template<
class ForwardIt,
class Compare>
268#ifdef PARALLEL_ALGORITHMS_SUPPORTED
269 std::execution::par_unseq,
284 template<
class ForwardIt>
288#ifdef PARALLEL_ALGORITHMS_SUPPORTED
289 std::execution::par_unseq,
304 template<
class ForwardIt,
class Compare>
308#ifdef PARALLEL_ALGORITHMS_SUPPORTED
309 std::execution::par_unseq,
323 template<
class ForwardIt>
327#ifdef PARALLEL_ALGORITHMS_SUPPORTED
328 std::execution::par_unseq,
343 template<
class ForwardIt,
class Compare>
347#ifdef PARALLEL_ALGORITHMS_SUPPORTED
348 std::execution::par_unseq,
363 template<
class ForwardIt>
367#ifdef PARALLEL_ALGORITHMS_SUPPORTED
368 std::execution::par_unseq,
383 template<
class ForwardIt,
class Compare>
387#ifdef PARALLEL_ALGORITHMS_SUPPORTED
388 std::execution::par_unseq,
404 template<
class InputIt,
class UnaryPredicate>
408#ifdef PARALLEL_ALGORITHMS_SUPPORTED
409 std::execution::par_unseq,
424 template<
class RandomIt>
428#ifdef PARALLEL_ALGORITHMS_SUPPORTED
429 std::execution::par_unseq,
445 template<
class RandomIt,
class Compare>
449#ifdef PARALLEL_ALGORITHMS_SUPPORTED
450 std::execution::par_unseq,
467 template<
class ForwardIt,
class T>
471#ifdef PARALLEL_ALGORITHMS_SUPPORTED
472 std::execution::par_unseq,
487 template<
class B
idirIt>
491#ifdef PARALLEL_ALGORITHMS_SUPPORTED
492 std::execution::par_unseq,
506 template<
class ForwardIt>
510#ifdef PARALLEL_ALGORITHMS_SUPPORTED
511 std::execution::par_unseq,
529 template<
class InputIt1,
class InputIt2,
class OutputIt>
530 OutputIt
set_difference(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination)
533#ifdef PARALLEL_ALGORITHMS_SUPPORTED
534 std::execution::par_unseq,
555 template<
class InputIt1,
class InputIt2,
class OutputIt,
class Compare>
560 OutputIt destination,
564#ifdef PARALLEL_ALGORITHMS_SUPPORTED
565 std::execution::par_unseq,
586 template<
class InputIt1,
class InputIt2,
class OutputIt>
587 OutputIt
set_intersection(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination)
591#ifdef PARALLEL_ALGORITHMS_SUPPORTED
592 std::execution::par_unseq,
613 template<
class InputIt1,
class InputIt2,
class OutputIt,
class Compare>
618 OutputIt destination,
622#ifdef PARALLEL_ALGORITHMS_SUPPORTED
623 std::execution::par_unseq,
644 template<
class InputIt1,
class InputIt2,
class OutputIt>
645 OutputIt
set_union(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination)
649#ifdef PARALLEL_ALGORITHMS_SUPPORTED
650 std::execution::par_unseq,
671 template<
class InputIt1,
class InputIt2,
class OutputIt,
class Compare>
673 set_union(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp)
677#ifdef PARALLEL_ALGORITHMS_SUPPORTED
678 std::execution::par_unseq,
695 template<
class RandomIt>
699#ifdef PARALLEL_ALGORITHMS_SUPPORTED
700 std::execution::par_unseq,
714 template<
class RandomIt,
class Compare>
718#ifdef PARALLEL_ALGORITHMS_SUPPORTED
719 std::execution::par_unseq,
733 template<
class RandomIt>
737#ifdef PARALLEL_ALGORITHMS_SUPPORTED
738 std::execution::par_unseq,
752 template<
class RandomIt,
class Compare>
756#ifdef PARALLEL_ALGORITHMS_SUPPORTED
757 std::execution::par_unseq,
774 template<
class InputIt,
class OutputIt,
class UnaryOperation>
775 OutputIt
transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
778#ifdef PARALLEL_ALGORITHMS_SUPPORTED
779 std::execution::par_unseq,
798 template<
class InputIt1,
class InputIt2,
class OutputIt,
class BinaryOperation>
800 transform(InputIt1 first1, InputIt1 last1, InputIt2 first2, OutputIt destination, BinaryOperation unaryFunction)
803#ifdef PARALLEL_ALGORITHMS_SUPPORTED
804 std::execution::par_unseq,
822 template<
class InputIt,
class OutputIt>
826#ifdef PARALLEL_ALGORITHMS_SUPPORTED
827 std::execution::par_unseq,
844 template<
class InputIt,
class OutputIt,
class BinaryPredicate>
845 constexpr OutputIt
unique_copy(InputIt first, InputIt last, OutputIt destination, BinaryPredicate binaryFunction)
849#ifdef PARALLEL_ALGORITHMS_SUPPORTED
850 std::execution::par_unseq,
#define CONDITIONAL_NO_EXCEPT
Definition: StlAlgorithms.hpp:40
dtype f(GeneratorType &generator, dtype inDofN, dtype inDofD)
Definition: f.hpp:56
Definition: StlAlgorithms.hpp:44
bool any_of(InputIt first, InputIt last, UnaryPredicate p) noexcept
Definition: StlAlgorithms.hpp:76
std::iterator_traits< InputIt >::difference_type count(InputIt first, InputIt last, const T &value) noexcept
Definition: StlAlgorithms.hpp:119
void sort(RandomIt first, RandomIt last) noexcept
Definition: StlAlgorithms.hpp:696
bool is_sorted(ForwardIt first, ForwardIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:265
OutputIt set_union(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination) noexcept
Definition: StlAlgorithms.hpp:645
bool none_of(InputIt first, InputIt last, UnaryPredicate p) noexcept
Definition: StlAlgorithms.hpp:405
ForwardIt max_element(ForwardIt first, ForwardIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:305
ForwardIt max_element(ForwardIt first, ForwardIt last) noexcept
Definition: StlAlgorithms.hpp:285
OutputIt set_union(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp) noexcept
Definition: StlAlgorithms.hpp:673
void stable_sort(RandomIt first, RandomIt last) noexcept
Definition: StlAlgorithms.hpp:734
void sort(RandomIt first, RandomIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:715
void reverse(BidirIt first, BidirIt last) noexcept
Definition: StlAlgorithms.hpp:488
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
Definition: StlAlgorithms.hpp:775
bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, BinaryPredicate p) noexcept
Definition: StlAlgorithms.hpp:162
bool all_of(InputIt first, InputIt last, UnaryPredicate p) noexcept
Definition: StlAlgorithms.hpp:55
std::pair< ForwardIt, ForwardIt > minmax_element(ForwardIt first, ForwardIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:384
void for_each(InputIt first, InputIt last, UnaryFunction f)
Definition: StlAlgorithms.hpp:225
InputIt find(InputIt first, InputIt last, const T &value) noexcept
Definition: StlAlgorithms.hpp:205
void stable_sort(RandomIt first, RandomIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:753
constexpr OutputIt unique_copy(InputIt first, InputIt last, OutputIt destination) noexcept
Definition: StlAlgorithms.hpp:823
OutputIt set_difference(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp) noexcept
Definition: StlAlgorithms.hpp:556
OutputIt set_difference(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination)
Definition: StlAlgorithms.hpp:530
void nth_element(RandomIt first, RandomIt nth, RandomIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:446
void replace(ForwardIt first, ForwardIt last, const T &oldValue, const T &newValue) noexcept
Definition: StlAlgorithms.hpp:468
OutputIt set_intersection(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination) noexcept
Definition: StlAlgorithms.hpp:587
bool equal(InputIt1 first1, InputIt1 last1, InputIt2 first2) noexcept
Definition: StlAlgorithms.hpp:140
std::pair< ForwardIt, ForwardIt > minmax_element(ForwardIt first, ForwardIt last) noexcept
Definition: StlAlgorithms.hpp:364
bool is_sorted(ForwardIt first, ForwardIt last) noexcept
Definition: StlAlgorithms.hpp:245
ForwardIt min_element(ForwardIt first, ForwardIt last, Compare comp) noexcept
Definition: StlAlgorithms.hpp:344
void rotate(ForwardIt first, ForwardIt firstN, ForwardIt last) noexcept
Definition: StlAlgorithms.hpp:507
OutputIt set_intersection(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt destination, Compare comp) noexcept
Definition: StlAlgorithms.hpp:614
OutputIt copy(InputIt first, InputIt last, OutputIt destination) noexcept
Definition: StlAlgorithms.hpp:97
constexpr OutputIt unique_copy(InputIt first, InputIt last, OutputIt destination, BinaryPredicate binaryFunction) noexcept
Definition: StlAlgorithms.hpp:845
OutputIt transform(InputIt1 first1, InputIt1 last1, InputIt2 first2, OutputIt destination, BinaryOperation unaryFunction)
Definition: StlAlgorithms.hpp:800
void nth_element(RandomIt first, RandomIt nth, RandomIt last) noexcept
Definition: StlAlgorithms.hpp:425
ForwardIt min_element(ForwardIt first, ForwardIt last) noexcept
Definition: StlAlgorithms.hpp:324
void fill(ForwardIt first, ForwardIt last, const T &value) noexcept
Definition: StlAlgorithms.hpp:183