@@ -400,7 +400,6 @@ public:
400
400
// /
401
401
// / \see map_reduce(Iterator begin, Iterator end, Mapper&& mapper, Reducer&& r)
402
402
template <typename Reducer, typename Func, typename ... Args>
403
- inline
404
403
auto map_reduce (Reducer&& r, Func&& func, Args&&... args) -> typename reducer_traits<Reducer>::future_type
405
404
{
406
405
auto rng = std::views::iota (size_t (0 ), _instances.size ());
@@ -417,7 +416,6 @@ public:
417
416
418
417
// / The const version of \ref map_reduce(Reducer&& r, Func&& func)
419
418
template <typename Reducer, typename Func, typename ... Args>
420
- inline
421
419
auto map_reduce (Reducer&& r, Func&& func, Args&&... args) const -> typename reducer_traits<Reducer>::future_type
422
420
{
423
421
auto rng = std::views::iota (size_t (0 ), _instances.size ());
@@ -449,7 +447,6 @@ public:
449
447
// / \return Result of invoking `map` with each instance in parallel, reduced by calling
450
448
// / `reduce()` on each adjacent pair of results.
451
449
template <typename Mapper, typename Initial, typename Reduce>
452
- inline
453
450
future<Initial>
454
451
map_reduce0 (Mapper map, Initial initial, Reduce reduce) {
455
452
auto wrapped_map = [this , map] (unsigned c) {
@@ -466,7 +463,6 @@ public:
466
463
467
464
// / The const version of \ref map_reduce0(Mapper map, Initial initial, Reduce reduce)
468
465
template <typename Mapper, typename Initial, typename Reduce>
469
- inline
470
466
future<Initial>
471
467
map_reduce0 (Mapper map, Initial initial, Reduce reduce) const {
472
468
auto wrapped_map = [this , map] (unsigned c) {
@@ -491,7 +487,7 @@ public:
491
487
// / \tparam Mapper unary function taking `Service&` and producing some result.
492
488
// / \return Result vector of invoking `map` with each instance in parallel
493
489
template <typename Mapper, typename Future = futurize_t <std::invoke_result_t <Mapper,Service&>>, typename return_type = decltype(internal::untuple(std::declval<typename Future::tuple_type>()))>
494
- inline future<std::vector<return_type>> map (Mapper mapper) {
490
+ future<std::vector<return_type>> map (Mapper mapper) {
495
491
return do_with (std::vector<return_type>(), std::move (mapper),
496
492
[this ] (std::vector<return_type>& vec, Mapper& mapper) mutable {
497
493
vec.resize (_instances.size ());
@@ -588,7 +584,6 @@ sharded<Service>::~sharded() {
588
584
namespace internal {
589
585
590
586
template <typename T>
591
- inline
592
587
T&&
593
588
unwrap_sharded_arg (T&& arg) {
594
589
return std::forward<T>(arg);
@@ -706,20 +701,17 @@ struct sharded_call_stop {
706
701
707
702
template <>
708
703
template <typename Service>
709
- inline
710
704
future<> sharded_call_stop<true >::call(Service& instance) {
711
705
return instance.stop ();
712
706
}
713
707
714
708
template <>
715
709
template <typename Service>
716
- inline
717
710
future<> sharded_call_stop<false >::call(Service&) {
718
711
return make_ready_future<>();
719
712
}
720
713
721
714
template <typename Service>
722
- inline
723
715
future<>
724
716
stop_sharded_instance (Service& instance) {
725
717
constexpr bool has_stop = internal::sharded_has_stop::check<Service>(0 );
@@ -773,7 +765,6 @@ sharded<Service>::invoke_on_all(smp_submit_to_options options, std::function<fut
773
765
}
774
766
775
767
template <typename Service>
776
- inline
777
768
future<>
778
769
sharded<Service>::invoke_on_all(std::function<future<> (Service&)> func) noexcept {
779
770
try {
@@ -787,7 +778,6 @@ template <typename Service>
787
778
template <typename Func, typename ... Args>
788
779
requires std::invocable<Func, Service&, internal::sharded_unwrap_t <Args>...>
789
780
&& std::is_same_v<futurize_t <std::invoke_result_t <Func, Service&, internal::sharded_unwrap_t <Args>...>>, future<>>
790
- inline
791
781
future<>
792
782
sharded<Service>::invoke_on_all(smp_submit_to_options options, Func func, Args... args) noexcept {
793
783
try {
@@ -805,7 +795,6 @@ template <typename Service>
805
795
template <typename Func, typename ... Args>
806
796
requires std::invocable<Func, Service&, internal::sharded_unwrap_t <Args>...>
807
797
&& std::is_same_v<futurize_t <std::invoke_result_t <Func, Service&, internal::sharded_unwrap_t <Args>...>>, future<>>
808
- inline
809
798
future<>
810
799
sharded<Service>::invoke_on_all(Func func, Args... args) noexcept {
811
800
try {
@@ -819,7 +808,6 @@ template <typename Service>
819
808
template <typename Func, typename ... Args>
820
809
requires std::invocable<Func, Service&, Args...>
821
810
&& std::is_same_v<futurize_t <std::invoke_result_t <Func, Service&, Args...>>, future<>>
822
- inline
823
811
future<>
824
812
sharded<Service>::invoke_on_others(smp_submit_to_options options, Func func, Args... args) noexcept {
825
813
try {
@@ -835,7 +823,6 @@ template <typename Service>
835
823
template <typename Func, typename ... Args>
836
824
requires std::invocable<Func, Service&, Args...>
837
825
&& std::is_same_v<futurize_t <std::invoke_result_t <Func, Service&, Args...>>, future<>>
838
- inline
839
826
future<>
840
827
sharded<Service>::invoke_on_others(Func func, Args... args) noexcept {
841
828
try {
@@ -848,7 +835,6 @@ sharded<Service>::invoke_on_others(Func func, Args... args) noexcept {
848
835
template <typename Service>
849
836
template <typename Func, typename ... Args, typename Ret>
850
837
requires std::invocable<Func, Service&, Args&&...>
851
- inline
852
838
Ret
853
839
sharded<Service>::invoke_on(unsigned id, smp_submit_to_options options, Func&& func, Args&&... args) {
854
840
return smp::submit_to (id, options, [this , func = std::forward<Func>(func), args = std::tuple (std::move (args)...)] () mutable {
@@ -860,7 +846,6 @@ sharded<Service>::invoke_on(unsigned id, smp_submit_to_options options, Func&& f
860
846
template <typename Service>
861
847
template <typename Func, typename ... Args, typename Ret>
862
848
requires std::invocable<Func, Service&, Args&&...>
863
- inline
864
849
Ret
865
850
sharded<Service>::invoke_on(unsigned id, Func&& func, Args&&... args) {
866
851
return invoke_on (id, smp_submit_to_options (), std::forward<Func>(func), std::forward<Args>(args)...);
@@ -871,7 +856,6 @@ template <typename R, typename Func, typename... Args>
871
856
requires std::invocable<Func, Service&, Args...>
872
857
&& std::is_same_v<futurize_t <std::invoke_result_t <Func, Service&, internal::sharded_unwrap_t <Args>...>>, future<>>
873
858
&& internal::unsigned_range<R>
874
- inline
875
859
future<>
876
860
sharded<Service>::invoke_on(R range, smp_submit_to_options options, Func func, Args... args) noexcept {
877
861
try {
@@ -898,7 +882,6 @@ template <typename R, typename Func, typename... Args>
898
882
requires std::invocable<Func, Service&, Args...>
899
883
&& std::is_same_v<futurize_t <std::invoke_result_t <Func, Service&, internal::sharded_unwrap_t <Args>...>>, future<>>
900
884
&& internal::unsigned_range<R>
901
- inline
902
885
future<>
903
886
sharded<Service>::invoke_on(R range, Func func, Args... args) noexcept {
904
887
try {
@@ -927,7 +910,7 @@ shared_ptr<Service> sharded<Service>::local_shared() noexcept {
927
910
}
928
911
929
912
template <typename Service>
930
- inline bool sharded<Service>::local_is_initialized() const noexcept {
913
+ bool sharded<Service>::local_is_initialized() const noexcept {
931
914
return _instances.size () > this_shard_id () &&
932
915
_instances[this_shard_id ()].service ;
933
916
}
0 commit comments