Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Preparations for parallel search

Author: Tord Romstad

Date: 07:19:13 07/09/04

Go up one level in this thread


On July 09, 2004 at 10:09:19, Andrew Dados wrote:

>While ANSI-C don't define thread specific variables, some compilers will let you
>do that... eg in MSVC you can:
> __declspec( thread ) int my_threadvar =1;
>
>You may try some asm trickery and declare threaded variables on the stack. Since
>each thread has its own stack it works without a pointer overhead, but it again
>has to be a compiler-specific solution

Thanks for the suggestions, but assembly language or compiler-specific solutions
are unacceptable to me.  To me, the whole point of using C is to make my engine
easily portable over a wide range of compilers and architectures.

Tord



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.