Re: Extracting 2D array from SAFEARRAY [Was "Passing a 2D array in a property"]
From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 06/08/04
- Next message: Alexander Nickolov: "Re: windows handler of an out proc server"
- Previous message: Yan-Hong Huang[MSFT]: "Re: Still looking for help with IAccessible (Proxy?) (Impl?)"
- In reply to: Kevin J. Menard, Jr.: "Re: Extracting 2D array from SAFEARRAY [Was "Passing a 2D array in a property"]"
- Next in thread: Kevin J. Menard, Jr.: "Re: Extracting 2D array from SAFEARRAY [Was "Passing a 2D array in a property"]"
- Reply: Kevin J. Menard, Jr.: "Re: Extracting 2D array from SAFEARRAY [Was "Passing a 2D array in a property"]"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 7 Jun 2004 22:28:40 -0700
The organization of multi-dimensional safe arrays has not been
designed by me... Complain to Microsoft. Or change your code
to loop over the second dimension first, so you maximize the
benefit of the CPU cache.
-- ===================================== Alexander Nickolov Microsoft MVP [VC], MCSD email: agnickolov@mvps.org MVP VC FAQ: http://www.mvps.org/vcfaq ===================================== "Kevin J. Menard, Jr." <kmenard@wpi.edu> wrote in message news:40C4D60F.7090409@wpi.edu... > Alexander Nickolov wrote: > > No, you can't address the array as two dimensional unfortunately. > > You need to linearize the access: [x + n*y] for the pair [x][y]. > > Note this is the opposite of C arrays - the first index changes > > the fastest. > > Just to make sure we're using the same nomenclature, since I normally > access the data points as data[row][col], with row being the y > coordinate and col being the x coordinate. Are you saying I need to > reverse the dimensions then? Isn't this going to incur a lot of memory > jumps? > > Thanks, > Kevin
- Next message: Alexander Nickolov: "Re: windows handler of an out proc server"
- Previous message: Yan-Hong Huang[MSFT]: "Re: Still looking for help with IAccessible (Proxy?) (Impl?)"
- In reply to: Kevin J. Menard, Jr.: "Re: Extracting 2D array from SAFEARRAY [Was "Passing a 2D array in a property"]"
- Next in thread: Kevin J. Menard, Jr.: "Re: Extracting 2D array from SAFEARRAY [Was "Passing a 2D array in a property"]"
- Reply: Kevin J. Menard, Jr.: "Re: Extracting 2D array from SAFEARRAY [Was "Passing a 2D array in a property"]"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|