Click here to Skip to main content
15,898,824 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: BaseClass Interaction Problem Pin
toxcct26-Apr-05 0:40
toxcct26-Apr-05 0:40 
GeneralRe: BaseClass Interaction Problem Pin
classsystem1-May-05 5:29
sussclasssystem1-May-05 5:29 
GeneralRe: BaseClass Interaction Problem Pin
toxcct1-May-05 19:59
toxcct1-May-05 19:59 
GeneralRe: BaseClass Interaction Problem Pin
classsystem2-May-05 15:56
sussclasssystem2-May-05 15:56 
GeneralRadioButtons and Groups Pin
Yaron Abershitz19-Apr-05 2:45
Yaron Abershitz19-Apr-05 2:45 
Generalsearching a map Pin
{cellardoor}16-Apr-05 13:03
{cellardoor}16-Apr-05 13:03 
GeneralRe: searching a map Pin
Christian Graus17-Apr-05 17:43
protectorChristian Graus17-Apr-05 17:43 
General_MM_SHUFFLE question Pin
swati2415-Apr-05 23:09
swati2415-Apr-05 23:09 
Hi,
Note: I understand that this forum is generally for Managed C++ question, but since there was no forum devoted to assembly I am posting this thread here, and hoping someone will answer.


This question is regarding the SSE macro function for shuffle operations. I don't understand it fully.

MSDN says that _MM_SHUFFLE(z,y,x,w) expands to :

(z << 6) | (y <<4) | (x << 2) | w

This macro is used in conjunction with SHUFPS or MMX instrinsic function _mm_shuffle_ps(m1, m2, int mask), where mask is replaced by the macro that acts on m1 and m2. m1 and m2 are 128 bit registers.

MSDN has the following example:

Let m1 be a : b : c : d
Let m2 be e : f : g : h

where each of the a,b,c,d,e,f,g,h are 32 bit single precision floating point values. a is the highest double word and d is the lowest double word. Similarly, e is the highest double word and h is the lowest double word.

Now, when the following function is performed on the m1 and m2 MMX registers:

_mm_shuffle_ps(m1,m2,_MM_SHUFFLE(1,0,3,2))

we get

m3 g : h : a : b

-------------
Working

I tried to work this example myself but couldn't arrive at the right answer.

1 << 6 gives 0100 0000
0 << 4 gives 0000 0000
3 << 2 gives 0000 1100
2 gives 0000 0010

Bitwise OR operation gives 0100 1110

If we apply this mask on m1 and m2 how do we end up with m3? What am I doing wrong here. Any insights will be most helpful.

Thank you
Swati

GeneralClear the screen Pin
Larsson14-Apr-05 21:10
Larsson14-Apr-05 21:10 
GeneralRe: Clear the screen Pin
IdUnknown15-Apr-05 15:23
IdUnknown15-Apr-05 15:23 
General2005 Beta-1 C++/CLI Pin
TFB14-Apr-05 7:30
TFB14-Apr-05 7:30 
GeneralRe: 2005 Beta-1 C++/CLI Pin
Sheng Jiang 蒋晟20-Apr-05 12:33
Sheng Jiang 蒋晟20-Apr-05 12:33 
GeneralRe: 2005 Beta-1 C++/CLI Pin
TFB21-Apr-05 6:58
TFB21-Apr-05 6:58 
GeneralMicrosoft Word - Read Only and DisplayAlerts Ignored (important) Pin
User 172888413-Apr-05 23:43
User 172888413-Apr-05 23:43 
GeneralRe: Microsoft Word - Read Only and DisplayAlerts Ignored (important) Pin
ursus zeta14-Apr-05 10:04
ursus zeta14-Apr-05 10:04 
GeneralAccess Denied Reading Registry Pin
rexpiper13-Apr-05 7:25
rexpiper13-Apr-05 7:25 
GeneralRe: Access Denied Reading Registry Pin
rexpiper13-Apr-05 7:37
rexpiper13-Apr-05 7:37 
Generalout of paper error Pin
thamate12-Apr-05 22:28
thamate12-Apr-05 22:28 
Generalstoring diffgram element values in database tables Pin
gauravmitra12-Apr-05 0:59
gauravmitra12-Apr-05 0:59 
GeneralConvert char to int Pin
Larsson10-Apr-05 8:21
Larsson10-Apr-05 8:21 
GeneralRe: Convert char to int Pin
Christian Graus10-Apr-05 11:53
protectorChristian Graus10-Apr-05 11:53 
GeneralRe: Convert char to int Pin
ddmcr11-Apr-05 9:07
ddmcr11-Apr-05 9:07 
GeneralRe: Convert char to int Pin
Larsson12-Apr-05 5:30
Larsson12-Apr-05 5:30 
GeneralRe: Convert char to int Pin
Christian Graus12-Apr-05 15:10
protectorChristian Graus12-Apr-05 15:10 
GeneralVC++.NET2003 - Error C2146 Compiler Conformance Pin
JSadleir10-Apr-05 0:39
JSadleir10-Apr-05 0:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.