SCM

SCM Repository

[matrix] Diff of /pkg/src/UFconfig/UFconfig.h
ViewVC logotype

Diff of /pkg/src/UFconfig/UFconfig.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2298, Fri Oct 17 13:45:12 2008 UTC revision 2299, Fri Oct 17 16:07:38 2008 UTC
# Line 1  Line 1 
1    /* This file has been modified for the Matrix package for R.  The SPQR
2     * package requires the UF_long versions of other SuiteSparse
3     * packages. On 32-bit systems these would be 32-bit ints but on
4     * 64-bit systems these would be 64-bit ints.  R does not have a
5     * native 64-bit int type.  To provide compatibility with the R
6     * storage types and to allow use of SPQR without requiring both the
7     * INT and the LONG versions to be compiled, we redefine UF_long to be
8     * an int.  This is against the spirit of the documentation included
9     * below but allows for only one version of the SparseSuite libraries
10     * to be compiled and linked. Having a version of sparse matrices with
11     * 64-bit integers in the compiled code does not make sense because
12     * these cannot at present be represented as R objects (well, without
13     * trickery like representing the i, j and p slots as doubles).
14     */
15    
16    
17  /* ========================================================================== */  /* ========================================================================== */
18  /* === UFconfig.h =========================================================== */  /* === UFconfig.h =========================================================== */
19  /* ========================================================================== */  /* ========================================================================== */
# Line 47  Line 63 
63  /* === UF_long ============================================================== */  /* === UF_long ============================================================== */
64  /* ========================================================================== */  /* ========================================================================== */
65    
66    
67  #ifndef UF_long  #ifndef UF_long
68    /* Changes for the Matrix package in R.  Unconditionally define
69     * UF_long as int.
70     */
71    
72    #define UF_long int
73    #define UF_long_max INT_MAX
74    #define UF_long_id "%d"
75    
76    /*
77    
78  #ifdef _WIN64  #ifdef _WIN64
79    
# Line 62  Line 88 
88  #define UF_long_id "%ld"  #define UF_long_id "%ld"
89    
90  #endif  #endif
91    */
92    
93  #endif  #endif
94    
95  /* ========================================================================== */  /* ========================================================================== */

Legend:
Removed from v.2298  
changed lines
  Added in v.2299

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge