Commit b75e9c83 by Tom de Vries Committed by Tom de Vries

[openacc] Add oacc_get_default_dim

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
parent a14feb3c
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> 2018-12-19 David Malcolm <dmalcolm@redhat.com>
PR c++/87504 PR c++/87504
...@@ -573,6 +573,13 @@ oacc_xform_tile (gcall *call) ...@@ -573,6 +573,13 @@ oacc_xform_tile (gcall *call)
static int oacc_default_dims[GOMP_DIM_MAX]; static int oacc_default_dims[GOMP_DIM_MAX];
static int oacc_min_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 /* Parse the default dimension parameter. This is a set of
:-separated optional compute dimensions. Each specified dimension :-separated optional compute dimensions. Each specified dimension
is a positive integer. When device type support is added, it is is a positive integer. When device type support is added, it is
......
...@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_OMP_DEVICE_H #ifndef GCC_OMP_DEVICE_H
#define 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_funcs;
extern GTY(()) vec<tree, va_gc> *offload_vars; extern GTY(()) vec<tree, va_gc> *offload_vars;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment