¡¾C/C++Ïà¹Ø֪ʶ¡¿ATOMÓÅ»¯Ö®GCCƪ
×÷Õߣº Yanqing Wang (Intel)
ÔÚATOM³ÌÐòÓÅ»¯ÀûÆ÷ÖУ¬±ÊÕß×ÅÖؽ²ÊöÁËÈçºÎʹÓÃIntel Compiler¶ÔATOMÓ¦ÓóÌÐòµÄÓÅ»¯£¬ºÜ¶àÍøÓѶ¼±È½Ï¸ÐÐËȤ²¢ÏëÖªµÀÔÚGCC±àÒëÆ÷ÏÂÈçºÎÓÅ»¯ATOM¡£½è´Ë£¬±¾ÎĽ«ÖصãÓÚÌÖÂÛÈçºÎʹATOMÓ¦ÓóÌÐòÔÚGCC±àÒëÆ÷ÏÂÓÅ»¯¡£
ϸÐĵÄÍøÓÑ¿ÉÄÜ·¢ÏÖGCC4.4.2ÊÖ²áûÓн²ÊöÈçºÎÔÚATOMƽ̨ÓÅ»¯£¬ËùÒÔҪͨ¹ýGCC¶ÔATOMƽ̨ÓÅ»¯£¬Ò»¶¨Òª´Óƽ̨µÄÌØÐÔ³ö·¢¡£ÎªÁ˱ãÓÚÀí½â£¬ÏȻعËÒ»ÏÂATOMƽ̨µÄÌص㣺
1. ATOMƽ̨µÄÖ¸ÁîÊÇ˳ÐòÖ´Ðеġ£
2. ATOMƽ̨֧³Ö³¬Ï̼߳¼Êõ£¬Ò²¾ÍÊÇÎÒÃÇͨ³£Ëù˵µÄ1C:2T¡£
3. ATOMƽ̨֧³ÖSSE3Ö¸Á¡£
Èç¹ûÎÒÃǵÄGCC±àÒëÑ¡ÏîÄܹ»Âú×ãÕâ»ù±¾µÄÈý´óµã£¬ÄÇôÏàÓ¦µÄÓ¦ÓóÌÐòÐÔÄÜÒ²½«»áÓкܴóÌáÉý¡£
ÌÖÂÛ1£ºATOMÓ¦ÓóÌÐòÔÚATOM¼ÆËã»úÉϱàÒë¡£
¶ÔÓÚ±¾»ú±àÒë¶øÑÔ£¬ÕâÖÖ¿ª·¢»·¾³Ïà¶ÔÊDZȽÏÈÝÒ×ÓÅ»¯µÄ¡£ÎÒÃÇÖ»Òª¹ØÐÄÁ½¸ö»ù±¾µã£º
1. SSE3Ö¸Á¡£
2. ƽ̨»·¾³£¨32λ»¹ÊÇ64λ£¿£©¡£
a) ¶ÔÓÚ32λ²Ù×÷ϵͳ£¬ATOMÓ¦ÓóÌÐòµÄÓÅ»¯ÉèÖÃΪ£º
-mtune=native -m32 -mmmx -msse -msse2 -msse3 -mssse3 -mfpmath=sse -O3
˵Ã÷£º
-mtune ±íʾCPUÀàÐÍ£¬ÒòΪËüÊDZ¾µØ±àÒ룬ËùÒÔÑ¡Ôñnative±àÒëÑ¡Ïî¡£
-m32 ±íʾƽ̨ÊÇ32λOS¡£
-mmmx -msse -msse2 -msse3 -mssse3 ±íʾËüÖ§³ÖMMXºÍSSE1~3µÄÈ«²¿Ö¸Á±àÒëÆ÷¸ü¼Ó´úÂëÇé¿öÓÅ»¯¡£
-mfpmath=sse ±íʾʹÓÃSSEÖ¸Áµã¿â
-O3 ±íʾÊǵÚ3¼¶±ðÓÅ»¯
b) ¶ÔÓÚ64λ²Ù×÷ϵͳ£¬ATOMÓ¦ÓóÌÐòµÄÓÅ»¯ÉèÖÃΪ£º
-mtune=native -m64 -mmmx -msse -msse2 -msse3 -mssse3 -mfpmath=sse -O3
ºÍ32λϵͳµÄΨһ²î±ðÊÇ£ºÊ¹ÓÃ-m64Ìæ´úÁË-m32£¬Õâ¸ö±È½ÏÈÝÒ×Àí½â£¬²»ÔÙ÷¡ÊýÁË¡£
ÌÖÂÛ2£ºATOMÓ¦ÓóÌÐòÔÚ·ÇATOM¼ÆËã»úÉϱàÒë¡£
Ïà±ÈÓëÌÖÂÛ1£¬ÕâÀïµÄÖ÷Òª²î±ðÊDZàÒëµÄ¼ÆËãÆ÷²»ÊÇATOMƽ̨£¬ÄÇôĬÈϵı¾µØÓÅ»¯±ØÐëÊÖ¹¤ÉèÖᣰ´ÕÕ32λºÍ64λµÄÇø±ð£¬ÏÂÎÄ»¹ÊÇ·Ö±ðÕ¹¿ª¡£
a) ¶ÔÓÚ32λ²Ù×÷ϵͳ£¬ATOMÓ¦ÓóÌÐòµÄÓÅ»¯ÉèÖÃΪ£º
-mtune=pentium -m32 -mmmx -msse -msse2 -msse3 -mssse3 -mfpmath=sse -O3
˵Ã÷
-mtuneÉèÖÃΪpentium´¦ÀíÆ÷£¬Ö÷Òª¿¼ÂÇËüµÄÖ¸ÁîÊÇ˳ÐòÖ´ÐС£Õâ¸öºÍATOMµÄÖ´ÐÐ˳ÐòÊ®·ÖÎǺϣ¬¶ÔÓÚ³ÌÐòµÄЧÂʺͽÚÄÜ·½Ã潫Óкܴó°ïÖú¡£
-m32 ±íʾƽ̨ÊÇ32λOS¡£
-mmmx -msse -msse2 -msse3 -mssse3 ±íʾËüÖ§³ÖMMXºÍSSE1~3µÄÈ«²¿Ö¸Á±àÒëÆ÷¸ü¼Ó´úÂëÇé¿öÓÅ»¯¡£
-mfpmath=sse ±íʾʹÓÃSSEÖ¸Áµã¿â
-O3 ±íʾÊǵÚ3¼¶±ðÓÅ»¯
b) ¶ÔÓÚ64λ²Ù×÷ϵͳ£¬ATOMÓ¦ÓóÌÐòµÄÓÅ»¯ÉèÖÃΪ£º
-mtune=pentium -m64 -mmmx -msse -
Ïà¹ØÎĵµ£º
½ñÌì×öÁËACM1010
´úÂ붼¶Ô¾ÍÊÇÔõôҲ²»ÄÜAC¡£ÄǸöÓôÃÆ°¡£¡Ò»ÍíÉ϶¼ÏëÄǸöÁË¡£
±¾À´ÓÐÁ©×éÊäÈ룬¿ÉÊÇÊä³öµÄ½á¹û¾ÍÒ»×é¡£×Ðϸ¿´ÊäÈ룬¾¹È»×Ô¶¯»»ÐÐÁË£¬Ææ¹Ö£¬ÕâÊÇÕ¦»ØÊ¡£
²Â²â¿ÉÄÜÊǶÁÈëÁË»»Ðзû¡£Í¬ÑùµÄÎÊÌâÕâC++ÖоÍûÓа¡!
×îºóͨ¹ý¼Ógetchar();ACͨ¹ý¡£ ......
#include "iostream.h"
#include "stdio.h"
#import "C:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")
int main(int argc, char* argv[])
{
::CoInitialize(NULL);
_ConnectionPtr m_pConnection;
m_pConnection.CreateInstance("ADODB.Connection");
tr ......
#include <windows.h>
#include <stdio.h>
void FindFileInDir(char* rootDir, char* strRet)
{
char fname[256];
ZeroMemory(fname,256);
WIN32_FIND_DATA fd;
ZeroMemory(&fd, sizeof(WIN32_FIND_DATA));
HANDLE hSearch;
char filePathName[256];
char tmpPath[256];
ZeroMemory(filePathNa ......
.APS£º´æ·Å¶þ½øÖÆ×ÊÔ´µÄÖмäÎļþ£¬VC°Ñµ±Ç°×ÊÔ´Îļþת»»³É¶þ½øÖƸñʽ£¬²¢´æ·ÅÔÚAPSÎļþÖУ¬ÒÔ¼Ó¿ì×ÊÔ´×°ÔØËٶȡ£×ÊÔ´¸¨ÖúÎļþ¡£
.BMP£ºÎ»Í¼×ÊÔ´Îļþ¡£
.BSC£ºä¯ÀÀÐÅÏ¢Îļþ£¬ÓÉä¯ÀÀÐÅϢά»¤¹¤¾ß£¨BSCMAKE£©´ÓÔʼä¯ÀÀÐÅÏ¢Îļþ£¨.SBR£©ÖÐÉú³É£¬BSCÎļþ¿ÉÒÔÓÃÀ´ÔÚÔ´´úÂë±à¼´°¿ÚÖнøÐпìËÙ¶¨Î»¡£ÓÃÓÚä¯ÀÀÏîÄ¿ÐÅÏ¢µÄ£¬Èç¹ûÓ ......