[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59477] __ode15__.cc does not consider the num
From: |
Hg200 |
Subject: |
[Octave-bug-tracker] [bug #59477] __ode15__.cc does not consider the number of arguments in the event function |
Date: |
Mon, 11 Jan 2021 18:22:38 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0 |
Follow-up Comment #6, bug #59477 (project octave):
I cleaned the code a bit and attached the patch. The idea is that when calling
the function "__ode15__()" in ode15i.m and ode15s.m, an additional parameter
is passed that controls the number of arguments in the ode event callback.
Thus __ode15__ can provide the required number of arguments for ode15s and
ode15i functions at line 775.
The question about runtime is tricky. I tried again a bit harder: Rebooted, no
X-server and ran Octave + examples below from bash. This time i got 6% for
ode15s and 0.5% for ode15i (wrapper slower than C-solution). That confirms the
measurement below. But if I choose another ode problem that requires much more
runtime, then both solutions have nearly same runtime. So it seems also to
depend on the use case.
(file #50704)
_______________________________________________________
Additional Item Attachment:
File name: patch_ode15_eventfct.diff Size:9 KB
<https://file.savannah.gnu.org/file/patch_ode15_eventfct.diff?file_id=50704>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59477>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/