Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: supporting SSE 128 bit data in Perl

by spx2 (Deacon)
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

Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2022-12-08 22:43 GMT
Find Nodes?
    Voting Booth?

    No recent polls found