Closed dicepd closed 6 years ago
This is how I have written the test so you get what I think you want.
abf1.Create(1,2,3,4);
abf3 := abf1.Shuffle(0,0,0,0); //|X|X|X|X|
AssertEquals('Shuffle:Sub1 X failed ', 1, abf3.X);
AssertEquals('Shuffle:Sub2 Y failed ', 1, abf3.Y);
AssertEquals('Shuffle:Sub3 Z failed ', 1, abf3.Z);
AssertEquals('Shuffle:Sub4 W failed ', 1, abf3.W);
abf3 := abf1.Shuffle(0,0,3,3); //|X|X|W|W|
AssertEquals('Shuffle:Sub1 X failed ', 1, abf3.X);
AssertEquals('Shuffle:Sub2 Y failed ', 1, abf3.Y);
AssertEquals('Shuffle:Sub3 Z failed ', 4, abf3.Z);
AssertEquals('Shuffle:Sub4 W failed ', 4, abf3.W);
abf3 := abf1.Shuffle(1,1,1,3); //|Y|Y|Y|W|
AssertEquals('Shuffle:Sub1 X failed ', 2, abf3.X);
AssertEquals('Shuffle:Sub2 Y failed ', 2, abf3.Y);
AssertEquals('Shuffle:Sub3 Z failed ', 2, abf3.Z);
AssertEquals('Shuffle:Sub4 W failed ', 4, abf3.W);
am presuming you want to replicate the SSE shufxx
Yes, i see i'v don't take care, i wrote the inverse
Jerome,
I am thinking about tests for this but currently the pascal code seems to make no sense. I am presuming you want to replicate the SSE shufxx commands. if so I think the pascal should be
in order that you can select x,y,z,w value into the X part of result. As it is currently written I could set xyzw all to 1 in the parameters and it would try to set self xyzw all to result.x.