/* -*- Mode: C; c-basic-offset:4 ; -*- */ /* * * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #include "mpiimpl.h" /* * In MPI-1, this operation is valid only for C integer, Fortran integer, * and byte data items (4.9.2 Predefined reduce operations) */ #ifndef MPIR_LBAND #define MPIR_LBAND(a,b) ((a)&(b)) #endif void MPIR_BAND ( void *invec, void *inoutvec, int *Len, MPI_Datatype *type ) { static const char FCNAME[] = "MPIR_BAND"; int i, len = *Len; switch (*type) { #ifdef HAVE_FORTRAN_BINDING case MPI_LOGICAL: case MPI_INTEGER: { MPI_Fint * restrict a = (MPI_Fint *)inoutvec; MPI_Fint * restrict b = (MPI_Fint *)invec; for ( i=0; i