[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: JIT - automated mexing
From: |
Fotios Kasolis |
Subject: |
Re: JIT - automated mexing |
Date: |
Thu, 24 Jun 2010 22:05:28 +0200 |
On Jun 24, 2010, at 9:46 PM, David Bateman wrote:
> Fotios Kasolis wrote:
>> Is there someone that is planing to introduce (or already implementing) JIT
>> in Octave? If not, i ll place that on my MOST_DESIRED list. Unfortunately i
>> do not have the knowledge (yet) to do it but i ll start working on that
>> whenever i find some time (any help: links, books, whatever ;D).
>>
>> An idea (which i do not know if implementable but sounds so)
>> Instead of a traditional JIT what about automated mexing? Sth like
>>
>>
>>> mex_my_loops(myfunc)
>>>
>>
>> will replace all (replaceable) loops by mexed ones? Does this sound
>> reasonable (if not why?)? At least it sounds relatively easier than JIT and
>> more user oriented (it is always good to have a choice)
>>
>> /Fotios
>>
>>
> I think JIT is a lot harder than you think. There is no strict variable
> typing in Octave and so you need to discover what types are used before you
> can call the appropriate compiled functions. Also variable types can be
> polymorphic. Consider something like
>
> a = 1
> for i = 0:.1:2
> a += asin(i);
> endfor
>
> Yes I know its an artifical example, but consider what happens to the type of
> a when i=1.1.... There is a JIT in FreeMat but FreeMat essentially got rid of
> there logical and single precision types to simplify the detection of code
> where the JIT compiler might be applied.
>
> I'd suggest you look at the JIT code in FreeMat in any case for inspiration,
> at
>
> http://freemat.svn.sourceforge.net/viewvc/freemat/branches/ArraySimplification/libs/libMatC/
>
> Regards
> David
>
I think of JIT as hard as it is but no more than that! But what about the
automated mex code solution?
/Fotios
- JIT - automated mexing, Fotios Kasolis, 2010/06/24
- Message not available
- Re: JIT - automated mexing,
Fotios Kasolis <=