Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Accelerating random access to memory

nizanh
Beginner
383 Views
hi,
I am looking for a way to get faster memory access to, say, some random pixels in an image. I couldn't find any IPP function that dose so (or close to). Presently I am using IPPS function to compute the offset of the memory address, but IPPS doesn't support pointer arithmatic, so I still have to do the last step in a loop.
Any suggestion?
thanks,
Nizan.

Message Edited by nizanh on 02-02-2005 04:14 AM

0 Kudos
2 Replies
Vladimir_Dudnik
Employee
383 Views
Hi Nizan
It is a bit unclear what you are trying to do. To get access to arbitrary pixel in image you can use
val = pSrc[y*srcStep) + x]
where x and y is pixel coordinates
Is it what you are asking about?
Regards,
Vladimir
0 Kudos
nizanh
Beginner
383 Views
thanks for the response.
I do access the memory with
pSrc[y*srcStep) + x].
but suppose that y & x are vectors. Access the memory through loop
for (i=1;i= pSrc[y*srcStep + x ];}
is quite slow. I can speed it up if I calculate
offset = y*srcStep + x
as vectors, using ipps functions, but I still need a loop
for (i=1;i= pSrc[offset];}
I want to speed it up further. If mmx/sse (and better, IPP) supportsome memory access for multiple address it would probablyboost the speed further.
thanks,
Nizan.
0 Kudos
Reply