cpu.ini

来自「代码优化,有效使用内存,透视优化技术,对比优化方法,如果你在追求代码效率的最大化」· INI 代码 · 共 52 行

INI
52
字号
// THIS FILE CONTAINS IMPORTANT CHARACTERISTICS OF YOUR PROCESSOR
#define _PII	0x2
#define _PIII	0x3
#define _P4		0x4
#define _Athlon	0x015

#ifndef _CPU
	#define _CPU _PIII
#endif


#if (_CPU==_P4)
	#define CPU_NAME		"P4"
	#define L1_CACHE_SIZE		8*K
	#define L2_CACHE_SIZE		256*K
	#define L1_CACHE_LINE_SIZE	64
	#define L1_PREFETCH_SIZE	128
	#define L2_PREFETCH_SIZE	128
#endif



#if (_CPU==_PIII)
	#define CPU_NAME		"P-III"
	#define L1_CACHE_SIZE		16*K
	#define L2_CACHE_SIZE		256*K
	#define L1_CACHE_LINE_SIZE	32
	#define L2_CACHE_LINE_SIZE	32
	#define L1_PREFETCH_SIZE	32
	#define L2_PREFETCH_SIZE	32
	#define L2_BUS_WIDE			256
#endif

#if (_CPU==_PII)
	#define CPU_NAME		"P-II"
	#define L1_CACHE_SIZE		16*K
	#define L2_CACHE_SIZE		128*K
	#define L1_CACHE_LINE_SIZE	32
#endif

#if (_CPU==_Athlon)
	#define CPU_NAME		"AMD-Athlon"
	#define L1_CACHE_SIZE		64*K
	#define L2_CACHE_SIZE		256*K
	#define L1_CACHE_LINE_SIZE	64
	#define L2_CACHE_LINE_SIZE	64
	#define _NORDTSC 
#endif

// CPU LEVEL

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?