gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] Crash report for OS X Segmentation fault


From: Gunnar Farneback
Subject: Re: [gnugo-devel] Crash report for OS X Segmentation fault
Date: Wed, 09 Jan 2002 17:36:35 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Dave wrote:
> Incidentally, just noticed that matchpat is still 2d. There's
> a small speedup available by mapping to 1d as part of the
> transorm to rotate the pattern.
> [...]
> and so we just tabulate these 8 vectors, one for each rotation.
> And that halves the work required to perform each rotation.

Yes, but there's a complication at line 500 of matchpat.c:

          TRANSFORM(pattern->mini, pattern->minj, &mi, &mj, ll);
          TRANSFORM(pattern->maxi, pattern->maxj, &xi, &xj, ll);
          [...]
          /* now do the range-check */
          if (!ON_BOARD2(m+mi, n+mj) || !ON_BOARD2(m+xi, n+xj))
            continue;  /* out of range */

We can't do the range-check in 1D since we have lost too much
information. Still I guess it would make sence to split the TRANSFORM
macro into a TRANSFORM1 and TRANSFORM2 producing a 1D or 2D result,
and use TRANSFORM1 wherever we don't need the 2D coordinates.

> ( I don't know if the pattern matcher is a performance problem
>   at the moment
> )

Yes, it is.

/Gunnar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]