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.24 by greg, Thu Jun 6 17:01:05 2024 UTC vs.
Revision 2.27 by greg, Fri Apr 18 23:59:03 2025 UTC

# Line 12 | Line 12
12   extern "C" {
13   #endif
14  
15 /* Preferred BSDF component:
16        none, transmission, reflection front (normal side), reflection back */
17 typedef enum {RMPnone=-1, RMPtrans=0, RMPreflF, RMPreflB} RMPref;
18
15   /* RMATRIX flags (usually private):
16          need to swap input, we should free memory */
17   #define RMF_SWAPIN      1
18   #define RMF_FREEMEM     2
19  
20 < #define DTrmx_native    DTdouble        /* in-core data type */
20 > #ifndef MAXCOMP
21 > #define MAXCOMP         MAXCSAMP        /* #components we support */
22 > #endif
23 >                                        /* Set in-core data type */
24 > #if !defined(DTrmx_native) || DTrmx_native==DTfloat
25 > #define DTrmx_native    DTfloat
26 > #define rmx_dtype       float
27 > #define rmx_scanfmt     "%f"
28 > #elif DTrmx_native==DTdouble
29   #define rmx_dtype       double
30 + #define rmx_scanfmt     "%lf"
31 + #endif
32  
33   /* General [row][col][cmp] component matrix */
34   typedef struct {
# Line 71 | Line 77 | extern int     rmx_load_row(rmx_dtype *drp, const RMATRIX
77   extern int      rmx_load_data(RMATRIX *rm, FILE *fp);
78  
79   /* Load matrix from supported file type (NULL for stdin, '!' with command) */
80 < extern RMATRIX  *rmx_load(const char *inspec, RMPref rmp);
80 > extern RMATRIX  *rmx_load(const char *inspec);
81  
82   /* Append header information associated with matrix data */
83   extern int      rmx_addinfo(RMATRIX *rm, const char *info);
# Line 95 | Line 101 | extern RMATRIX *rmx_copy(const RMATRIX *rm);
101   /* Replace data in first matrix with data from second */
102   extern int      rmx_transfer_data(RMATRIX *rdst, RMATRIX *rsrc, int dometa);
103  
104 < /* Allocate and assign transposed matrix */
105 < extern RMATRIX  *rmx_transpose(const RMATRIX *rm);
104 > /* Transpose the given matrix */
105 > extern int      rmx_transpose(RMATRIX *rm);
106  
107   /* Multiply (concatenate) two matrices and allocate the result */
108   extern RMATRIX  *rmx_multiply(const RMATRIX *m1, const RMATRIX *m2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines