Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: BOB - question about vectorization

Author: Robert Hyatt

Date: 15:17:22 11/19/00

Go up one level in this thread


On November 19, 2000 at 17:12:55, Olaf Jenkner wrote:

>Can you give us an example how vectorization of a chess algorithm
>works? I have no idea how this could be.
>
>Thanks


Several things.

1.  For attack detection, I use an algorithm that loads a set of masks
at one time, then I can AND/OR the masks in parallel using a vector, to
see if any possible piece is attacking the square in question.

2.  Mobility evaluation:  I created a complex 8x8 array with some sort
of "estimate" value for each square (how important is it to attack this
square in this position?"  I then used a cute vector merge operation to
extract just those values that went with squares that a particular piece
was directly attacking...

The idea is to think in "sets" of squares, "sets" of pieces, etc.  then
do the same operation on the set in parallel using the vector hardware...

It took several years to find ways to vectorize many of the time-intensive
parts of the program...

IE in the usual "multiple-hash-probe" approach, this can be done for free
on a Cray, since it is trivial to set up a stride-N vector load operation
to fetch all N entries in parallel.



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.