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

# MPIR\_Type\_vector(3)

create a vector datatype

## NAME

MPIR\_Type\_vector -  create a vector datatype

## SYNOPSIS

```
int MPIR_Type_vector(int count,
                     int blocklength,
                     MPI_Aint stride,
                     int strideinbytes, MPI_Datatype oldtype, MPI_Datatype * newtype)
```

## INPUT PARAMETERS

- **count**

  \- number of blocks in vector

- **blocklength**

  \- number of elements in each block

- **stride**

  \- distance from beginning of one block to the next (see next parameter for units)

- **strideinbytes**

  \- if nonzero, then stride is in bytes, otherwise stride is in terms of extent of oldtype

- **oldtype**

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

## OUTPUT PARAMETERS

- **newtype**

  \- handle of new vector datatype

## RETURN VALUE

0 on success, MPI error code on failure.
