Closed GoogleCodeExporter closed 8 years ago
In consideration.
Could you give an example as to why an integer vector would be preferred over a
floating point vector?
Original comment by Jorgy...@gmail.com
on 29 Jun 2010 at 10:54
Not preferred. Just a different vector. If you just need a vector that works
with integers and you want to access arrays then converting from float is kind
of pointless.
Original comment by Siris...@gmail.com
on 1 Jul 2010 at 1:36
I can't imagine an integer vector all that usefull, tuples of integers yes but
thats what Tuple<T...> is for.
Original comment by Frassle
on 1 Jul 2010 at 2:48
I agree with Frassle. Virtually all operations done on vectors won't yield
useful results when using integers as the backing store for vectors. The dot
product would almost be useless though still semi-usable and many of the vector
operations would be like this. An integer vector would also give up x87 (and
possibly SSE) and use pure x86 code to do multiplies and, dare I say it,
divides. Integer multiplies, and especially integer divides, are generally
slower than x87 multiplies and divides (note x87 divide is reciprocal-multiply).
Unless someone else on the project wants this, I won't be implementing it. As a
workaround, use the regular vectors and convert to integers where necessary.
This may be a bit slower but if the coding is careful .net will generate the
FISTP instruction which would take the place of FSTP. This will also yield more
accuracy. You can also use Frassle's suggestion of the Tuple(T...).
Thank you for the suggestion though.
Original comment by Jorgy...@gmail.com
on 2 Jul 2010 at 11:58
Original issue reported on code.google.com by
Siris...@gmail.com
on 29 Jun 2010 at 3:18