Last change
on this file since 6328 was
6328,
checked in by aclsce, 17 months ago
|
First import of oasis3-mct_5.0 (from oasis git server, branch OASIS3-MCT_5.0)
|
File size:
781 bytes
|
Line | |
---|
1 | /* getcount.c |
---|
2 | * |
---|
3 | * 07/2007 JCY |
---|
4 | * Functions for count information regarding MPI_Status |
---|
5 | */ |
---|
6 | |
---|
7 | #include "type.h" |
---|
8 | #include "mpiP.h" |
---|
9 | |
---|
10 | |
---|
11 | FC_FUNC( mpi_get_count , MPI_GET_COUNT ) |
---|
12 | (int *status, int *datatype, int *count, int *ierr) |
---|
13 | { |
---|
14 | *ierr = MPI_Get_count((MPI_Status *)status, *datatype, count); |
---|
15 | } |
---|
16 | |
---|
17 | |
---|
18 | int MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count) |
---|
19 | { |
---|
20 | *count = status->get_count; |
---|
21 | } |
---|
22 | |
---|
23 | |
---|
24 | /********/ |
---|
25 | |
---|
26 | |
---|
27 | FC_FUNC( mpi_get_elements , MPI_GET_ELEMENTS ) |
---|
28 | (MPI_Status *status, int *datatype, int *count, int *ierr) |
---|
29 | { |
---|
30 | *ierr = MPI_Get_elements(status, *datatype, count); |
---|
31 | } |
---|
32 | |
---|
33 | |
---|
34 | int MPI_Get_elements(MPI_Status *status, MPI_Datatype datatype, int *count) |
---|
35 | { |
---|
36 | Datatype dt_ptr = *(Datatype*)mpi_handle_to_datatype(datatype); |
---|
37 | *count = status->get_count * dt_ptr->count; |
---|
38 | } |
---|
39 | |
---|
40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.