diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2015-01-02 18:42:52 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2015-01-02 18:42:52 +0100 |
commit | 09de7c25785ff59931aee011b79a67e209db27bb (patch) | |
tree | c343efaeaf68d7d672806ad72bfa945ce5a90841 /libgfortran/caf | |
parent | 6e4d8cb651033fc7c0c6815686211f5f5d94881a (diff) | |
download | gcc-09de7c25785ff59931aee011b79a67e209db27bb.zip gcc-09de7c25785ff59931aee011b79a67e209db27bb.tar.gz gcc-09de7c25785ff59931aee011b79a67e209db27bb.tar.bz2 |
single.c (_gfortran_caf_co_reduce): New function.
2015-01-02 Tobias Burnus <burnus@net-b.de>
* caf/single.c (_gfortran_caf_co_reduce): New function.
* caf/libcaf.h (_gfortran_caf_co_reduce): New prototype.
2015-01-02 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/coarray/collectives_4.f90: New.
From-SVN: r219148
Diffstat (limited to 'libgfortran/caf')
-rw-r--r-- | libgfortran/caf/libcaf.h | 2 | ||||
-rw-r--r-- | libgfortran/caf/single.c | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libgfortran/caf/libcaf.h b/libgfortran/caf/libcaf.h index ffd0980..625078c 100644 --- a/libgfortran/caf/libcaf.h +++ b/libgfortran/caf/libcaf.h @@ -110,6 +110,8 @@ void _gfortran_caf_co_broadcast (gfc_descriptor_t *, int, int *, char *, int); void _gfortran_caf_co_sum (gfc_descriptor_t *, int, int *, char *, int); void _gfortran_caf_co_min (gfc_descriptor_t *, int, int *, char *, int, int); void _gfortran_caf_co_max (gfc_descriptor_t *, int, int *, char *, int, int); +void _gfortran_caf_co_reduce (gfc_descriptor_t *, void* (*) (void *, void*), + int, int, int *, char *, int, int); void _gfortran_caf_get (caf_token_t, size_t, int, gfc_descriptor_t *, caf_vector_t *, gfc_descriptor_t *, int, int, bool); diff --git a/libgfortran/caf/single.c b/libgfortran/caf/single.c index 632d172..2a55372 100644 --- a/libgfortran/caf/single.c +++ b/libgfortran/caf/single.c @@ -254,6 +254,21 @@ _gfortran_caf_co_max (gfc_descriptor_t *a __attribute__ ((unused)), } +void +_gfortran_caf_co_reduce (gfc_descriptor_t *a __attribute__ ((unused)), + void * (*opr) (void *, void *) + __attribute__ ((unused)), + int opr_flags __attribute__ ((unused)), + int result_image __attribute__ ((unused)), + int *stat, char *errmsg __attribute__ ((unused)), + int a_len __attribute__ ((unused)), + int errmsg_len __attribute__ ((unused))) + { + if (stat) + *stat = 0; + } + + static void assign_char4_from_char1 (size_t dst_size, size_t src_size, uint32_t *dst, unsigned char *src) |