10#define MAX_OUTLINED_FUNC_PARAMETER_COUNT 256
22extern double xomp_time_stamp(
void);
23extern int env_region_instr_val;
35extern void XOMP_init (
int argc,
char ** argv);
36extern void xomp_init (
void);
37extern void xomp_acc_init (
void);
40extern void XOMP_terminate (
int exitcode);
47extern void XOMP_parallel_start (
void (*func) (
void *),
void *data,
unsigned ifClauseValue,
unsigned numThreadsSpecified,
char* file_name,
int line_no);
48extern void XOMP_parallel_end (
char* file_name,
int line_no);
51extern int XOMP_sections_init_next(
int section_count);
54extern int XOMP_sections_next(
void);
57extern void XOMP_sections_end(
void);
60extern void XOMP_sections_end_nowait(
void);
62extern void XOMP_task (
void (*) (
void *),
void *,
void (*) (
void *,
void *),
63 long,
long,
bool,
unsigned);
64extern void XOMP_taskwait (
void);
72extern void XOMP_loop_default(
int lower,
int upper,
int stride,
long* n_lower,
long* n_upper);
76extern void XOMP_loop_static_init(
int lower,
int upper,
int stride,
int chunk_size);
77extern void XOMP_loop_dynamic_init(
int lower,
int upper,
int stride,
int chunk_size);
78extern void XOMP_loop_guided_init(
int lower,
int upper,
int stride,
int chunk_size);
79extern void XOMP_loop_runtime_init(
int lower,
int upper,
int stride);
82extern void XOMP_loop_ordered_static_init(
int lower,
int upper,
int stride,
int chunk_size);
83extern void XOMP_loop_ordered_dynamic_init(
int lower,
int upper,
int stride,
int chunk_size);
84extern void XOMP_loop_ordered_guided_init(
int lower,
int upper,
int stride,
int chunk_size);
85extern void XOMP_loop_ordered_runtime_init(
int lower,
int upper,
int stride);
93extern bool XOMP_loop_static_start (
long,
long,
long,
long,
long *,
long *);
94extern bool XOMP_loop_dynamic_start (
long,
long,
long,
long,
long *,
long *);
95extern bool XOMP_loop_guided_start (
long,
long,
long,
long,
long *,
long *);
96extern bool XOMP_loop_runtime_start (
long,
long,
long,
long *,
long *);
98extern bool XOMP_loop_ordered_static_start (
long,
long,
long,
long,
long *,
long *);
99extern bool XOMP_loop_ordered_dynamic_start (
long,
long,
long,
long,
long *,
long *);
100extern bool XOMP_loop_ordered_guided_start (
long,
long,
long,
long,
long *,
long *);
101extern bool XOMP_loop_ordered_runtime_start (
long,
long,
long,
long *,
long *);
104extern bool XOMP_loop_static_next (
long *,
long *);
105extern bool XOMP_loop_dynamic_next (
long *,
long *);
106extern bool XOMP_loop_guided_next (
long *,
long *);
107extern bool XOMP_loop_runtime_next (
long *,
long *);
109extern bool XOMP_loop_ordered_static_next (
long *,
long *);
110extern bool XOMP_loop_ordered_dynamic_next (
long *,
long *);
111extern bool XOMP_loop_ordered_guided_next (
long *,
long *);
112extern bool XOMP_loop_ordered_runtime_next (
long *,
long *);
119extern void XOMP_static_even_divide (
long start,
long orig_size,
int chunk_count,
int chunk_id,
long * chunk_offset,
long * chunk_size);
123extern void XOMP_barrier (
void);
124extern void XOMP_critical_start (
void** data);
125extern void XOMP_critical_end (
void** data);
126extern bool XOMP_single(
void);
127extern bool XOMP_master(
void);
129extern void XOMP_atomic_start (
void);
130extern void XOMP_atomic_end (
void);
132extern void XOMP_loop_end (
void);
133extern void XOMP_loop_end_nowait (
void);
136extern void XOMP_flush_all (
void);
138extern void XOMP_flush_one (
char * startAddress,
int nbyte);
142extern void XOMP_ordered_start (
void);
143extern void XOMP_ordered_end (
void);
149extern void xomp_set_default_device (
int devID);
153extern size_t xomp_get_maxThreadsPerBlock(
int devID);
156extern size_t xomp_get_max1DBlock(
int devID,
size_t ss);
165extern size_t xomp_get_max_threads_per_dimesion_2D (
int devID);
168extern size_t xomp_get_maxSegmentsPerDimensionOf2DBlock(
int devID,
size_t dimension_size);
181extern void* xomp_deviceMalloc(
size_t size);
184extern void* xomp_hostMalloc(
size_t size);
187extern double xomp_time_stamp();
191extern void * xomp_memcpyHostToDevice (
void *dest,
const void * src,
size_t n_n);
192extern void * xomp_memcpyDeviceToHost (
void *dest,
const void * src,
size_t n_n);
197extern void * xomp_memcpyDynamicHostToDevice (
void *dest,
const void * src,
int * dimensions,
size_t dimension_size,
size_t element_size,
size_t *bytes_copied);
203extern void * xomp_memcpyDynamicDeviceToHost (
void *dest,
int * dimensions,
size_t dimension_size,
const void * src,
size_t element_size,
size_t *bytes_copied);
205extern void * xomp_memcpyDeviceToDevice (
void *dest,
const void * src,
size_t n_n);
206extern void * xomp_memcpyHostToHost (
void *dest,
const void * src,
size_t n_n);
210extern bool xomp_freeDevice(
void* devPtr);
212extern bool xomp_freeHost(
void* hostPtr);
225extern void * xomp_mallocArray(
int * dimensions,
size_t dimension_num,
size_t esize);
227extern void xomp_freeArrayPointer (
void* array,
int * dimensions,
size_t dimension_num);
241#define XOMP_REDUCTION_PLUS 6
242#define XOMP_REDUCTION_MINUS 7
243#define XOMP_REDUCTION_MUL 8
244#define XOMP_REDUCTION_BITAND 9
245#define XOMP_REDUCTION_BITOR 10
246#define XOMP_REDUCTION_BITXOR 11
247#define XOMP_REDUCTION_LOGAND 12
248#define XOMP_REDUCTION_LOGOR 13
265#define XOMP_BEYOND_BLOCK_REDUCTION_DECL(dtype) \
266 dtype xomp_beyond_block_reduction_##dtype(dtype * per_block_results, int numBlocks, int reduction_op);
268XOMP_BEYOND_BLOCK_REDUCTION_DECL(
int)
269XOMP_BEYOND_BLOCK_REDUCTION_DECL(
float)
270XOMP_BEYOND_BLOCK_REDUCTION_DECL(
double)
272#undef XOMP_BEYOND_BLOCK_REDUCTION_DECL
285 int loop_sched_index;
292#define XOMP_MAX_MAPPED_VARS 256
324 int new_variable_count;
329 int inherited_variable_count;
340extern int xomp_get_num_devices();
341extern int xomp_get_max_devices(
void);
342extern int xomp_num_devices;
343extern int xomp_max_num_devices;
346extern DDE** DDE_head;
348extern DDE** DDE_tail;
350extern void** xomp_cuda_prop;
354extern void xomp_deviceDataEnvironmentEnter(
int devID);
363extern void* xomp_deviceDataEnvironmentPrepareVariable(
int devID,
void* original_variable_address,
int nDim,
int typeSize,
int* size,
int* offset,
int* vDimSize,
bool copyTo,
bool copyFrom);
368extern void* xomp_deviceDataEnvironmentGetInheritedVariable (
int devID,
void* original_variable_address,
int typeSize,
int* size);
372extern void xomp_deviceDataEnvironmentAddVariable (
int devID,
void* var_addr,
int* var_size,
int* var_offset,
int* var_dim,
int nDim,
int typeSize,
void * dev_addr,
bool copyTo,
bool copyFrom);
376extern void xomp_deviceDataEnvironmentExit(
int devID);