You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a struct might implement the IVector interface it is necessary to flag all
by reference parameters with the ref keyword. See
Accelerators.VectorOperations for example.
Original issue reported on code.google.com by christop...@gmail.com on 21 Jun 2009 at 6:04
The text was updated successfully, but these errors were encountered:
Adding an issue-test to verify issue.
Currently, if a struct is used that encapsulates the coordinates as a reference
type
(i.e as an System.Array or Collection type) then everything works as expected.
The
struct is copied by value, but coordinates are copied by reference.
On the other side, when value types are explicitely used to store the
coordinates
VectorOperations methods fail.
Original comment by christop...@gmail.com on 22 Jun 2009 at 6:05
modified signatures of methods modifying IVectors to
Sub<T>(IVector a, IVector b, ref T dest) where T : IVector {}.
It seems to be inconvinient/impossible to have a signature such as
Sub(IVector a, IVector b, ref IVector dest)
since the ref argument need to be cast to IVector such as
Sub(a, b, ref (IVector)dest) which is not possible.
resolved in revision #148.
Original comment by christop...@gmail.com on 22 Jun 2009 at 7:01
Original issue reported on code.google.com by
christop...@gmail.com
on 21 Jun 2009 at 6:04The text was updated successfully, but these errors were encountered: