[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating a standalone executable
From: |
Paul Kienzle |
Subject: |
Re: Creating a standalone executable |
Date: |
Wed, 18 Dec 2002 15:03:03 -0500 |
User-agent: |
Mutt/1.2.5.1i |
octave_value is part of liboctinterp. Many of the classes on which the
octave_value types are based are defined in liboctave. E.g., liboctave
defines Matrix, which is wrapped by octave_matrix.
octave_value implements dynamic typing, so all operations must be looked
up at run time every time they are invoked.
Things like the * operator for the Matrix class, however, are resolvable
at compile time.
Most of the code in e.g., src/DLD-FUNCTIONS, operates directly on values
of the underlying type rather than on the octave_value item.
Paul Kienzle
address@hidden
On Wed, Dec 18, 2002 at 11:50:41AM -0800, JD Cole wrote:
> Yes, that is why I was curious about the history of install_ops/_types.
>
> Just to clear something up, when I'm performing octave_value addition,
> as in the code snippet below, this uses liboctinterp operators, not
> liboctave operators?
>
> The way I "understand" now I thought that ov operators were all defined
> in liboctave, so in the following code I shouldn't need functionality
> from liboctinterp, right? (I admit I'm a bit confused at this point.)
>
> JD
>
> | source code (a.cc)
> > | =========
> > | #include <octave/oct.h>
> > | #include <octave/ops.h>
> > | #include <iostream>
> > |
> > | using namespace std;
> > |
> > | int main(int argc, char *argv[])
> > | {
> > | install_types ();
> > | install_ops ();
> > | octave_value a(10.0),b(20.0),c;
> > |
> > | c = a + b;
> > |
> > | c.print(cout);
> > |
> > | return (0);
> > | }
>
>
> John W. Eaton wrote:
>
> >On 18-Dec-2002, JD Cole <address@hidden> wrote:
> >
> >| This may be a C++ ignorant question, but, what was the motivation behind
> >| installing operators/types "manually" rather than having them
> >| instantiated in the type class?
> >
> >Mixed-type operations, I think.
> >
> >But I think it would still be possible to have them installed
> >automatically, using some static object -- the constructor of the
> >object would call the appropriate function for installing the
> >operators defined in the file where the static object appears. The
> >constructor for the static object would be called automatically when
> >the object is loaded. That only leaves the question of ensuring that
> >everything is initialized in the proper order (probably not too hard
> >to do, but would require some care). But as Paul points out, maybe
> >you don't want to initialize all of this every time you use
> >liboctinterp?
> >
> >jwe
> >
> >
> >
>
- Creating a standalone executable, JD Cole, 2002/12/13
- Re: Creating a standalone executable, Paul Kienzle, 2002/12/13
- Re: Creating a standalone executable, John W. Eaton, 2002/12/18
- Re: Creating a standalone executable, Paul Kienzle, 2002/12/18
- Re: Creating a standalone executable, JD Cole, 2002/12/18
- Re: Creating a standalone executable, John W. Eaton, 2002/12/18
- Re: Creating a standalone executable, JD Cole, 2002/12/18
- Re: Creating a standalone executable,
Paul Kienzle <=
- Re: Creating a standalone executable, John W. Eaton, 2002/12/18
- Re: Creating a standalone executable, JD Cole, 2002/12/18
- Re: Creating a standalone executable, Paul Kienzle, 2002/12/19
Message not available
Creating a standalone executable, John W. Eaton, 2002/12/18