octave_value_list retval;
//
retval.append( octave_value(array_y ) );
return retval;
}
The Octave code, which calls the oct file, is:
assert( size(x)==[10,1] && size(x)==[20,1] ); % this passes successfully
y = my_dispatcher_function(x,y);
The constructor of My_cpp_class relies on a singleton, which has been implemented with a non-member function that returns a static instance of the Singleton.
Everytime I call the dispatcher from Octave GUI, Octave immediately closes all windows of the software and ends. (Maybe a subgroup of us can agree that either my class leaks or Octave encounters a bug. I have debugged my class. I would appreciate avoiding a discussion into that area.)
I do not know or want to know or discuss whether this is a bug.
I am interested in acquiring a means to doing what the above code would be expected to do under reasonable naive assumptions (which are: I have a class. I can construct and destruct instances of it in c++ multiple times without memory leaks. Each instance has buffers x,y and a member function compute that manipulates y. I want to obtain y in Octave from given x in Octave).
Currently, my work-around is to write a text file in octave, then make a system call from octave to my cpp exe, this manipulates the textfile, and octave reads the results. The issue is with speed of execution, since the write to harddrive introduces enourmous latency, particularly since I need ~10000 evalations per use case.
Thank you for any help.
Kind regards,
Guido