Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: supporting SSE 128 bit data in Perl

by spx2 (Chaplain)
on Jun 01, 2012 at 01:48 UTC ( #973651=note: print w/ replies, xml ) Need Help??


in reply to supporting SSE 128 bit data in Perl

I'd go for one of these two, and use them to write all the code that has to deal with SSE2 using them, I'm more inclined to think you want the first option since it gives you full control over everything:

These guys here seem to be using double * for the data types, maybe you want to use that too.. but regardless, that article is a good read.

As far as packing goes, I would suggest you bother with that only when your SSE2 calculations are done and you need the result visible in Perl. Then you can easily convert it to some C data type and then to an XS data type or whatever other data structure you need.


Comment on Re: supporting SSE 128 bit data in Perl
Re^2: supporting SSE 128 bit data in Perl
by bulk88 (Priest) on Jun 01, 2012 at 03:01 UTC
    Thank you for asm tips, but I have a C API that sometimes wants SSE2 data as arguments in a C function prototype. I am not trying to use SSE2 cpu instructions or intrinsics directly. If I were, I would know exactly what part of the SSE2 union the data should be in.

    Maybe I shouldn't be reinventing the wheel and instead looking for a CPAN module that already understands what a C union is and somehow integrate it into my code and just say "supply a Foo::CAggregate object ref for parameter 1" :-/

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://973651]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2014-08-29 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (280 votes), past polls