-:    0:Source:/home/MPI/testing/mpich2/mpich2/src/mpid/common/datatype/mpir_type_get_contig_blocks.c
        -:    0:Graph:mpir_type_get_contig_blocks.gcno
        -:    0:Data:-
        -:    0:Runs:0
        -:    0:Programs:0
        -:    1:/* -*- Mode: C; c-basic-offset:4 ; -*- */
        -:    2:
        -:    3:/*
        -:    4: *  (C) 2001 by Argonne National Laboratory.
        -:    5: *      See COPYRIGHT in top-level directory.
        -:    6: */
        -:    7:
        -:    8:#include <mpiimpl.h>
        -:    9:#include <mpid_dataloop.h>
        -:   10:#include <stdlib.h>
        -:   11:
        -:   12:/*@
        -:   13:  MPIR_Type_get_contig_blocks
        -:   14: 
        -:   15:  Input Parameters:
        -:   16:. type - MPI Datatype (must have been committed)
        -:   17:
        -:   18:  Output Parameters:
        -:   19:. nr_blocks_p - pointer to int in which to store the number of contiguous blocks in the type
        -:   20:
        -:   21:
        -:   22:  Return Value:
        -:   23:  0 on success, -1 on failure.
        -:   24:@*/
        -:   25:
        -:   26:int MPIR_Type_get_contig_blocks(MPI_Datatype type,
        -:   27:				int *nr_blocks_p)
    #####:   28:{
        -:   29:    MPID_Datatype *datatype_ptr;
        -:   30:
    #####:   31:    if (HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) {
    #####:   32:	*nr_blocks_p = 1;
    #####:   33:	return 0;
        -:   34:    }
        -:   35:
    #####:   36:    MPID_Datatype_get_ptr(type, datatype_ptr);
    #####:   37:    MPIU_Assert(datatype_ptr->is_committed);
        -:   38:
    #####:   39:    *nr_blocks_p = datatype_ptr->max_contig_blocks;
    #####:   40:    return 0;
        -:   41:}