31 #ifndef __ROCCOM_FUNCTION_H__
32 #define __ROCCOM_FUNCTION_H__
81 Function( Member_func_ptr p,
const std::string &
s,
const int *t,
127 #ifndef DOXYGEN_SHOULD_SKIP_THIS
133 typedef void(*Func1)(
void*);
134 (*(Func1)(
_ptr))(a1);
137 typedef void(COM_Object::*Member_Func1)();
138 Member_Func1 f = (Member_Func1)
_mem_ptr;
140 (
reinterpret_cast<COM_Object*
>(a1)->*f)();
146 typedef void(*Func2)(
void*,
void*);
147 (*(Func2)(
_ptr))(a1,a2);
150 typedef void(COM_Object::*Member_Func2)(
void*);
151 Member_Func2 f = (Member_Func2)
_mem_ptr;
153 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2);
159 typedef void(*Func3)(
void*,
void*,
void*);
160 (*(Func3)(
_ptr))(a1,a2,a3);
163 typedef void(COM_Object::*Member_Func3)(
void*,
void*);
164 Member_Func3 f = (Member_Func3)
_mem_ptr;
166 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3);
173 typedef void(*Func4)(
void*,
void*,
void*,
void*);
174 (*(Func4)(
_ptr))(a1,a2,a3,a4);
177 typedef void(COM_Object::*Member_Func4)(
void*,
void*,
void*);
178 Member_Func4 f = (Member_Func4)
_mem_ptr;
180 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4);
185 void operator()(
void *a1,
void *a2,
void *a3,
void *a4,
void *a5) {
187 typedef void(*Func5)(
void*,
void*,
void*,
void*,
void*);
188 (*(Func5)(
_ptr))(a1,a2,a3,a4,a5);
191 typedef void(COM_Object::*Member_Func5)(
void*,
void*,
void*,
void*);
192 Member_Func5 f = (Member_Func5)
_mem_ptr;
194 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4,a5);
199 void operator()(
void *a1,
void *a2,
void *a3,
void *a4,
void *a5,
202 typedef void(*Func6)(
void*,
void*,
void*,
void*,
void*,
void*);
203 (*(Func6)(
_ptr))(a1,a2,a3,a4,a5,a6);
206 typedef void(COM_Object::*Member_Func6)(
void*,
void*,
void*,
void*,
void*);
207 Member_Func6 f = (Member_Func6)
_mem_ptr;
209 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4,a5,a6);
214 void operator()(
void *a1,
void *a2,
void *a3,
void *a4,
void *a5,
215 void *a6,
void *a7) {
217 typedef void(*Func7)(
void*,
void*,
void*,
void*,
void*,
void*,
void*);
218 (*(Func7)(
_ptr))(a1,a2,a3,a4,a5,a6,a7);
221 typedef void(COM_Object::*Member_Func7)(
void*,
void*,
void*,
void*,
223 Member_Func7 f = (Member_Func7)
_mem_ptr;
225 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4,a5,a6,a7);
230 void operator()(
void *a1,
void *a2,
void *a3,
void *a4,
void *a5,
231 void *a6,
void *a7,
void *a8) {
233 typedef void(*Func8)(
void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*);
234 (*(Func8)(
_ptr))(a1,a2,a3,a4,a5,a6,a7,a8);
237 typedef void(COM_Object::*Member_Func8)(
void*,
void*,
void*,
void*,
239 Member_Func8 f = (Member_Func8)
_mem_ptr;
241 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8);
246 void operator()(
void *a1,
void *a2,
void *a3,
void *a4,
void *a5,
247 void *a6,
void *a7,
void *a8,
void *a9) {
249 typedef void(*Func9)(
void*,
void*,
void*,
void*,
void*,
void*,
251 (*(Func9)(
_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9);
254 typedef void(COM_Object::*Member_Func9)(
void*,
void*,
void*,
void*,
void*,
256 Member_Func9 f = (Member_Func9)
_mem_ptr;
258 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9);
263 void operator()(
void *a1,
void *a2,
void *a3,
void *a4,
void *a5,
264 void *a6,
void *a7,
void *a8,
void *a9,
void *a10) {
266 typedef void(*Func10)(
void*,
void*,
void*,
void*,
void*,
void*,
267 void*,
void*,
void*,
void*);
268 (*(Func10)(
_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
271 typedef void(COM_Object::*Member_Func10)(
void*,
void*,
void*,
void*,
void*,
272 void*,
void*,
void*,
void*);
273 Member_Func10 f = (Member_Func10)
_mem_ptr;
275 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9,a10);
280 void operator()(
void *a1,
void *a2,
void *a3,
void *a4,
void *a5,
void *a6,
281 void *a7,
void *a8,
void *a9,
void *a10,
void *a11) {
283 typedef void(*Func11)(
void*,
void*,
void*,
void*,
void*,
void*,
284 void*,
void*,
void*,
void*,
void*);
285 (*(Func11)(
_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
288 typedef void(COM_Object::*Member_Func11)(
void*,
void*,
void*,
void*,
void*,
289 void*,
void*,
void*,
void*,
void*);
290 Member_Func11 f = (Member_Func11)
_mem_ptr;
292 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
297 void operator()(
void *a1,
void *a2,
void *a3,
void *a4,
void *a5,
void *a6,
298 void *a7,
void *a8,
void *a9,
void *a10,
void *a11,
void *a12 )
302 typedef void(*Func11)(
void*,
void*,
void*,
void*,
void*,
void*,
303 void*,
void*,
void*,
void*,
void*,
void*);
304 (*(Func11)(
_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
307 typedef void(COM_Object::*Member_Func11)(
void*,
void*,
void*,
void*,
void*,
308 void*,
void*,
void*,
void*,
void*,
void*);
309 Member_Func11 f = (Member_Func11)
_mem_ptr;
311 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
317 void operator()(
void *a1,
void *a2,
void *a3,
void *a4,
void *a5,
void *a6,
318 void *a7,
void *a8,
void *a9,
void *a10,
void *a11,
void* a12,
void *a13 )
322 typedef void(*Func11)(
void*,
void*,
void*,
void*,
void*,
void*,
323 void*,
void*,
void*,
void*,
void*,
void*,
void*);
324 (*(Func11)(
_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13);
327 typedef void(COM_Object::*Member_Func11)(
void*,
void*,
void*,
void*,
void*,
328 void*,
void*,
void*,
void*,
void*,
void*,
void*);
329 Member_Func11 f = (Member_Func11)
_mem_ptr;
331 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13);
336 void operator()(
void *a1,
void *a2,
void *a3,
void *a4,
void *a5,
void *a6,
337 void *a7,
void *a8,
void *a9,
void *a10,
void *a11,
void* a12,
void *a13,
void *a14 )
341 typedef void(*Func11)(
void*,
void*,
void*,
void*,
void*,
void*,
342 void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*);
343 (*(Func11)(
_ptr))(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14);
346 typedef void(COM_Object::*Member_Func11)(
void*,
void*,
void*,
void*,
void*,
347 void*,
void*,
void*,
void*,
void*,
void*,
void*,
void*);
348 Member_Func11 f = (Member_Func11)
_mem_ptr;
350 (
reinterpret_cast<COM_Object*
>(a1)->*f)(a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14);
365 case 3:
operator()( ps[0],ps[1],ps[2] );
break;
366 case 4:
operator()( ps[0],ps[1],ps[2],ps[3] );
break;
367 case 5:
operator()( ps[0],ps[1],ps[2],ps[3],ps[4] );
break;
368 case 6:
operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5] );
break;
369 case 7:
operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6] );
break;
370 case 8:
operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7] );
break;
371 case 9:
operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8] );
break;
372 case 10:
operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9] );
break;
373 case 11:
operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10] );
break;
374 case 12:
operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11] );
break;
375 case 13:
operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12] );
break;
376 case 14:
operator()( ps[0],ps[1],ps[2],ps[3],ps[4],ps[5],ps[6],ps[7],ps[8],ps[9],ps[10],ps[11],ps[12],ps[13] );
break;
393 #ifndef DOXYGEN_SHOULD_SKIP_THIS
399 std::vector<COM_Type>
_types;
void set_communicator(MPI_Comm c)
int COM_Type
Indices for derived data types.
bool is_output(int i) const
Check whether the ith argument is for output.
void operator()(void *a1, void *a2, void *a3, void *a4)
A Function object corresponds to a function member of a window.
bool is_optional(int i) const
Check whether the ith argument is optional.
Function(Member_func_ptr p, const std::string &s, const int *t, Attribute *a)
An Attribute object is a data member of a window.
#define COM_assertion_msg(EX, msg)
void operator()(void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9, void *a10, void *a11, void *a12, void *a13, void *a14)
void operator()(void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9, void *a10, void *a11)
This file contains some definitions of macros and constants for Roccoms.
Encapsulates the states of an exception.
void operator()(void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9, void *a10)
MPI_Comm communicator() const
std::string _intents
Intention of the argument.
int _ftype
Indicate the type of the function.
void operator()(void *a1, void *a2, void *a3, void *a4, void *a5)
bool is_metadata(int i) const
Check whether the ith argument is meta.
void(* Func_ptr)()
Pointer of functions.
bool is_literal(int i) const
Check whether the ith argument is literal type.
COM_Type data_type(int i) const
void operator()(void *a1, void *a2, void *a3)
Contains declarations of MPI subroutines used in Roccom.
This file contains a set of routines for error assertion.
Attribute * _attr
Member function.
void operator()(void *a1, void *a2, void *a3, void *a4, void *a5, void *a6)
void operator()(void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7)
Member_func_ptr _mem_ptr
Pointer to a member function.
void operator()(void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8)
Func_ptr pointer()
Get physical address of the function.
bool is_input(int i) const
Check whether the ith argument is for input.
void operator()(void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9, void *a10, void *a11, void *a12, void *a13)
void operator()(void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9)
int num_of_args() const
Get the number of arguments.
Function(Func_ptr p, const std::string &s, const int *t, Attribute *a, bool b=false)
Create a function object with physical address p.
std::vector< COM_Type > _types
Data type of the arguments.
Function()
Default constructor.
bool is_rawdata(int i) const
Check whether the ith argument is raw.
void operator()(void *a1)
void operator()(void *a1, void *a2)
void operator()(int n, void **ps)
invoke with an array of arguments
Func_ptr _ptr
Pointer to a regular function.
void validate_object(void *a1)
void operator()(void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8, void *a9, void *a10, void *a11, void *a12)