---
name: "MPIR_Type_indexed"
section: "3"
platform: "linux"
package: "mpich-doc"
version: "3.3-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/MPIR_Type_indexed"
---

# MPIR\_Type\_indexed(3)

create an indexed datatype

## NAME

MPIR\_Type\_indexed -  create an indexed datatype

## SYNOPSIS

```
int MPIR_Type_indexed(int count,
                      const int *blocklength_array,
                      const void *displacement_array,
                      int dispinbytes, MPI_Datatype oldtype, MPI_Datatype * newtype)
```

## INPUT PARAMETERS

- **count**

  \- number of blocks in type

- **blocklength\_array**

  \- number of elements in each block

- **displacement\_array**

  \- offsets of blocks from start of type (see next parameter for units)

- **dispinbytes**

  \- if nonzero, then displacements are in bytes (the displacement\_array is an array of ints), otherwise they in terms of extent of oldtype (the displacement\_array is an array of MPI\_Aints)

- **oldtype**

  \- type (using handle) of datatype on which new type is based

## OUTPUT PARAMETERS

- **newtype**

  \- handle of new indexed datatype

## RETURN VALUE

0 on success, -1 on failure.
