7 #define DOL_write(port, buf, len, process) \
\r
8 dolwrite(static_cast<OutPort<char> *>(port), buf, len, process)
\r
9 #define DOL_read(port, buf, len, process) \
\r
10 dolread(static_cast<InPort<char> *>(port), buf, len, process)
\r
12 void DOL_detach(DOLProcess* p);
\r
14 //fifo access functions
\r
15 unsigned dolwrite(OutPort<char> *out, const void *buf, unsigned len, const DOLProcess *process);
\r
16 unsigned dolread(InPort<char> *in, const void *buf, unsigned len, const DOLProcess *process);
\r
18 void createPort(void **port,
\r
20 int number_of_indices,
\r
21 int index0, int range0);
\r
23 void createPort(void **port,
\r
25 int number_of_indices,
\r
26 int index0, int range0,
\r
27 int index1, int range1);
\r
29 void createPort(void **port,
\r
31 int number_of_indices,
\r
32 int index0, int range0,
\r
33 int index1, int range1,
\r
34 int index2, int range2);
\r
36 void createPort(void **port,
\r
38 int number_of_indices,
\r
39 int index0, int range0,
\r
40 int index1, int range1,
\r
41 int index2, int range2,
\r
42 int index3, int range3);
\r
44 #define GETINDEX(dimension) \
\r
45 static_cast<ProcessWrapper *>(p->wptr)->getIndex(dimension)
\r
48 * macro to create a variable to store a port name
\r
50 * @param name name of the variable
\r
52 #define CREATEPORTVAR(name) void *name
\r
55 * Create the port name of an iterated port based on its basename and the
\r
58 * @param port buffer where the result is stored (created using
\r
60 * @param base basename of the port
\r
61 * @param number_of_indices number of dimensions of the port
\r
62 * @param index_range_pairs index and range values for each dimension
\r
64 #define CREATEPORT(port, base, number_of_indices, index_range_pairs...) \
\r
65 createPort((void**)(&port), base, number_of_indices, index_range_pairs)
\r