Computer Chess Club Archives


Search

Terms

Messages

Subject: type qualifiers

Author: Anthony Cozzie

Date: 07:56:49 09/16/03


I am in the process of restructuring Zappa's datatypes, moving from

Search(varlist) {
  local_decls;
  .....

to Search(RecursionBlock *rb) {
  ....

where a RecursionBlock holds all the information that used to be local.

I think there are 3 advantages to this:

1. Converting to an iterative search would be much easier.
2. All data is accessible at any time/place in the search.
3. Much less parameter passing is going on.

However, it also makes the job of the compiler much harder, because it doesn't
know when it can use registers, so I'm looking into keywords to help it out a
bit. Currently I have two datastructures:

zgame: counters, position, search parameters, and
zrb: recursion block, contains alpha, beta, etc.

So search (and essentially all functions in Zappa, eventually) looks like
Search(zgame *g, zrb *rb);

What I *think* I want to do is this:

Search( zgame * const restrict g, zrb * const restrict rb)

Which hopefully tells the compiler that rb and g point to distinct objects, and
that the objects they point to will not change during the run of the search.  Is
this right?



This page took 0.01 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.