PetaVision / OpenPV

PetaVision is a C++ library for designing and deploying large-scale neurally-inspired computational models.
http://petavision.github.io
Eclipse Public License 1.0
40 stars 13 forks source link

Weight pvp recordsize #251

Closed peteschultz closed 6 years ago

peteschultz commented 6 years ago

This pull request eliminates the use of the recordsize field in weight pvp files. The motivation is that for large enough patch sizes, the number of bytes in an arbor can overflow the 32-bit integer type.

When writing filetypes 3 (PVP_WGT_FILE_TYPE) and 5 (PVP_KERNEL_FILE_TYPE), the recordsize field is now saved as zero. When reading these files, the size of the arbor is computed from the nxp, nyp, nfp, numpatches, and datasize fields.

This change has been applied to fileio, BufferUtilsPvp, and the matlab and python tools.