Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > SSE4a with ctypes in python? (gcc __builtin_popcount)

Reply
Thread Tools

SSE4a with ctypes in python? (gcc __builtin_popcount)

 
 
est
Guest
Posts: n/a
 
      10-31-2011
Hi guys,

Here is the sample code

http://stackoverflow.com/questions/6...390606#6390606

static inline int distance(unsigned x, unsigned y)
{
return __builtin_popcount(x^y);
}

Is it possible to rewrite the above gcc code in python using ctypes
(preferably Win/*nix compatible)?

TIA!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WindowsXP/ CTypes - How to convert ctypes array to a string? dudeja.rajat@gmail.com Python 0 08-19-2008 10:20 AM
RE: [ctypes-users] [Ann] ctypes 0.9.0 released Henk Punt Python 0 07-23-2004 10:34 PM
[Q] ctypes callbacks with Delphi achrist@easystreet.com Python 8 10-19-2003 05:26 PM
midi with ctypes Anton Vredegoor Python 3 08-09-2003 06:59 PM
ctypes ques ryan Python 1 08-04-2003 06:46 PM



Advertisments