[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling Octave built in functions from C, not C++

From: Carlo De Falco
Subject: Re: Calling Octave built in functions from C, not C++
Date: Sun, 27 Jan 2019 17:13:23 +0000

Please keep the mailing list in 
> On 1/26/19 3:02 AM, Carlo De Falco wrote:
>>> On 26 Jan 2019, at 03:29, Allan Branscomb <address@hidden>
>>>  wrote:
>>> There is mention that it can be done but I haven't been able to find any 
>>> examples in which C is the calling language.
>> Where did you find mention of that? builtin functions are declared as :
>> extern OCTINTERP_API octave_value_list
>> Fnorm (const octave_value_list& = octave_value_list (), int = 0);
>> and "octave_value_list" is definitely not a C compatible type ...
>> c.
> On 27 Jan 2019, at 17:15, Allan Branscomb <address@hidden> wrote:
> Hello;
> The reference is found here:  

that is a very old version of the Octave manual from more tha 10 years ago!
The updated manual is here :

> " These are highly optimized and many do not carry the overhead of being 
> interpreted."

Where does that say you can call builtins from a C standalone program?
It does say you can call C code from Octave, but that is not what you want, 

> However, I was concerned with calling Octave just two commonly used functions 
> from standalone C, not calling C functions from within Octave and was trying 
> to determine if it also would be possible to avoid use of the interpreter by 
> calling them from C outside of the Octave environment.

That is definitely possible for C++. I don't think it is easy to do from C.

On the other hand, many Octave built-in functions are not implemented from 
scratch but rather use backend libraries.
Many such libraries are written in C or F77 so, if you specify what functions 
you want to use we might direct you to the libraries that Octave uses to 
implement them.

> Allan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]