C ³ÌÐòµÄÍⲿ±äÁ¿Ó뺯Êý
±¾ÎÄÌÖÂÛÁËC³ÌÐòµÄÍⲿ±äÁ¿ºÍº¯ÊýµÄһЩÐÔÖÊ£¬½áºÏʵ¼ÊµÄ±à³Ì£¬¸ø³öÁËʹÓÃÍⲿ±äÁ¿ºÍº¯ÊýµÄ·½·¨¡£
¹Ø¼ü×Ö£ºC³ÌÐò£¬Íⲿ±äÁ¿£¬º¯Êý
¡¡¡¡C³ÌÐòÓÉÒ»×é¶ÔÏó×é³É£¬ÕâЩ¶ÔÏó°üÀ¨³ÌÐòÖÐËùʹÓõıäÁ¿ºÍʵÏÖÌض¨¹¦Äܵĺ¯Êý¡£±äÁ¿¿ÉÒÔ·ÖΪº¯ÊýÄÚ²¿¶¨Ò塢ʹÓõıäÁ¿ºÍº¯ÊýÍⲿ¶¨ÒåµÄ±äÁ¿£¬Í¨³£Çé¿öÏ£¬°Ñº¯ÊýÄÚ²¿¶¨Ò塢ʹÓõıäÁ¿³ÆΪÄÚ²¿±äÁ¿»ò¾Ö²¿±äÁ¿£¬¶ø½«ÔÚº¯ÊýÍⲿ¶¨ÒåµÄ¡¢¹©Ðí¶àº¯ÊýËùʹÓõıäÁ¿³ÆΪÍⲿ±äÁ¿£¬Ò»°ãÇé¿öÏ£¬Ò²¿ÉÒÔ³ÆΪȫ¾Ö±äÁ¿¡£
¡¡¡¡ÓÉÓÚCÓïÑÔ²»ÔÊÐíÔÚÒ»¸öº¯ÊýÖж¨ÒåÆäËûº¯Êý£¬Òò´Ëº¯Êý±¾ÉíÊÇÍⲿµÄ¡£Ò»°ãÇé¿öÏ£¬Ò²¿ÉÒÔ˵º¯ÊýÊÇÈ«¾Öº¯Êý¡£
ÔÚȱʡÇé¿öÏ£¬Íⲿ±äÁ¿Ó뺯Êý¾ßÓÐÈçÏÂÐÔÖÊ£ºËùÓÐͨ¹ýÃû×Ö¶ÔÍⲿ±äÁ¿Ó뺯ÊýµÄÒýÓ㨼´Ê¹ÕâÖÖÒýÓÃÀ´×Ô¶ÀÁ¢±àÒëµÄº¯Êý£©¶¼ÊÇÒýÓõÄͬһ¶ÔÏ󣨱ê×¼ÖаÑÕâÒ»ÐÔÖʳÆΪÍⲿÁ¬½Ó£©¡£
¡¡¡¡ÓÉÓÚÍⲿ±äÁ¿ÊÇ¿ÉÒÔÈ«¾Ö·ÃÎʵģ¬Õâ¾ÍΪÔÚº¯ÊýÖ®¼ä½»»»Êý¾ÝÌṩÁËÒ»ÖÖ¿ÉÒÔÌæ´úº¯Êý±äÔªÓû·µ»ØÖµµÄ·½·¨¡£Èκκ¯Êý¶¼¿ÉÒÔÓÃÃû×ÖÀ´·ÃÎÊÍⲿ±äÁ¿£¬Ö»ÒªÕâ¸öÃû×ÖÒÑÔÚij¸öµØ·½×öÁË˵Ã÷»ò¶¨Òå¡£
Èç¹ûÒªÔÚº¯ÊýÖ®¼ä¹²Ïí´óÁ¿µÄ±äÁ¿£¬ÄÇôʹÓÃÍⲿ±äÁ¿Òª±ÈʹÓÃÒ»¸ö³¤³¤µÄ±äÔª±í¸ü·½±ã¡¢ÓÐЧ¡£È»¶ø£¬Ò²¿ÉÄܵ¼Ö³ÌÐòÔÚ¸÷¸öº¯ÊýÖ®¼ä²úÉúÌ«¶àµÄÊý¾ÝÁªÏµ¡£
¡¡¡¡Íⲿ±äÁ¿µÄÓÃ;»¹±íÏÖÔÚËüÃDZÈÄÚ²¿±äÁ¿Óиü´óµÄ×÷ÓÃÓòºÍ¸ü³¤µÄÉú´æÆÚ¡£ÄÚ²¿×Ô¶¯±äÁ¿Ö»ÄÜÔÚº¯ÊýÄÚ²¿Ê¹Ó㬵±ÆäËùÔÚº¯Êý±»µ÷ÓÃʱ¿ªÊ¼´æÔÚ£¬µ±º¯ÊýÍ˳öʱÏûʧ¡£¶øÍⲿ±äÁ¿ÊÇÓÀ¾Ã´æÔڵģ¬ËûÃǵÄÖµÔÚ´ÓÒ»´Îº¯Êýµ÷Óõ½ÏÂÒ»´Îº¯Êýµ÷ÓÃÖ®¼ä±£³Ö²»±ä¡£Òò´Ë£¬Èç¹ûÁ½¸öº¯Êý±ØÐë¹²ÏíijЩÊý¾Ý£¬¶øÕâÁ½¸öº¯Êý¶¼»¥²»µ÷ÓöԷ½£¬ÄÇô×îΪ·½±ãµÄÊÇ£¬°ÑÕâЩ¹²ÏíÊý¾Ý×÷ΪÍⲿ±äÁ¿£¬¶ø²»ÊÇ×÷Ϊ±äÔªÀ´´«µÝ¡£
1¡¢Íⲿ±äÁ¿µÄ¶¨ÒåºÍʹÓÃ
¡¡¡¡¸ù¾ÝCÓïÑÔ±ê×¼£¬ÔÚ³ÌÐòµÄËùÓÐÔ´ÎļþÖУ¬Íⲿ±äÁ¿Ö»Äܱ»¶¨ÒåÒ»´Î£¬·ñÔò»áµ¼ÖÂÖظ´¶¨ÒåµÄ±àÒë´íÎó¡£
1.1 Íⲿ±äÁ¿µÄ¶¨ÒåÓëÉùÃ÷
¡¡¡¡±äÁ¿ÉùÃ÷ÓÃÓÚͨ±¨±äÁ¿µÄÐÔÖÊ£¨Ö÷ÒªÊDZäÁ¿µÄÀàÐÍ£©£¬¶ø±äÁ¿¶¨ÒåÔò³ý´ËÖ®Í⻹ÒýÆð´æ´¢·ÖÅä¡£Èç¹ûÔÚº¯ÊýµÄÍⲿ°üº¬ÈçÏÂ˵Ã÷£º
int VarDesc;
char Array[MAXVAL];
ÄÇôÕâÁ½¸ö˵Ã÷¶¨ÒåÁËÍⲿ±äÁ¿VarDescÓëArray£¬²¢ÎªÖ®·ÖÅä´æ´¢µ¥Ôª£¬Í¬Ê±Ò²ÓÃ×÷¹©Ô´ÎļþÆäÓಿ·ÖʹÓõÄ˵Ã÷¡£ÁíÒ»·½Ã棬ÈçÏÂÁ½ÐУº
extern int VarDesc;
extern char Array[];
¡¡¡¡ÎªÔ´ÎļþÊ£Óಿ·ÖÉùÃ÷ÁËVarDescÊÇÒ»¸öint ÀàÐ͵ÄÍⲿ±äÁ¿£¬ArrayÊÇÒ»¸öcharÊý×éÀàÐ͵ÄÍⲿ±äÁ¿£¨Êý×é´óСÔÚÆäËûµØ·½È·¶¨£©£¬µ«ÕâÁ½¸öÉùÃ÷²¢Ã»Óн¨Á¢±äÁ¿»òΪËüÃÇ
Ïà¹ØÎĵµ£º
http://www.edn.com/article/457428-Can_C_beat_RTL_.php
With the appearance of higher speeds and more DSP macrocells in low-cost FPGAs, more and more design teams are seeing the configurable chips not as glue but as a way to accelerate the inner loops of numerical algorithms, either in conjun ......
À´×Ôbccn CÓïÑÔÂÛ̳
Ê×ÏÈÉùÃ÷Ò»µã£¬±¾ÎÄΪתÌù¡£
dz̸CÖеÄmallocºÍfree
×÷Õߣºlj_860603 ÔĶÁÈ˴Σº43013 ÎÄÕÂÀ´Ô´£º±¾Õ¾Ô´´ ·¢²¼Ê±¼ä£º2006-8-5 ÍøÓÑÆÀÂÛ(32)Ìõ
ÔÌû¼°ÌÖÂÛ£ºhttp://bbs.bccn.net/thread-82212-1-1.html
ÔÚCÓïÑÔµÄѧϰÖУ¬¶ÔÄÚ ......
ͻ񻣼
±¾ÎÄ´Ó½éÉÜ»ù´¡¸ÅÄîÈëÊÖ£¬Ì½ÌÖÁËÔÚC/C++ÖжÔÈÕÆÚºÍʱ¼ä²Ù×÷ËùÓõ½µÄÊý¾Ý½á¹¹ºÍº¯Êý£¬²¢¶Ô¼Æʱ¡¢Ê±¼äµÄ»ñÈ¡¡¢Ê±¼äµÄ¼ÆËãºÍÏÔʾ¸ñʽµÈ·½Ãæ½øÐÐÁ˲ûÊö¡£±¾ÎÄ»¹Í¨¹ý´óÁ¿µÄʵÀýÏòÄãչʾÁËtime.hÍ·ÎļþÖÐÉùÃ÷µÄ¸÷ÖÖº¯ÊýºÍÊý¾Ý½á¹¹µÄÏêϸʹÓ÷½·¨¡£
¹Ø¼ü×Ö£ºUTC£¨ÊÀ½ç±ê׼ʱ¼ä£©£¬Calendar Time£¨ÈÕÀúʱ¼ä£©£¬epoch£¨Ê±¼ä ......
server:
import sys
import socket
host = sys.argv[1]
port = int(sys.argv[2])
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((host,port))
while 1:
try:
&n ......
Îļþº¯Êý´ò¿ªÎļþº¯Êý
[º¯ÊýÍ·]
FILE *fopen£¨char *filename, Char *mode£©
[²ÎÊý]
filename ×Ö·ûÐÍÖ¸Õ룬ָÏòµÄ×Ö·û´®ÊÇÒª´ò¿ªµÄ´ÅÅÌÎļþÃû£»mode ×Ö·ûÐÍÖ¸Õ룬ָÏòµÄ×Ö·û´®ÊÇÎļþʹÓ÷½Ê½¡£ÕâÁ½¸ö²ÎÊý¶ÔÓ¦µÄʵ²Î¿ÉÒÔÊÇ×Ö·ûÖг£Á¿£¬Ò²¿ÉÒÔÊDz¹·ûÊý×éÊ×µØÖ·£¬»òÕßÊÇÖ¸Ïò×Ö·û´®µÄÖ¸Õë±äÁ¿¡£
ÎļþʹÓ÷½Ê½¿ ......