titanius

Weird Brook+ compiler error

Discussion created by titanius on Aug 9, 2009
Latest reply on Aug 9, 2009 by titanius
What does this mean?

I am trying to compile the following kernel but it gives a weird error. Any help most appreciated.

 

kernel:

kernel void Calculate_critvar (int aout_full[][], double orig_y[], double v_alt[], out double critvar<>, out double ubestt<>, int ndstart, int ndend,
    double sumnode, double nodecnt )
{
    int2 ind = instance().xy;
    int kv = ind.x;
    int j;
    double d;
    double suml=0.0, sumr;
    double npopl, npopr;
    double critParent = sumnode*sumnode/nodecnt;
    double crit;
    for(j=ndstart;j<=ndend-1;j++){
        d = orig_y[aout_full[kv][j]];
        suml += d;
        sumr  = sumnode - suml;
        npopl = ((double)j-(double)ndstart)+1.0;
        npopr = nodecnt - npopl;
        if (v_alt[j] < v_alt[j+1]){
            crit = (suml * suml / npopl) + (sumr * sumr /npopr) - critParent;
            if (crit > critvar){
                ubestt = (v_alt[j] + v_alt[j+1])/2.0;
                critvar = crit;
            }
        }
    }
}

 

Error:

mkdir -p brookgenfiles
/usr/local/atibrook//sdk/bin/brcc  -o brookgenfiles/misc_kernels misc_kernels.br
ERROR: ASSERT(func.NumArgs() == (int)mChildElements.size()) failed
While processing <buffer>:358
In compiler at LoadFunctionArgs()[astcontrol.cpp:426]
  func.NumArgs() = 3
  mChildElements.size() = 2
Message: Invalid function call
Aborting...
Problem with compiling brookgenfiles/misc_kernels_Calculate_critvar_addr.hlsl
Error--:cal back end failed to compile kernel "Calculate_critvar"

Outcomes