⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xamicablenum.h

📁 相亲数和亲和数的快速并行求解算法 intel 多线程优化大赛参赛作品
💻 H
字号:
/*/////////////////////////////////////////
// 版权所有(C)  2000-2008 邓辉           //
// Email:      denghui0815@hotmail.com  //
// 说明:       Intel线程优化大赛参赛作品//
/////////////////////////////////////////*/

#ifndef XLIFE_HEAD
#define XLIFE_HEAD

#include <mathimf.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <memory.h>
#include <tmmintrin.h> 
#include <string.h>
#include <omp.h>

#include "tbb/task_scheduler_init.h"
#include "tbb/blocked_range.h"
#include "tbb/parallel_for.h"
#include "tbb/tick_count.h" 
#include "tbb/scalable_allocator.h"
#include "tbb/concurrent_vector.h" 
#include "tbb/parallel_sort.h"

#include <map>
#include <vector>
#include <algorithm>

using namespace std;
using namespace tbb;

// 链接tbb
#ifdef XCODE_WIN
	// 链接tbb
	#ifdef _DEBUG
		#pragma comment(lib, "tbb_debug.lib")
		#pragma comment(lib, "tbbmalloc_debug.lib")
	#else
		#pragma comment(lib, "tbb.lib")
		#pragma comment(lib, "tbbmalloc.lib")
	#endif

	// 链接ipp
	#include <ipp.h>
	#pragma comment(lib, "ipps.lib")
	#define XMEMCOPY(Macro_Dst, Macro_Src, Macro_Size)	\
		ippsCopy_8u( (const Ipp8u*)(Macro_Src), (Ipp8u*)(Macro_Dst), (Macro_Size) );

	#define XMEMMOVE(Macro_Dst, Macro_Src, Macro_Size)	\
		ippsMove_8u( (const Ipp8u*)(Macro_Src), (Ipp8u*)(Macro_Dst), (Macro_Size) );
#else
	#define XMEMCOPY(Macro_Dst, Macro_Src, Macro_Size)	\
		memcpy( (Macro_Dst), (Macro_Src), (Macro_Size) );

	#define XMEMMOVE(Macro_Dst, Macro_Src, Macro_Size)	\
		memmove( (Macro_Dst), (Macro_Src), (Macro_Size) );
#endif

#pragma warning( disable : 1786)
#pragma warning( disable : 1684)

#ifndef FALSE
#define FALSE						0
#endif

#ifndef TRUE
#define TRUE						1
#endif

// 输出是否使用英语
// #define XUSE_ENGLISH

// 输出时间
#define XOUT_TIME					0
#define XOUT_TIME_ALL				0

typedef int							BOOL;

typedef unsigned char				uint8;
typedef unsigned int				uint32;
typedef unsigned __int64			uint64;

typedef uint8*						PUINT8;
typedef uint32*						PUINT32;

typedef const uint8*				PCUINT8;
typedef const uint32*				PCUINT32;

typedef uint8**						PPUINT8;

// 错误处理
void	Error(char *);
// 警告处理
void	Warning(char *);

#endif

⌨️ 快捷键说明

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