PetscErrorCode PetscBinaryWrite(int fd,void *p,PetscInt n,PetscDataType type,PetscBool istemp)Not Collective Many br
fd | - the file Many br | |
p | - the buffer Many br | |
n | - the number of items to write Many br | |
type | - the type of items to read (PETSC_INT, PETSC_DOUBLE or PETSC_SCALAR) Many br | |
istemp | - PETSC_FALSE if buffer data should be preserved, PETSC_TRUE otherwise. Many br |
Many br
If running with __float128 precision the output is in __float128 unless one uses the -binary_read_double option Many br
The Buffer p should be read-write buffer, and not static data. Many brThis way, byte-swapping is done in-place, and then the buffer is Many brwritten to the file. Many br
This routine restores the original contents of the buffer, after Many brit is written to the file. This is done by byte-swapping in-place Many brthe second time. If the flag istemp is set to PETSC_TRUE, the second Many brbyte-swapping operation is not done, thus saving some computation, Many brbut the buffer is left corrupted. Many br
Because byte-swapping may be done on the values in data it cannot be declared const Many br
Level:advanced
Location:src/sys/fileio/sysio.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages