This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp4.1] Rename *schedule modifier argument to chunk_size
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 11 Jun 2015 10:40:33 +0200
- Subject: [gomp4.1] Rename *schedule modifier argument to chunk_size
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
The latest spec renamed modifier argument to chunk_size.
Only for Fortran this is actually a user visible change, but for consistency
I've renamed it everywhere.
2015-06-11 Jakub Jelinek <jakub@redhat.com>
* libgomp.h (struct gomp_task_icv): Rename
run_sched_modifier field to run_sched_chunk_size.
* env.c (gomp_global_icv): Adjust initializer.
(parse_schedule): Adjust for the field renaming.
(omp_set_schedule, omp_get_schedule): Likewise.
Rename modifier argument to chunk_size.
* omp_lib.f90.in (omp_set_schedule, omp_get_schedule):
Rename modifier argument to chunk_size.
* loop_ull.c (GOMP_loop_ull_runtime_start,
GOMP_loop_ull_ordered_runtime_start): Adjust for the field renaming.
* loop.c (GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start,
GOMP_parallel_loop_runtime_start, GOMP_parallel_loop_runtime):
Likewise.
* fortran.c (omp_set_schedule_, omp_set_schedule_8_,
omp_get_schedule_, omp_get_schedule_8_): Rename
modifier argument to chunk_size.
* libgomp.texi (omp_set_schedule, omp_get_schedule): Likewise.
--- libgomp/libgomp.h.jj 2015-04-24 12:30:39.000000000 +0200
+++ libgomp/libgomp.h 2015-06-11 10:24:20.299584661 +0200
@@ -234,7 +234,7 @@ struct gomp_task_icv
{
unsigned long nthreads_var;
enum gomp_schedule_type run_sched_var;
- int run_sched_modifier;
+ int run_sched_chunk_size;
int default_device_var;
unsigned int thread_limit_var;
bool dyn_var;
--- libgomp/env.c.jj 2015-04-29 11:03:04.000000000 +0200
+++ libgomp/env.c 2015-06-11 10:26:11.424853468 +0200
@@ -58,7 +58,7 @@ struct gomp_task_icv gomp_global_icv = {
.nthreads_var = 1,
.thread_limit_var = UINT_MAX,
.run_sched_var = GFS_DYNAMIC,
- .run_sched_modifier = 1,
+ .run_sched_chunk_size = 1,
.default_device_var = 0,
.dyn_var = false,
.nest_var = false,
@@ -124,7 +124,7 @@ parse_schedule (void)
++env;
if (*env == '\0')
{
- gomp_global_icv.run_sched_modifier
+ gomp_global_icv.run_sched_chunk_size
= gomp_global_icv.run_sched_var != GFS_STATIC;
return;
}
@@ -150,7 +150,7 @@ parse_schedule (void)
if (value == 0 && gomp_global_icv.run_sched_var != GFS_STATIC)
value = 1;
- gomp_global_icv.run_sched_modifier = value;
+ gomp_global_icv.run_sched_chunk_size = value;
return;
unknown:
@@ -1341,21 +1341,21 @@ omp_get_nested (void)
}
void
-omp_set_schedule (omp_sched_t kind, int modifier)
+omp_set_schedule (omp_sched_t kind, int chunk_size)
{
struct gomp_task_icv *icv = gomp_icv (true);
switch (kind)
{
case omp_sched_static:
- if (modifier < 1)
- modifier = 0;
- icv->run_sched_modifier = modifier;
+ if (chunk_size < 1)
+ chunk_size = 0;
+ icv->run_sched_chunk_size = chunk_size;
break;
case omp_sched_dynamic:
case omp_sched_guided:
- if (modifier < 1)
- modifier = 1;
- icv->run_sched_modifier = modifier;
+ if (chunk_size < 1)
+ chunk_size = 1;
+ icv->run_sched_chunk_size = chunk_size;
break;
case omp_sched_auto:
break;
@@ -1366,11 +1366,11 @@ omp_set_schedule (omp_sched_t kind, int
}
void
-omp_get_schedule (omp_sched_t *kind, int *modifier)
+omp_get_schedule (omp_sched_t *kind, int *chunk_size)
{
struct gomp_task_icv *icv = gomp_icv (false);
*kind = icv->run_sched_var;
- *modifier = icv->run_sched_modifier;
+ *chunk_size = icv->run_sched_chunk_size;
}
int
--- libgomp/omp_lib.f90.in.jj 2015-04-29 11:03:04.000000000 +0200
+++ libgomp/omp_lib.f90.in 2015-06-11 10:29:33.777703510 +0200
@@ -199,28 +199,28 @@
end interface
interface omp_set_schedule
- subroutine omp_set_schedule (kind, modifier)
+ subroutine omp_set_schedule (kind, chunk_size)
use omp_lib_kinds
integer (omp_sched_kind), intent (in) :: kind
- integer (4), intent (in) :: modifier
+ integer (4), intent (in) :: chunk_size
end subroutine omp_set_schedule
- subroutine omp_set_schedule_8 (kind, modifier)
+ subroutine omp_set_schedule_8 (kind, chunk_size)
use omp_lib_kinds
integer (omp_sched_kind), intent (in) :: kind
- integer (8), intent (in) :: modifier
+ integer (8), intent (in) :: chunk_size
end subroutine omp_set_schedule_8
end interface
interface omp_get_schedule
- subroutine omp_get_schedule (kind, modifier)
+ subroutine omp_get_schedule (kind, chunk_size)
use omp_lib_kinds
integer (omp_sched_kind), intent (out) :: kind
- integer (4), intent (out) :: modifier
+ integer (4), intent (out) :: chunk_size
end subroutine omp_get_schedule
- subroutine omp_get_schedule_8 (kind, modifier)
+ subroutine omp_get_schedule_8 (kind, chunk_size)
use omp_lib_kinds
integer (omp_sched_kind), intent (out) :: kind
- integer (8), intent (out) :: modifier
+ integer (8), intent (out) :: chunk_size
end subroutine omp_get_schedule_8
end interface
--- libgomp/loop_ull.c.jj 2015-04-24 12:30:40.000000000 +0200
+++ libgomp/loop_ull.c 2015-06-11 10:27:48.779337984 +0200
@@ -175,15 +175,15 @@ GOMP_loop_ull_runtime_start (bool up, go
{
case GFS_STATIC:
return gomp_loop_ull_static_start (up, start, end, incr,
- icv->run_sched_modifier,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_DYNAMIC:
return gomp_loop_ull_dynamic_start (up, start, end, incr,
- icv->run_sched_modifier,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_GUIDED:
return gomp_loop_ull_guided_start (up, start, end, incr,
- icv->run_sched_modifier,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_AUTO:
/* For now map to schedule(static), later on we could play with feedback
@@ -279,15 +279,15 @@ GOMP_loop_ull_ordered_runtime_start (boo
{
case GFS_STATIC:
return gomp_loop_ull_ordered_static_start (up, start, end, incr,
- icv->run_sched_modifier,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_DYNAMIC:
return gomp_loop_ull_ordered_dynamic_start (up, start, end, incr,
- icv->run_sched_modifier,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_GUIDED:
return gomp_loop_ull_ordered_guided_start (up, start, end, incr,
- icv->run_sched_modifier,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_AUTO:
/* For now map to schedule(static), later on we could play with feedback
--- libgomp/fortran.c.jj 2015-04-29 11:03:04.000000000 +0200
+++ libgomp/fortran.c 2015-06-11 10:22:33.164255398 +0200
@@ -344,35 +344,35 @@ omp_get_wtime_ (void)
}
void
-omp_set_schedule_ (const int32_t *kind, const int32_t *modifier)
+omp_set_schedule_ (const int32_t *kind, const int32_t *chunk_size)
{
- omp_set_schedule (*kind, *modifier);
+ omp_set_schedule (*kind, *chunk_size);
}
void
-omp_set_schedule_8_ (const int32_t *kind, const int64_t *modifier)
+omp_set_schedule_8_ (const int32_t *kind, const int64_t *chunk_size)
{
- omp_set_schedule (*kind, TO_INT (*modifier));
+ omp_set_schedule (*kind, TO_INT (*chunk_size));
}
void
-omp_get_schedule_ (int32_t *kind, int32_t *modifier)
+omp_get_schedule_ (int32_t *kind, int32_t *chunk_size)
{
omp_sched_t k;
- int m;
- omp_get_schedule (&k, &m);
+ int cs;
+ omp_get_schedule (&k, &cs);
*kind = k;
- *modifier = m;
+ *chunk_size = cs;
}
void
-omp_get_schedule_8_ (int32_t *kind, int64_t *modifier)
+omp_get_schedule_8_ (int32_t *kind, int64_t *chunk_size)
{
omp_sched_t k;
- int m;
- omp_get_schedule (&k, &m);
+ int cs;
+ omp_get_schedule (&k, &cs);
*kind = k;
- *modifier = m;
+ *chunk_size = cs;
}
int32_t
--- libgomp/loop.c.jj 2015-04-24 12:30:40.000000000 +0200
+++ libgomp/loop.c 2015-06-11 10:27:29.736634415 +0200
@@ -169,13 +169,16 @@ GOMP_loop_runtime_start (long start, lon
switch (icv->run_sched_var)
{
case GFS_STATIC:
- return gomp_loop_static_start (start, end, incr, icv->run_sched_modifier,
+ return gomp_loop_static_start (start, end, incr,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_DYNAMIC:
- return gomp_loop_dynamic_start (start, end, incr, icv->run_sched_modifier,
+ return gomp_loop_dynamic_start (start, end, incr,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_GUIDED:
- return gomp_loop_guided_start (start, end, incr, icv->run_sched_modifier,
+ return gomp_loop_guided_start (start, end, incr,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_AUTO:
/* For now map to schedule(static), later on we could play with feedback
@@ -266,15 +269,15 @@ GOMP_loop_ordered_runtime_start (long st
{
case GFS_STATIC:
return gomp_loop_ordered_static_start (start, end, incr,
- icv->run_sched_modifier,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_DYNAMIC:
return gomp_loop_ordered_dynamic_start (start, end, incr,
- icv->run_sched_modifier,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_GUIDED:
return gomp_loop_ordered_guided_start (start, end, incr,
- icv->run_sched_modifier,
+ icv->run_sched_chunk_size,
istart, iend);
case GFS_AUTO:
/* For now map to schedule(static), later on we could play with feedback
@@ -484,7 +487,7 @@ GOMP_parallel_loop_runtime_start (void (
{
struct gomp_task_icv *icv = gomp_icv (false);
gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
- icv->run_sched_var, icv->run_sched_modifier, 0);
+ icv->run_sched_var, icv->run_sched_chunk_size, 0);
}
ialias_redirect (GOMP_parallel_end)
@@ -529,7 +532,7 @@ GOMP_parallel_loop_runtime (void (*fn) (
{
struct gomp_task_icv *icv = gomp_icv (false);
gomp_parallel_loop_start (fn, data, num_threads, start, end, incr,
- icv->run_sched_var, icv->run_sched_modifier,
+ icv->run_sched_var, icv->run_sched_chunk_size,
flags);
fn (data);
GOMP_parallel_end ();
--- libgomp/libgomp.texi.jj 2015-04-24 12:30:40.000000000 +0200
+++ libgomp/libgomp.texi 2015-06-11 10:30:29.626834126 +0200
@@ -581,18 +581,18 @@ set via @env{OMP_PROC_BIND}. Possible v
Obtain the runtime scheduling method. The @var{kind} argument will be
set to the value @code{omp_sched_static}, @code{omp_sched_dynamic},
@code{omp_sched_guided} or @code{omp_sched_auto}. The second argument,
-@var{modifier}, is set to the chunk size.
+@var{chunk_size}, is set to the chunk size.
@item @emph{C/C++}
@multitable @columnfractions .20 .80
-@item @emph{Prototype}: @tab @code{void omp_get_schedule(omp_sched_t *kind, int *modifier);}
+@item @emph{Prototype}: @tab @code{void omp_get_schedule(omp_sched_t *kind, int *chunk_size);}
@end multitable
@item @emph{Fortran}:
@multitable @columnfractions .20 .80
-@item @emph{Interface}: @tab @code{subroutine omp_get_schedule(kind, modifier)}
+@item @emph{Interface}: @tab @code{subroutine omp_get_schedule(kind, chunk_size)}
@item @tab @code{integer(kind=omp_sched_kind) kind}
-@item @tab @code{integer modifier}
+@item @tab @code{integer chunk_size}
@end multitable
@item @emph{See also}:
@@ -929,19 +929,19 @@ Sets the runtime scheduling method. The
value @code{omp_sched_static}, @code{omp_sched_dynamic},
@code{omp_sched_guided} or @code{omp_sched_auto}. Except for
@code{omp_sched_auto}, the chunk size is set to the value of
-@var{modifier} if positive, or to the default value if zero or negative.
-For @code{omp_sched_auto} the @var{modifier} argument is ignored.
+@var{chunk_size} if positive, or to the default value if zero or negative.
+For @code{omp_sched_auto} the @var{chunk_size} argument is ignored.
@item @emph{C/C++}
@multitable @columnfractions .20 .80
-@item @emph{Prototype}: @tab @code{void omp_set_schedule(omp_sched_t kind, int modifier);}
+@item @emph{Prototype}: @tab @code{void omp_set_schedule(omp_sched_t kind, int chunk_size);}
@end multitable
@item @emph{Fortran}:
@multitable @columnfractions .20 .80
-@item @emph{Interface}: @tab @code{subroutine omp_set_schedule(kind, modifier)}
+@item @emph{Interface}: @tab @code{subroutine omp_set_schedule(kind, chunk_size)}
@item @tab @code{integer(kind=omp_sched_kind) kind}
-@item @tab @code{integer modifier}
+@item @tab @code{integer chunk_size}
@end multitable
@item @emph{See also}:
Jakub