Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Testing simple concurrent containers

, 25 Oct 2009 CPOL
This article illustrates simple approaches and test results when creating containers with concurrent flavor and running on a multi-core PC.
container_locks.zip
Container_locks
src
Testing_simple_concurrent_containers.pdf
VC9
container_locks.vcproj.val-PC.val.user
Debug
tbb_debug.dll
Debug64
tbb_debug.dll
Release
tbb.dll
Release64
tbb.dll
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
  
#pragma once 

#ifndef _WIN32_WINNT		// Allow use of features specific to Windows XP or later.                   
#define _WIN32_WINNT 0x0600 
#endif						

#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <crtdbg.h>
#include <assert.h>


//#define TEST_TBB_CONCURRENT_CONTAINER
//#define TEST_CS_TABLE_CONTAINER
//#define TEST_SPINLOCK_CONTAINER
#define TEST_POOLLOCK_CONTAINER

#define ELEMENT_SPINLOCK Spin_rwlock
//#define ELEMENT_SPINLOCK Spin_lock

#define LOCK_TYPE SlimRWLock
//#define LOCK_TYPE SHRW2

#define HAS_MAP
//#define HAS_HASH_MAP

#ifdef HAS_HASH_MAP
	#include <hash_map>
	#if _MSC_VER > 1500 // for VS2010 std::hash_map
		#define stdext std
	#endif
#elif defined HAS_MAP
	#include <map>
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Valery Grebnev
Software Developer
Canada Canada
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141216.1 | Last Updated 25 Oct 2009
Article Copyright 2009 by Valery Grebnev
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid