PULSAR
2.0.0
Parallel Ultra-Light Systolic Array Runtime
Main Page
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Typedefs
Enumerations
Macros
Groups
prt_channel.h
Go to the documentation of this file.
1
11
#ifndef PRT_CHANNEL_H
12
#define PRT_CHANNEL_H
13
14
#include "
prt.h
"
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
20
struct
prt_vdp_s
;
21
struct
prt_packet_s
;
22
34
typedef
struct
prt_channel_s
{
35
struct
prt_vdp_s
*dst_vdp;
// Back pointer to the destination VDP.
36
struct
prt_vdp_s
*src_vdp;
// Back pointer to the source VDP.
37
struct
prt_proxy_s
*proxy;
// Pointer to the comm proxy.
38
size_t
size;
// Max packet size in bytes.
39
int
*src_tuple;
// Tuple of the source VDP.
40
int
src_slot;
// Slot in the source VDP.
41
int
*dst_tuple;
// Tuple of the destination VDP.
42
int
dst_slot;
// Slot in the destination VDP.
43
int
src_node;
// Source node.
44
int
dst_node;
// Destination node.
45
int
tag;
// Tag for MPI communication.
46
icl_deque_t
*packets;
// List of data packets.
47
int
active;
// Activity flag.
48
cudaStream_t in_stream;
// Inbound stream.
49
cudaStream_t out_stream;
// Outbound stream.
50
}
prt_channel_t
;
51
56
typedef
enum
prt_channel_direction_e
{
57
PRT_INPUT_CHANNEL, PRT_OUTPUT_CHANNEL
58
}
prt_channel_direction_t
;
59
60
prt_channel_t
*
prt_channel_new
(
61
size_t
size,
62
int
*src_tuple,
int
src_slot,
63
int
*dst_tuple,
int
dst_slot);
64
void
prt_channel_delete
(
prt_channel_t
*channel);
65
void
prt_channel_push_host
(
66
struct
prt_vdp_s
*vdp,
prt_channel_t
*channel,
struct
prt_packet_s
*packet);
67
void
prt_channel_push_device
(
68
struct
prt_vdp_s
*vdp,
prt_channel_t
*channel,
struct
prt_packet_s
*packet);
69
struct
prt_packet_s
*
prt_channel_pop
(
prt_channel_t
*channel);
70
int
prt_channel_empty
(
prt_channel_t
*channel);
71
int
prt_channel_compare
(
void
*channel1,
void
*channel2);
72
void
prt_channel_off
(
prt_channel_t
*channel);
73
void
prt_channel_on
(
prt_channel_t
*channel);
74
75
#ifdef __cplusplus
76
}
77
#endif
78
79
#endif
/* PRT_CHANNEL_H */
prt_channel.h
Generated on Thu Nov 20 2014 18:12:00 for PULSAR by
1.8.4