octave-maintainers
[Top][All Lists]
Advanced

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

Re: Question of JITC


From: Max Brister
Subject: Re: Question of JITC
Date: Fri, 2 Aug 2013 19:37:29 -0700




On Wed, Jul 31, 2013 at 8:21 AM, lyh.kernel <address@hidden> wrote:
Hello Max,

I am wondering how to use built-in function with JITC. I write the following script:

$ cat builtin_func.m
A = [1, 2; 3, 4];

i = 0;
do
  A = sin(A);
  i++;
until (i == 1)

disp(A)

However when I run this script:

$ octave --debug-jit builtin_func.m
warning: function ./test.m shadows a core library function
GNU Octave, version 3.7.5
Copyright (C) 2013 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-unknown-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type 'news'.

jit fail: Missing overload in type inference for #2 = call  (any: sin#26)
   0.84147   0.90930
   0.14112  -0.75680

It seems that there is something wrong in JITC. Could you tell me how to use built-in function in JITC?
Thanks a lot.

This is a bug, I'm not sure why it is currently broken. I'll look into it this weekend.

Currently, functions are supported by calling register_generic in the jit_typeinfo constructor[1]. register_generic creates an overload for the parenthesis operator for the given function and types.

At some point in the future, I would like to create some macro like DEFUN that automatically registers functions with JIT.

[1] http://hg.savannah.gnu.org/hgweb/octave/file/1e2641277b2a/libinterp/corefcn/jit-typeinfo.cc#l1828

--
Max Brister

reply via email to

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