libspe2
0.9a
Main Page
Data Structures
Files
File List
Globals
libspe2.h
Go to the documentation of this file.
1
/*
2
* SPE Runtime Management Library, Version 2.0
3
* This library constitutes the standardized low-level application
4
* programming interface for application access to the Cell Broadband
5
* Engineís Synergistic Processing Elements (SPEs).
6
*
7
* The usage of this library requires that the application programmer
8
* is familiar with the CBE architecture as described in ìCell
9
* Broadband Engine Architecture, Version 1.0î.
10
*
11
* Copyright (C) 2006 IBM Corp.
12
*
13
* This library is free software; you can redistribute it and/or modify it
14
* under the terms of the GNU Lesser General Public License as published by
15
* the Free Software Foundation; either version 2.1 of the License,
16
* or (at your option) any later version.
17
*
18
* This library is distributed in the hope that it will be useful, but
19
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
21
* License for more details.
22
*
23
* You should have received a copy of the GNU Lesser General Public License
24
* along with this library; if not, write to the Free Software Foundation,
25
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
*/
27
/*
28
* libspe2.h contains the public API funtions
29
*/
30
31
#ifndef libspe2_h
32
#define libspe2_h
33
34
#ifdef __cplusplus
35
extern
"C"
36
{
37
#endif
38
39
#include <errno.h>
40
#include <stdio.h>
41
42
/*
43
* GLOBAL SYMBOLS AND STRUCTURES
44
* libspe2-types header file
45
*/
46
#include "
libspe2-types.h
"
47
48
49
/*
50
*---------------------------------------------------------
51
*
52
* API functions
53
*
54
*---------------------------------------------------------
55
*/
56
57
/*
58
* spe_context_create
59
*/
60
spe_context_ptr_t
spe_context_create
(
unsigned
int
flags,
spe_gang_context_ptr_t
gang);
61
62
/*
63
* spe_context_create_affinity
64
*/
65
spe_context_ptr_t
spe_context_create_affinity
(
unsigned
int
flags,
spe_context_ptr_t
affinity_neighbor,
spe_gang_context_ptr_t
gang);
66
67
/*
68
* spe_context_destroy
69
*/
70
int
spe_context_destroy
(
spe_context_ptr_t
spe);
71
72
/*
73
* spe_gang_context_create
74
*/
75
spe_gang_context_ptr_t
spe_gang_context_create
(
unsigned
int
flags);
76
77
/*
78
* spe_gang_context_destroy
79
*/
80
int
spe_gang_context_destroy
(
spe_gang_context_ptr_t
gang);
81
82
/*
83
* spe_image_open
84
*/
85
spe_program_handle_t
*
spe_image_open
(
const
char
*filename);
86
87
/*
88
* spe_image_close
89
*/
90
int
spe_image_close
(
spe_program_handle_t
*program);
91
92
/*
93
* spe_load_program
94
*/
95
int
spe_program_load
(
spe_context_ptr_t
spe,
spe_program_handle_t
*program);
96
97
/*
98
* spe_context_run
99
*/
100
int
spe_context_run
(
spe_context_ptr_t
spe,
unsigned
int
*entry,
unsigned
int
runflags,
void
*argp,
void
*envp,
spe_stop_info_t
*stopinfo);
101
102
/*
103
* spe_stop_info_read
104
*/
105
int
spe_stop_info_read
(
spe_context_ptr_t
spe,
spe_stop_info_t
*stopinfo);
106
107
/*
108
* spe_event_handler_create
109
*/
110
spe_event_handler_ptr_t
spe_event_handler_create
(
void
);
111
112
/*
113
* spe_event_handler_destroy
114
*/
115
int
spe_event_handler_destroy
(
spe_event_handler_ptr_t
evhandler);
116
117
/*
118
* spe_event_handler_register
119
*/
120
int
spe_event_handler_register
(
spe_event_handler_ptr_t
evhandler,
spe_event_unit_t
*event);
121
122
/*
123
* spe_event_handler_deregister
124
*/
125
int
spe_event_handler_deregister
(
spe_event_handler_ptr_t
evhandler,
spe_event_unit_t
*event);
126
127
/*
128
* spe_event_wait
129
*/
130
int
spe_event_wait
(
spe_event_handler_ptr_t
evhandler,
spe_event_unit_t
*events,
int
max_events,
int
timeout);
131
132
/*
133
* MFCIO Proxy Commands
134
*/
135
int
spe_mfcio_put
(
spe_context_ptr_t
spe,
unsigned
int
ls,
void
*ea,
unsigned
int
size,
unsigned
int
tag,
unsigned
int
tid,
unsigned
int
rid);
136
137
int
spe_mfcio_putb
(
spe_context_ptr_t
spe,
unsigned
int
ls,
void
*ea,
unsigned
int
size,
unsigned
int
tag,
unsigned
int
tid,
unsigned
int
rid);
138
139
int
spe_mfcio_putf
(
spe_context_ptr_t
spe,
unsigned
int
ls,
void
*ea,
unsigned
int
size,
unsigned
int
tag,
unsigned
int
tid,
unsigned
int
rid);
140
141
int
spe_mfcio_get
(
spe_context_ptr_t
spe,
unsigned
int
ls,
void
*ea,
unsigned
int
size,
unsigned
int
tag,
unsigned
int
tid,
unsigned
int
rid);
142
143
int
spe_mfcio_getb
(
spe_context_ptr_t
spe,
unsigned
int
ls,
void
*ea,
unsigned
int
size,
unsigned
int
tag,
unsigned
int
tid,
unsigned
int
rid);
144
145
int
spe_mfcio_getf
(
spe_context_ptr_t
spe,
unsigned
int
ls,
void
*ea,
unsigned
int
size,
unsigned
int
tag,
unsigned
int
tid,
unsigned
int
rid);
146
147
/*
148
* MFCIO Tag Group Completion
149
*/
150
int
spe_mfcio_tag_status_read
(
spe_context_ptr_t
spe,
unsigned
int
mask,
unsigned
int
behavior,
unsigned
int
*tag_status);
151
152
/*
153
* SPE Mailbox Facility
154
*/
155
int
spe_out_mbox_read
(
spe_context_ptr_t
spe,
unsigned
int
*mbox_data,
int
count);
156
157
int
spe_out_mbox_status
(
spe_context_ptr_t
spe);
158
159
int
spe_in_mbox_write
(
spe_context_ptr_t
spe,
unsigned
int
*mbox_data,
int
count,
unsigned
int
behavior);
160
161
int
spe_in_mbox_status
(
spe_context_ptr_t
spe);
162
163
int
spe_out_intr_mbox_read
(
spe_context_ptr_t
spe,
unsigned
int
*mbox_data,
int
count,
unsigned
int
behavior);
164
165
int
spe_out_intr_mbox_status
(
spe_context_ptr_t
spe);
166
167
/*
168
* Multisource Sync Facility
169
*/
170
int
spe_mssync_start
(
spe_context_ptr_t
spe);
171
172
int
spe_mssync_status
(
spe_context_ptr_t
spe);
173
174
/*
175
* SPU SIgnal Notification Facility
176
*/
177
int
spe_signal_write
(
spe_context_ptr_t
spe,
unsigned
int
signal_reg,
unsigned
int
data);
178
179
/*
180
* spe_ls_area_get
181
*/
182
void
*
spe_ls_area_get
(
spe_context_ptr_t
spe);
183
184
/*
185
* spe_ls_size_get
186
*/
187
int
spe_ls_size_get
(
spe_context_ptr_t
spe);
188
189
/*
190
* spe_ps_area_get
191
*/
192
void
*
spe_ps_area_get
(
spe_context_ptr_t
spe,
enum
ps_area
area);
193
194
/*
195
* spe_callback_handler_register
196
*/
197
int
spe_callback_handler_register
(
void
*handler,
unsigned
int
callnum,
unsigned
int
mode);
198
199
/*
200
* spe_callback_handler_deregister
201
*/
202
int
spe_callback_handler_deregister
(
unsigned
int
callnum);
203
204
/*
205
* spe_callback_handler_query
206
*/
207
void
*
spe_callback_handler_query
(
unsigned
int
callnum);
208
209
/*
210
* spe_info_get
211
*/
212
int
spe_cpu_info_get
(
int
info_requested,
int
cpu_node);
213
214
215
#ifdef __cplusplus
216
}
217
#endif
218
219
220
#endif
/*libspe2_h*/
Generated on Thu Oct 10 2013 02:03:40 for libspe2 by
1.8.4