librelist archives

« back to archive

Intent of the delay list and DelayedObj.

Intent of the delay list and DelayedObj.

From:
Jon Riehl
Date:
2012-06-08 @ 23:07
Hi,

I'm working on calling into Numpy code from Numba generated code, and
I'm wondering if I'm about to reimplement something DelayedObj was
supposed to do.  Specifically, I'm planning to build a map from Numpy
functions to functions that generate LLVM code that will both link and
call into the Numpy C-API.

Thanks,
-Jon

Re: [numba] Intent of the delay list and DelayedObj.

From:
Travis Oliphant
Date:
2012-06-08 @ 23:28
I'll need more context.  I don't recall what DelayedObj is or where it 
comes from...

Thanks,

-Travis

On Jun 8, 2012, at 6:07 PM, Jon Riehl wrote:

> Hi,
> 
> I'm working on calling into Numpy code from Numba generated code, and
> I'm wondering if I'm about to reimplement something DelayedObj was
> supposed to do.  Specifically, I'm planning to build a map from Numpy
> functions to functions that generate LLVM code that will both link and
> call into the Numpy C-API.
> 
> Thanks,
> -Jon

Re: [numba] Intent of the delay list and DelayedObj.

From:
Jon Riehl
Date:
2012-06-09 @ 00:06
This is the "DelayedObj" class defined in translate.py.  There is a
list of built-ins (range, arange, etc.) that are put into the
"_delayedlist" member of a Translator object.  In
Translator.func_resolve_type() there are checks to see if a function
call is to something in the delayed list, and if so, it causes
Translator.op_CALL_FUNCTION() to push a DelayedObj instance onto the
translator stack instead of an LLVM function call result.

Thanks,
-Jon

On Fri, Jun 8, 2012 at 6:28 PM, Travis Oliphant <travis@continuum.io> wrote:
> I'll need more context.  I don't recall what DelayedObj is or where it 
comes from...
>
> Thanks,
>
> -Travis

Re: [numba] Intent of the delay list and DelayedObj.

From:
Travis Oliphant
Date:
2012-06-09 @ 00:12
Oh, yeah.   This was a pretty weak attempt at supporting some thing like 
for loops. 

Just use whatever is useful and ignore the rest and do what you think is best.

-Travis

On Jun 8, 2012, at 7:06 PM, Jon Riehl wrote:

> This is the "DelayedObj" class defined in translate.py.  There is a
> list of built-ins (range, arange, etc.) that are put into the
> "_delayedlist" member of a Translator object.  In
> Translator.func_resolve_type() there are checks to see if a function
> call is to something in the delayed list, and if so, it causes
> Translator.op_CALL_FUNCTION() to push a DelayedObj instance onto the
> translator stack instead of an LLVM function call result.
> 
> Thanks,
> -Jon
> 
> On Fri, Jun 8, 2012 at 6:28 PM, Travis Oliphant <travis@continuum.io> wrote:
>> I'll need more context.  I don't recall what DelayedObj is or where it 
comes from...
>> 
>> Thanks,
>> 
>> -Travis