diff options
Diffstat (limited to 'libgomp/libgomp.h')
-rw-r--r-- | libgomp/libgomp.h | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h index 6030f9d..04f3c6d 100644 --- a/libgomp/libgomp.h +++ b/libgomp/libgomp.h @@ -620,6 +620,7 @@ extern struct gomp_offload_icv_list *gomp_offload_icv_list; extern int goacc_device_num; extern char *goacc_device_type; extern int goacc_default_dims[GOMP_DIM_MAX]; +extern int gomp_reverse_offload_threads; enum gomp_task_kind { @@ -1134,7 +1135,9 @@ extern void gomp_init_targets_once (void); extern int gomp_get_num_devices (void); extern bool gomp_target_task_fn (void *); extern void gomp_target_rev (uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, - int, struct goacc_asyncqueue *); + int, volatile int *, bool); +extern bool gomp_page_locked_host_alloc (void **, size_t); +extern void gomp_page_locked_host_free (void *); /* Splay tree definitions. */ typedef struct splay_tree_node_s *splay_tree_node; @@ -1331,6 +1334,21 @@ struct target_mem_desc { }; +/* A rectangular section of an array, for noncontiguous target update + operations. Must be kept in sync with + omp-low.cc:omp_noncontig_descriptor_type. */ + +typedef struct { + size_t ndims; + size_t elemsize; + size_t span; + size_t *dim; + size_t *index; + size_t *length; + size_t *stride; +} omp_noncontig_array_desc; + + typedef struct acc_dispatch_t { /* Execute. */ @@ -1418,6 +1436,8 @@ struct gomp_device_descr __typeof (GOMP_OFFLOAD_unload_image) *unload_image_func; __typeof (GOMP_OFFLOAD_alloc) *alloc_func; __typeof (GOMP_OFFLOAD_free) *free_func; + __typeof (GOMP_OFFLOAD_page_locked_host_alloc) *page_locked_host_alloc_func; + __typeof (GOMP_OFFLOAD_page_locked_host_free) *page_locked_host_free_func; __typeof (GOMP_OFFLOAD_dev2host) *dev2host_func; __typeof (GOMP_OFFLOAD_host2dev) *host2dev_func; __typeof (GOMP_OFFLOAD_memcpy2d) *memcpy2d_func; @@ -1458,8 +1478,6 @@ enum gomp_map_vars_kind GOMP_MAP_VARS_ENTER_DATA = 8 }; -extern void gomp_acc_declare_allocate (bool, size_t, void **, size_t *, - unsigned short *); struct gomp_coalesce_buf; extern void gomp_copy_host2dev (struct gomp_device_descr *, struct goacc_asyncqueue *, void *, const void *, @@ -1475,10 +1493,13 @@ extern bool gomp_attach_pointer (struct gomp_device_descr *, extern void gomp_detach_pointer (struct gomp_device_descr *, struct goacc_asyncqueue *, splay_tree_key, uintptr_t, bool, struct gomp_coalesce_buf *); +struct goacc_ncarray_info; extern struct target_mem_desc *goacc_map_vars (struct gomp_device_descr *, struct goacc_asyncqueue *, size_t, void **, void **, - size_t *, void *, bool, + size_t *, void *, + struct goacc_ncarray_info *, + bool, enum gomp_map_vars_kind); extern void goacc_unmap_vars (struct target_mem_desc *, bool, struct goacc_asyncqueue *); @@ -1663,4 +1684,14 @@ gomp_thread_to_pthread_t (struct gomp_thread *thr) } #endif +/* usmpin-allocator.c */ + +typedef struct usmpin_context *usmpin_ctx_p; + +usmpin_ctx_p usmpin_init_context (); +void usmpin_register_memory (usmpin_ctx_p ctx, char *base, size_t size); +void *usmpin_alloc (usmpin_ctx_p ctx, size_t size); +void usmpin_free (usmpin_ctx_p ctx, void *addr); +void *usmpin_realloc (usmpin_ctx_p ctx, void *addr, size_t newsize); + #endif /* LIBGOMP_H */ |