473,396 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

need help with mmx (vc++)

I have a loop that I think can benefit from MMX instructions, but not
sure how to do it. I read through the manuals but nothing registers
(no pun intended).

Basically I loop through a graphics buffer (16 bit) with a right shift
and an AND operation. I've basically been loading in 32 bits and
doing two RGB's at a time, but I'm sure MMX must have a faster way.
Here is an example psuedo:

for ()
{
int data;
...
data = (data >> 1) & 0xF7F7F7F7; // 1 and 0xF7F7F7F7 are
constants
...
}

Can someone help translate this to an inline (MSVC) MMX version?
I would be most appreciative!
Jul 22 '05 #1
1 1309
"Soulblazer" <so**********@yahoo.com> wrote...
I have a loop that I think can benefit from MMX instructions, but not
sure how to do it. I read through the manuals but nothing registers
(no pun intended).

Basically I loop through a graphics buffer (16 bit) with a right shift
and an AND operation. I've basically been loading in 32 bits and
doing two RGB's at a time, but I'm sure MMX must have a faster way.
Here is an example psuedo:

for ()
{
int data;
...
data = (data >> 1) & 0xF7F7F7F7; // 1 and 0xF7F7F7F7 are
constants
...
}

Can someone help translate this to an inline (MSVC) MMX version?


There is no 'MMX' in C++ language. Perhaps you need help in assembly
language, then this is not the right place to ask for it.

Victor
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: soni29 | last post by:
hi, i need some help with a query, also to find out if this is even possible with sql. currently i have a table with the following data: CustomerNumber CustomerBranch 123 NULL 123 1...
0
by: Ajit | last post by:
Hi, I am trying to create an ActiveX control (mediaplayer9.0 to be more specific) over document/view architecture. The application is created on VC++6.0 and its working fine. But as soon as I...
2
by: Anonymous | last post by:
I'm trying to port code from VC.net to VC.net 2003. Here's a typical piece of code that's often used: template<class T> class PseudoContainer { typedef T::iterator iterator; // this line will...
28
by: Jed | last post by:
Hello to all! I have a couple of projects I intend starting on, and was wondering if someone here could make a suggestion for a good compiler and development environment. My goals are as...
11
by: Tatu Portin | last post by:
Have this kind of struct: typedef struct { char **user_comments; /* ... */ } vorbis_comment; /* prototype */ char * read_vorbis_string ( FILE *sc);
8
by: Sai Kit Tong | last post by:
In the article, the description for "Modiy DLL That Contains Consumers That Use Managed Code and DLL Exports or Managed Entry Points" suggests the creation of the class ManagedWrapper. If I...
2
by: Edward Diener | last post by:
In C++ an overridden virtual function in a derived class must have the exact same signature of the function which is overridden in the base class, except for the return type which may return a...
3
by: Marty | last post by:
Hi, I have this DLL made with VB.NET made as a Class Library project. I know this is managed code. I have my other made with VC++.NET, unmanaged code. The point is that I want to use...
5
by: ashish.sadanandan | last post by:
Hi, Can someone please tell me where I can find those two libraries for Visual C++ 2005 Express Edition compiler? Thanks in advance, Ashish.
0
by: rsadalarasu | last post by:
Hi Everybody, I m very new to Db2. I tried compiling a stored procedure in DB2 Development Center. Build failed with error message like nmake command is unavailable..(something like that). I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.