:orphan:
# MatDenseGetLDA
gets the leading dimension of the array returned from `MatDenseGetArray()` 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatDenseGetLDA(Mat A, PetscInt *lda)
```
Not Collective


## Input Parameter

- ***mat -*** a `MATDENSE` or `MATDENSECUDA` matrix



## Output Parameter

- ***lda -*** the leading dimension





## See Also
 [](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MatDenseGetArray()`, `MatDenseRestoreArray()`, `MatDenseGetArrayRead()`, `MatDenseRestoreArrayRead()`, `MatDenseSetLDA()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/dense/seq/dense.c.html#MatDenseGetLDA">src/mat/impls/dense/seq/dense.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/dense/mpi/mpidense.c.html#MatDenseGetLDA_MPIDense">MatDenseGetLDA_MPIDense in src/mat/impls/dense/mpi/mpidense.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/dense/seq/dense.c.html#MatDenseGetLDA_SeqDense">MatDenseGetLDA_SeqDense in src/mat/impls/dense/seq/dense.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/dense/seq/dense.c)


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