MCPcopy Create free account
hub / github.com/boostorg/compute / function

Class function

include/boost/compute/function.hpp:117–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115/// \brief A function object.
116template<class Signature>
117class function
118{
119public:
120 /// \internal_
121 typedef typename
122 boost::function_traits<Signature>::result_type result_type;
123
124 /// \internal_
125 BOOST_STATIC_CONSTANT(
126 size_t, arity = boost::function_traits<Signature>::arity
127 );
128
129 /// \internal_
130 typedef Signature signature;
131
132 /// Creates a new function object with \p name.
133 function(const std::string &name)
134 : m_name(name)
135 {
136 }
137
138 /// Destroys the function object.
139 ~function()
140 {
141 }
142
143 /// \internal_
144 std::string name() const
145 {
146 return m_name;
147 }
148
149 /// \internal_
150 void set_source(const std::string &source)
151 {
152 m_source = source;
153 }
154
155 /// \internal_
156 std::string source() const
157 {
158 return m_source;
159 }
160
161 /// \internal_
162 void define(std::string name, std::string value = std::string())
163 {
164 m_definitions[name] = value;
165 }
166
167 /// \internal_
168 detail::invoked_function<result_type, boost::tuple<> >
169 operator()() const
170 {
171 BOOST_STATIC_ASSERT_MSG(
172 arity == 0,
173 "Non-nullary function invoked with zero arguments"
174 );

Callers 14

operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85
for_each_kernelMethod · 0.85
transform_if_implFunction · 0.85
reduceFunction · 0.85
inplace_reduceFunction · 0.85
serial_accumulateFunction · 0.85
carry_outsFunction · 0.85
carry_insFunction · 0.85
final_reductionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected