proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
share.h
Go to the documentation of this file.
1
/*
2
* Copyright 2018-present Facebook, Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#pragma once
17
18
#include <
folly/experimental/pushmi/o/extension_operators.h
>
19
#include <
folly/experimental/pushmi/o/submit.h
>
20
#include <
folly/experimental/pushmi/receiver.h
>
21
22
#include <
folly/experimental/pushmi/subject.h
>
23
24
namespace
folly
{
25
namespace
pushmi {
26
27
namespace
detail
{
28
29
template
<
class
... TN>
30
struct
share_fn
{
31
private
:
32
struct
impl
{
33
PUSHMI_TEMPLATE
(
class
In)
34
(
requires
Sender<In>)
35
auto
operator
()(In in)
const
{
36
subject<properties_t<In>
, TN...>
sub
;
37
submit
(in,
sub
.receiver());
38
return
sub
;
39
}
40
};
41
42
public
:
43
auto
operator()
()
const
{
44
return
impl
{};
45
}
46
};
47
48
}
// namespace detail
49
50
namespace
operators {
51
52
template
<
class
... TN>
53
PUSHMI_INLINE_VAR
constexpr
detail::share_fn
<TN...>
share
{};
54
55
}
// namespace operators
56
57
}
// namespace pushmi
58
}
// namespace folly
folly::gen::sub
Sub sub(Sink sink)
Definition:
Parallel.h:104
folly::pushmi::operators::share
PUSHMI_INLINE_VAR constexpr detail::share_fn< TN... > share
Definition:
share.h:53
folly
—— Concurrent Priority Queue Implementation ——
Definition:
AtomicBitSet.h:29
folly::pushmi::detail::share_fn
Definition:
share.h:30
detail
Definition:
HashBenchmark.cpp:32
receiver.h
folly::pushmi::subject
Definition:
subject.h:27
submit.h
folly::pushmi::detail::requires
requires requires(::folly::pushmi::invoke(std::declval< F >(), std::get< Is >(std::declval< Tuple >())...))) const expr decltype(auto) apply_impl(F &&f
PUSHMI_INLINE_VAR
#define PUSHMI_INLINE_VAR
Definition:
concept_def.h:60
subject.h
extension_operators.h
folly::pushmi::submit
PUSHMI_INLINE_VAR constexpr __adl::do_submit_fn submit
Definition:
extension_points.h:360
folly::pushmi::detail::PUSHMI_TEMPLATE
PUSHMI_TEMPLATE(class In, class Out, bool SenderRequires, bool SingleSenderRequires, bool TimeSingleSenderRequires)(requires Sender< In > &&Receiver< Out >) constexpr bool sender_requires_from()
Definition:
extension_operators.h:224
folly::pushmi::detail::share_fn::impl
Definition:
share.h:32
folly::pushmi::detail::share_fn::operator()
auto operator()() const
Definition:
share.h:43
proxygen
folly
folly
experimental
pushmi
o
share.h
Generated by
1.8.11