PetscBinaryRead

Reads from a binary file.

Synopsis

int PetscBinaryRead(int fd,void *p,int n,PetscDataType type)
Not Collective

Input Parameters

fd - the file
n - the number of items to read
type - the type of items to read (PETSC_INT or PETSC_SCALAR)

Output Parameters

p -the buffer

Notes

PetscBinaryRead() uses byte swapping to work on all machines. Integers are stored on the file as 32 long, regardless of whetherthey are stored in the machine as 32 or 64, this means the samebinary file may be read on any machine.

Keywords

binary, input, read

See Also

PetscBinaryWrite(), PetscBinaryOpen(), PetscBinaryClose()

Location: src/sys/src/fileiosysio.c
System Index
Table of Contents