Expose oacc_default_dims to backends.
2018-12-19 Tom de Vries <tdevries@suse.de>
* omp-offload.c (oacc_get_default_dim): New function.
* omp-offload.h (oacc_get_default_dim): Declare.
From-SVN: r267274
+2018-12-19 Tom de Vries <tdevries@suse.de>
+
+ * omp-offload.c (oacc_get_default_dim): New function.
+ * omp-offload.h (oacc_get_default_dim): Declare.
+
2018-12-19 David Malcolm <dmalcolm@redhat.com>
PR c++/87504
static int oacc_default_dims[GOMP_DIM_MAX];
static int oacc_min_dims[GOMP_DIM_MAX];
+int
+oacc_get_default_dim (int dim)
+{
+ gcc_assert (0 <= dim && dim < GOMP_DIM_MAX);
+ return oacc_default_dims[dim];
+}
+
/* Parse the default dimension parameter. This is a set of
:-separated optional compute dimensions. Each specified dimension
is a positive integer. When device type support is added, it is
#ifndef GCC_OMP_DEVICE_H
#define GCC_OMP_DEVICE_H
+extern int oacc_get_default_dim (int dim);
+
extern GTY(()) vec<tree, va_gc> *offload_funcs;
extern GTY(()) vec<tree, va_gc> *offload_vars;