MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / function

Class function

compute/include/boost/compute/function.hpp:117–243  ·  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 bool operator==(const function<Signature>& other) const
168 {
169 return
170 (m_name == other.m_name)
171 && (m_definitions == other.m_definitions)
172 && (m_source == other.m_source);
173 }
174

Callers 15

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