# ISStrideSetStride
Sets the stride information for a stride index set. 
## Synopsis
```
#include "petscis.h"   
PetscErrorCode ISStrideSetStride(IS is, PetscInt n, PetscInt first, PetscInt step)
```
Logically Collective on is


## Input Parameters

- ***is -*** the index set
- ***n -*** the length of the locally owned portion of the index set
- ***first -*** the first element of the locally owned portion of the index set
- ***step -*** the change to the next index





## Note
`ISCreateStride()` can be used to create an `ISSTRIDE` and set its stride in one function call


## See Also
 [](sec_scatter), `IS`, `ISCreateGeneral()`, `ISCreateBlock()`, `ISAllGather()`, `ISSTRIDE`, `ISCreateStride()`, `ISStrideGetInfo()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/impls/stride/stride.c.html#ISStrideSetStride">src/vec/is/is/impls/stride/stride.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/impls/stride/stride.c.html#ISStrideSetStride_Stride">ISStrideSetStride_Stride in src/vec/is/is/impls/stride/stride.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/is/impls/stride/stride.c)


[Index of all IS routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
