You may also be able to use <https://github.com/Keno/Cxx.jl> to write
your C code, which should ensure that it is inlined.

Also -- are you sure that LLVM's vectorizer can't be convinced to
generate these instructions automatically? I know this is not possible
in all cases (I wish!), but there's been a lot of recent work on
improving the vectorizer, and the current code quality is an order of
magnitude better than last year.

-erik

On Sat, Nov 22, 2014 at 3:26 PM, Stefan Karpinski <ste...@karpinski.org> wrote:
> You can already inline assembly into llvm so it's not super clean but it can
> be done.
>
> On Sat, Nov 22, 2014 at 3:15 PM, Isaiah Norton <isaiah.nor...@gmail.com>
> wrote:
>>
>> If it is exposed in some form by LLVM, you might be able to use llvmcall.
>> See https://github.com/JuliaLang/julia/pull/5046
>> (and possibly also https://github.com/JuliaLang/julia/pull/8740)
>>
>> Eventually I believe we will have a similar `asmcall` feature.
>>
>>
>> On Sat, Nov 22, 2014 at 2:58 PM, eric l <cdg2...@gmail.com> wrote:
>>>
>>> Is there a plan for some sort of intrinsics in Julia? The most recent
>>> iterations of the x86 ISA have things like pext that
>>> extract specific bits in a dw, or qw and pack them together.
>>> Currently to use an instruction like that I define a C function create a
>>> shared lib and make a ccall.
>>> This is rather sub optimal and the function while very simple is not
>>> inlined obviously...
>>>
>>> Thanks,
>>>
>>> -ETL
>>
>>
>



-- 
Erik Schnetter <schnet...@cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/

Reply via email to