ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rmatrix.h
(Generate patch)

Comparing ray/src/util/rmatrix.h (file contents):
Revision 2.20 by greg, Wed Dec 6 17:57:34 2023 UTC vs.
Revision 2.21 by greg, Sun May 19 15:32:24 2024 UTC

# Line 16 | Line 16 | extern "C" {
16          none, transmission, reflection front (normal side), reflection back */
17   typedef enum {RMPnone=-1, RMPtrans=0, RMPreflF, RMPreflB} RMPref;
18  
19 + /* Private flags:
20 +        need to swap input, need to free/unmap memory */
21 + #define RMF_SWAPIN      1
22 + #define RMF_OURMEM      2
23 +
24   /* General [row][col][cmp] component matrix */
25   typedef struct {
26          char    *info;
# Line 26 | Line 31 | typedef struct {
31          int     nrows, ncols;
32          short   ncomp;
33          uby8    dtype;
34 <        uby8    swapin;
34 >        uby8    pflags;
35   } RMATRIX;
36  
37   #define rmx_lval(rm,r,c)        ((rm)->mtx + (rm)->ncomp*((c)+(size_t)(rm)->ncols*(r)))
38   #define rmx_val                 rmx_lval
39 +
40 + #define rmx_array_size(rm)      (sizeof(double)*(rm)->nrows*(rm)->ncols*(rm)->ncomp)
41 + #define rmx_mapped_size(rm)     ((char *)(rm)->mtx + rmx_array_size(rm) - (char *)(rm)->mapped)
42  
43   /* Initialize a RMATRIX struct but don't allocate array space */
44   extern RMATRIX  *rmx_new(int nr, int nc, int n);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines