[Coin-discuss] Performance of CoinMemcpyN()
Michael Hennebry
hennebry at web.cs.ndsu.nodak.edu
Fri Jul 29 16:25:08 EDT 2005
On Fri, 29 Jul 2005, Joseph Young wrote:
> By default, the function CoinMemcpyN() copies the elements from
> one array to another using a for loop. Using memcpy() would most likely
> make this operation much faster.
>
> If COIN is compiled with the flag -DUSE_MEMCPY, then this function
> will use memcpy() to copy the array. However, by default, this
> flag is not set. There's also not a good place, that I can see, to add
> this flag to the make process (although there's a number of places that it
> could be put where it will work.)
>
> Shouldn't the default behavior of this funtion use memcpy()? If
> not, it would be nice to have this flag hilighted in the Makefiles so that
> users know that they can turn it on.
Some things can't be copied with memcpy.
Not everything is POD.
Some have user-defined assignment operators.
Some have implementation-defined internal pointers.
My recollection is that virtual bases are handled that way.
BTW what is the Coin module for?
Does it depend on anything?
--
Mike hennebry at web.cs.ndsu.NoDak.edu
"There are three kinds of people,
those who can count and those who can't."
More information about the Coin-discuss
mailing list