Skip to main content
`Ctrl`+`K`

# DSAllocate

Allocates memory for internal storage or matrices in `DS`.

## Synopsis

    #include "slepcds.h"
    PetscErrorCode DSAllocate(DS ds,PetscInt ld)

Logically Collective

## Input Parameters

- ds - the direct solver context

- ld - leading dimension (maximum allowed dimension for the matrices, including the extra row if present)

## Note

If the leading dimension is different from a previously set value, then all matrices are destroyed with `DSReset()`.

## See Also

DS: Direct Solver (or Dense System), `DSGetLeadingDimension()`, `DSSetDimensions()`, `DSSetExtraRow()`, `DSReset()`, `DSReallocate()`

## Level

intermediate

## Location

src/sys/classes/ds/interface/dsbasic.c

## Implementations

DSAllocate_GHEP() in src/sys/classes/ds/impls/ghep/dsghep.c
DSAllocate_GHIEP() in src/sys/classes/ds/impls/ghiep/dsghiep.c
DSAllocate_GNHEP() in src/sys/classes/ds/impls/gnhep/dsgnhep.c
DSAllocate_GSVD() in src/sys/classes/ds/impls/gsvd/dsgsvd.c
DSAllocate_HEP() in src/sys/classes/ds/impls/hep/dshep.c
DSAllocate_HSVD() in src/sys/classes/ds/impls/hsvd/dshsvd.c
DSAllocate_NEP() in src/sys/classes/ds/impls/nep/dsnep.c
DSAllocate_NHEP() in src/sys/classes/ds/impls/nhep/dsnhep.c
DSAllocate_NHEPTS() in src/sys/classes/ds/impls/nhepts/dsnhepts.c
DSAllocate_PEP() in src/sys/classes/ds/impls/pep/dspep.c
DSAllocate_SVD() in src/sys/classes/ds/impls/svd/dssvd.c

Index of all DS routines Table of Contents for all manual pages Index of all manual pages