- Timestamp:
- Jun 12, 2015, 9:44:51 PM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150419/Ohana/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
libfits/matrix/F_matrix.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150419/Ohana/src
-
Property svn:mergeinfo
set to
/branches/eam_branches/ipp-20150112/Ohana/src merged eligible /branches/eam_branches/ipp-20150405/Ohana/src merged eligible /trunk/Ohana/src merged eligible
-
Property svn:mergeinfo
set to
-
branches/eam_branches/ipp-20150419/Ohana/src/libfits/matrix/F_matrix.c
r35164 r38447 2 2 # include <gfitsio.h> 3 3 4 off_t gfits_data_size (Header *header) { 5 6 int i; 7 off_t Nrec, size; 8 9 if (header[0].Naxes == 0) return (0); 10 11 size = abs(header[0].bitpix / 8); 12 13 for (i = 0; i < header[0].Naxes; i++) 14 size *= header[0].Naxis[i]; 15 16 // XXX do I multiply this times gcount? 17 size += header[0].pcount; 18 19 /* round up to next complete block */ 20 if (size % FT_RECORD_SIZE) { 21 Nrec = 1 + (int) (size / FT_RECORD_SIZE); 22 size = FT_RECORD_SIZE * Nrec; 23 } 24 25 return (size); 26 } 27 28 off_t gfits_data_min_size (Header *header) { 4 off_t gfits_heap_start (Header *header) { 29 5 30 6 int i; … … 38 14 size *= header[0].Naxis[i]; 39 15 40 // XXX do I multiply this times gcount? 16 return (size); 17 } 18 19 off_t gfits_data_min_size (Header *header) { 20 21 off_t size = gfits_heap_start (header); 41 22 size += header[0].pcount; 23 24 // XXX what do I do with gcount? 42 25 43 26 return (size); … … 46 29 off_t gfits_data_pad_size (off_t rawsize) { 47 30 48 off_t Nrec, size; 49 50 size = rawsize; 31 off_t size = rawsize; 51 32 52 33 /* round up to next complete block */ 53 34 if (rawsize % FT_RECORD_SIZE) { 54 Nrec = 1 + (int) (rawsize / FT_RECORD_SIZE);35 off_t Nrec = 1 + (int) (rawsize / FT_RECORD_SIZE); 55 36 size = FT_RECORD_SIZE * Nrec; 56 37 } … … 58 39 return (size); 59 40 } 41 42 off_t gfits_data_size (Header *header) { 43 off_t rawsize = gfits_data_min_size(header); 44 off_t size = gfits_data_pad_size (rawsize); 45 46 return (size); 47 } 48
Note:
See TracChangeset
for help on using the changeset viewer.
