A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-September/121798.html below:

[Python-Dev] Memoryviews should expose the underlying memory address

[Python-Dev] Memoryviews should expose the underlying memory address [Python-Dev] Memoryviews should expose the underlying memory addressDavid Beazley dave at dabeaz.com
Fri Sep 21 14:07:09 CEST 2012
On Sep 21, 2012, at 4:45 AM, Maciej Fijalkowski wrote:
> 
> This is also kind of a problem with PyPy and CFFI, where we actively
> discourage people from using C. Passing address as an int sounds like
> a very reasonable solution.
> 

I just wanted to add that getting the address as an integer is useful because one might actually want to do math with it.   Since memoryviews also expose the shape, itemsize, and other information, it's conceivable that one might combine these with the base address to compute locations within the array.  Example: take a memoryview, slice up the buffer into partitions and hand them off to worker functions running in a thread pool.

Cheers,
Dave

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4