[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sun C++ - Array.cc & Sparse.cc errors
From: |
John W. Eaton |
Subject: |
Sun C++ - Array.cc & Sparse.cc errors |
Date: |
Mon, 8 Nov 2010 11:39:57 -0500 |
On 8-Nov-2010, Rob McMahon wrote:
| I hope this is the right list. Please redirect me if I'm wrong. The
| help list looked more about using than installing octave.
The help list is for getting help with using and installing Octave.
If you think you've found a bug, please report it on the bug tracker,
here:
https://savannah.gnu.org/bugs/?func=additem&group=octave
| I'm running on Solaris 10 5/09, using Sun C++ 5.10, trying to compile
| octave.
Which version of Octave?
| I know some will say I should just use g++, but I don't want
| the mess of library incompatibilities that that means.
We would like to be able to build Octave with any standard conforming
C++ compiler, but most of us working on Octave use GCC, so we don't
notice all the problems.
| but it all looks like the same problem. The lines involved in Array.cc are:
|
| 2352 template <class T>
| 2353 sortmode
| 2354 Array<T>::is_sorted_rows (sortmode mode) const
| ...
| 2360 if (r <= 1 || c == 0)
| 2361 return mode ? mode : ASCENDING;
| 2362
| >>> 2363 if (! mode)
| ...
| >>> 2394 if (! mode && i == cols ())
| 2395 mode = ASCENDING;
|
| i.e. !mode, and in Sparse.cc:
Does the following change help? It is relative to the current
sources, so may not apply exactly to the version you are trying to
build, but the idea is that mode is an enum with UNKNOWN == 0, so
a test for "! mode" should be replaced by "mode == UNKNOWN" and a test
for "mode" should be replace by "mode != UNKNOWN".
| 307 template <class T>
| 308 Sparse<T>::Sparse (const Array<T>& a, const
| Array<octave_idx_type>& r,
| 309 const Array<octave_idx_type>& c,
| octave_idx_type nr,
| 310 octave_idx_type nc, bool sum_terms)
| 311 : dimensions (dim_vector (nr, nc)), idx (0), idx_count (0)
| 312 {
| ...
| 367 if (actual_nzmx == 0)
| 368 rep = new typename Sparse<T>::SparseRep (nr, nc);
| 369 else
| 370 {
| 371 OCTAVE_QUIT;
| 372 octave_sort<octave_sparse_sort_idxl *>
| >>> 373 lsort (octave_sparse_sidxl_comp);
I don't see this code in the current Octave sources.
jwe