patchGNU Octave - Patches: patch #8832, Code Sprint topic #6. Come corefcn

 
 

patch #8832: Code Sprint topic #6. Come corefcn

Submitter:  José Luis García Pallero <jgpallero>
Submitted:  Sat 12 Dec 2015 06:36:12 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 13 Dec 2015 07:40:33 PM UTC, comment #7: 

I modified the patch because it broke sort() due to an obscurity in the fact that arguments to ovl() are const.  I checked it in here http://hg.savannah.gnu.org/hgweb/octave/rev/f1b2a2dbc0e1.  The topic is now mostly done.  See http://wiki.octave.org/Refactor_C%2B%2B_code_to_use_ovl%28%29_when_returning_multiple_values#Files.

Rik <rik5>
Group administrator
Sun 13 Dec 2015 06:58:22 PM UTC, comment #6: 

I upload the file again. I've checked the changes compiling the development sources and my this modifications do not emit any error. The compilation does not terminate succesfully, but the errors are


  GEN      doc/interpreter/hist.eps
error: reshape: can't reshape 0x0 array to 29x1 array
error: unhandled execution exception -- eval failed
  GEN      doc/interpreter/splinefit1.eps
error: lsqsolve: operator /: nonconformant arguments (op1 is 1x0, op2 is 43x200)
error: unhandled execution exception -- eval failed
  GEN      doc/interpreter/splinefit2.eps
error: lsqsolve: operator /: nonconformant arguments (op1 is 1x0, op2 is 8x200)
error: unhandled execution exception -- eval failed
  GEN      doc/interpreter/splinefit3.eps
error: lsqsolve: operator /: nonconformant arguments (op1 is 1x0, op2 is 15x100)
error: unhandled execution exception -- eval failed
  GEN      doc/interpreter/splinefit4.eps
error: __splinefit__: -=: nonconformant arguments (op1 is 1x0, op2 is 1x200)
error: unhandled execution exception -- eval failed
  GEN      doc/interpreter/splinefit6.eps
error: __splinefit__: -=: nonconformant arguments (op1 is 1x0, op2 is 1x260)
error: unhandled execution exception -- eval failed
  TEXI2DVI doc/interpreter/octave.dvi
/usr/bin/texi2dvi: etex exited with bad status, quitting.
Makefile:27820: recipe for target 'doc/interpreter/octave.dvi' failed
make[2]: *** [doc/interpreter/octave.dvi] Error 1
make[2]: Leaving directory '/home/topo/Desktop/octave'
Makefile:25849: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/topo/Desktop/octave'
Makefile:9929: recipe for target 'all' failed
make: *** [all] Error 2


I apologize for my multiple uploads.

(file #35729)

José Luis García Pallero <jgpallero>
Sat 12 Dec 2015 10:16:06 PM UTC, comment #5: 

About 'case 2:' in balance.cc, I've not changed the original code.

I attach a compressed folder containing all the patches as individual files and another one called ALL.patch containing all them in a single file

(file #35723)

José Luis García Pallero <jgpallero>
Sat 12 Dec 2015 09:55:26 PM UTC, comment #4: 

Hm, this patch need a thoroughly review. It doesn't even compile and I bet "make check" would show many problems.

Some examples:

colloc.cc:
-  retval(3) = q;
-  retval(2) = B;
-  retval(1) = A;
-  retval(0) = r;
-
-  return retval;
+  return ov (r, A, B, q);
<verbatim>
Typo ov -> ovl

And may switch statements with fall through weren't considered.

@José: Can you please fix your patches? Perhaps it would be better to create a patch per file? I think this makes it easier
to review and apply them.

Thank you, Andy

Andreas Weber <andy1978>
Group Member
Sat 12 Dec 2015 09:40:35 PM UTC, comment #3: 

I had a wuick lookf and found this here for balance.cc:

@@ -335,15 +335,15 @@
                   retval(3) = result.balanced_matrix2 ();
                   // fall through
                 case 3:
-                  retval(2) = result.balanced_matrix ();
-                  retval(1) = result.balancing_matrix2 ();
-                  retval(0) = result.balancing_matrix ();
+                  retval = ovl (result.balancing_matrix (),
+                                result.balancing_matrix2 (),
+                                result.balanced_matrix ());
                   break;
                 case 2:
                   retval(1) = result.balancing_matrix2 ();
                   // fall through
                 case 1:
-                  retval(0) = result.balancing_matrix ();
+                  retval = ovl (result.balancing_matrix ());
                   break;
                 default:


Case 2 previously returned 2 values, now only one. Had you run make check and it passed all tests?

Andreas Weber <andy1978>
Group Member
Sat 12 Dec 2015 09:16:20 PM UTC, comment #2: 

I attach the same last patch updated

(file #35720)

José Luis García Pallero <jgpallero>
Sat 12 Dec 2015 07:24:01 PM UTC, comment #1: 

I attach again the patch with more changes. The files edited are:

_dsearchn_.cc
balance.cc
colloc.cc
data.cc
debug.cc
eig.cc
file-io.cc
getgrent.cc
getpwent.cc
givens.cc
help.cc
hess.cc
mgorth.cc
quad.cc

(file #35714)

José Luis García Pallero <jgpallero>
Sat 12 Dec 2015 06:36:12 PM UTC, original submission:  

Using retval = ovl (...

Files:

_dsearchn_.cc
balance.cc
quad.cc
eig.cc
getgrent.cc
getpwent.cc
givens.cc

José Luis García Pallero <jgpallero>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #35729:  corefcn_patches_jgpallero.tar.gz added by jgpallero (6KiB - application/gzipped-tar)
file #35723:  corefcn_patches_jgpallero.tar.gz added by jgpallero (8KiB - application/gzipped-tar)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by jgpallero (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-13 rik5 StatusNone Done
        Open/ClosedOpen Closed
    2015-12-13 jgpallero Attached File- Added corefcn_patches_jgpallero.tar.gz, #35729
    2015-12-12 jgpallero Attached File- Added corefcn_patches_jgpallero.tar.gz, #35723
    2015-12-12 jgpallero Attached File- Added patch_corefnc_pallero.patch, #35720
    2015-12-12 jgpallero Attached File- Added patch_corefnc_pallero.patch, #35714
    2015-12-12 jgpallero Attached File- Added patch_corefnc_pallero.patch, #35712

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code