depth first search

“We can only see a short distance ahead, but we can see plenty there that needs to be done."

Tag: programming

Weird Compiler Error of the Day

I got the following error when trying to compile the latest svn version of opencv: error: invalid controlling predicate A quick Google search yielded this gem of a compiler bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38650. The offending loop: #ifdef _OPENMP #pragma omp for schedule(static, 1) #endif /* _OPENMP */ for( i = first; (i < first + count) && [...]

Matrix Syntax for Sparse Programming

In response to a recent Coding Horror piece on Spartan programming I’d like to humbly submit two examples from my own recent work. First, in C++ we have: for (int i = 0; i < nstates; i++) { for (int a = 0; a < nactions; a++) { Q[i][a] += alpha * delta * e[i][a]; [...]