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_vdp.h
Go to the documentation of this file.
1
11
#ifndef PRT_VDP_H
12
#define PRT_VDP_H
13
14
#include "
prt.h
"
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
20
struct
prt_vdp_s
;
21
struct
prt_thread_s
;
22
struct
prt_channel_s
;
23
enum
prt_channel_direction_e
;
24
29
typedef
void (*
prt_vdp_function_t
)(
struct
prt_vdp_s
*);
30
39
typedef
struct
prt_vdp_s
{
40
prt_location_t
location;
// VDP's location (host or device).
41
struct
prt_thread_s
*thread;
// Back pointer to the parent thread.
42
struct
prt_device_s
*device;
// Back pointer to the parent device.
43
struct
prt_vsa_s
*vsa;
// Back pointer to the VSA.
44
int
*tuple;
// VDP's tuple.
45
int
counter;
// VDP's countdown counter.
46
int
num_inputs;
// Number of input channels.
47
struct
prt_channel_s
**input;
// Array of input channels.
48
int
num_outputs;
// Number of output channels.
49
struct
prt_channel_s
**output;
// Array of output channels.
50
prt_vdp_function_t
function
;
// VDP's function.
51
void
*local_store;
// VDP's persistent local storage.
52
void
*global_store;
// VSA's read-only global store.
53
int
color;
// RGB color for tracing.
54
cudaStream_t stream;
// VDP's stream.
55
}
prt_vdp_t
;
56
57
prt_vdp_t
*
prt_vdp_new
(
58
int
*tuple,
int
counter,
59
prt_vdp_function_t
function
,
60
size_t
local_store_size,
61
int
num_inputs,
int
num_outputs,
int
color);
62
void
prt_vdp_delete
(
prt_vdp_t
*vdp);
63
void
prt_vdp_annihilate
(
prt_vdp_t
*vdp);
64
void
prt_vdp_channel_insert
(
65
prt_vdp_t
*vdp,
struct
prt_channel_s
*channel,
66
enum
prt_channel_direction_e
direction,
int
slot);
67
struct
prt_packet_s
*
prt_vdp_packet_new
(
68
prt_vdp_t
*vdp,
size_t
size,
void
*data);
69
struct
prt_packet_s
*
prt_vdp_packet_new_host_to_device
(
70
prt_vdp_t
*vdp,
size_t
size,
void
*data);
71
void
prt_vdp_packet_release
(
prt_vdp_t
*vdp,
struct
prt_packet_s
*packet);
72
void
prt_vdp_channel_push
(
73
prt_vdp_t
*vdp,
int
channel_num,
struct
prt_packet_s
*packet);
74
struct
prt_packet_s
*
prt_vdp_channel_pop
(
prt_vdp_t
*vdp,
int
channel_num);
75
void
prt_vdp_channel_off
(
prt_vdp_t
*vdp,
int
channel_num);
76
void
prt_vdp_channel_on
(
prt_vdp_t
*vdp,
int
channel_num);
77
int
prt_vdp_ready
(
prt_vdp_t
*vdp);
78
79
#ifdef __cplusplus
80
}
81
#endif
82
83
#endif
/* PRT_VDP_H */
prt_vdp.h
Generated on Thu Nov 20 2014 18:12:00 for PULSAR by
1.8.4