:orphan:
# PetscBLASIntCast
casts a `PetscInt` (which may be 64-bits in size) to a `PetscBLASInt` (which may be 32-bits in size), generates an error if the `PetscBLASInt` is not large enough to hold the number.
## Synopsis
```
static inline PetscErrorCode PetscBLASIntCast(PetscInt a, PetscBLASInt *b)
```
Not Collective; No Fortran Support
## Input Parameter
- ***a -*** the `PetscInt` value
## Output Parameter
- ***b -*** the resulting `PetscBLASInt` value
## Note
Errors if the integer is negative since PETSc calls to BLAS/LAPACK never need to cast negative integer inputs
## See Also
`PetscBLASInt`, `PetscMPIInt`, `PetscInt`, `PetscMPIIntCast()`, `PetscIntCast()`, `PetscCountCast()`
## Level
advanced
## Location
include/petscsys.h
## Examples
src/ts/tutorials/ex50.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscsys.h)
[Index of all Sys routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)