template.h

来自「vc写的SSE2优化离散余弦变换」· C头文件 代码 · 共 55 行

H
55
字号
//***************************************************************************/
//*
//*                  Copyright (c) 1998-99 Intel Corporation.
//*                         All rights reserved.
//*
//*
//***************************************************************************/
//
// myheader.h

extern "C" {
	#include "Pmx.h"
}


//#include "pmx.h"
	

// MACROS

#define CPUID	__asm _emit 0x0f __asm _emit 0xa2
#define RDTSC	__asm _emit 0x0f __asm _emit 0x31
#define RDPMC	__asm _emit 0x0f __asm _emit 0x33


// MSR register address

#define	PERFEVNTSEL0		0X00000186
#define	PERFEVNTSEL1		0X00000187
#define	PERFCNT0			0X000000c1
#define	PERFCNT1			0X000000c2
#define TSC					0x00000010

// Performance monitoring counters event number (these are only I am interested in
// the list is available on appendix b, of P Pro developer's manual, Vol. 3)

										// mask	
#define INST_RETIRED		0XC0		//  00  number of instructions retired
#define UOPS_RETIRED		0Xc2		//  00  number of UOPs retired
#define INST_DECODER		0XC4		//  00  number of instructions decoded
#define HW_INT_RX			0xc8		//  00  number of HW interrupts received
#define CPU_CLK_UNHALTED	0x79		//  00  number of cycles during which processor is not halted
#define DATA_MEM_REFS		0x43
#define L2_ADS				0x21
#define BUS_REQ_OUTSTANDING 0x60
// Since PMX32 can be used on MP system the following def. may be applicable
// for some performance monitoring.
// Processor information

#define MASK_CPU_A_ONLY		0X1		//MASK FOR PROCESSOR 0
#define MASK_CPU_B_ONLY		0X2		//MASK FOR PROCESSOR 1
#define MASK_CPU_C_ONLY		0X4		//MASK FOR PROCESSOR 2
#define MASK_CPU_D_ONLY		0X8		//MASK FOR PROCESSOR 3
#define MASK_CPU_ALL		0Xf		//MASK FOR ALL PROCESSOR

⌨️ 快捷键说明

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