Velocity Reviews - Computer Hardware Reviews

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

Thread Tools

SSE4a with ctypes in python? (gcc __builtin_popcount)

Posts: n/a
Hi guys,

Here is the sample code

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)?

Reply With Quote

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? 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 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