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.22 by greg, Tue Jun 4 21:23:11 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 + #define DTrmx_native    DTdouble        /* in-core data type */
25 +
26   /* General [row][col][cmp] component matrix */
27   typedef struct {
28          char    *info;
# Line 26 | Line 33 | typedef struct {
33          int     nrows, ncols;
34          short   ncomp;
35          uby8    dtype;
36 <        uby8    swapin;
36 >        uby8    pflags;
37   } RMATRIX;
38  
39   #define rmx_lval(rm,r,c)        ((rm)->mtx + (rm)->ncomp*((c)+(size_t)(rm)->ncols*(r)))
40   #define rmx_val                 rmx_lval
41 +
42 + #define rmx_array_size(rm)      (sizeof(double)*(rm)->nrows*(rm)->ncols*(rm)->ncomp)
43 + #define rmx_mapped_size(rm)     ((char *)(rm)->mtx + rmx_array_size(rm) - (char *)(rm)->mapped)
44  
45   /* Initialize a RMATRIX struct but don't allocate array space */
46   extern RMATRIX  *rmx_new(int nr, int nc, int n);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines