cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

josopait
Journeyman III

scatter output streams of different sizes

out float4 a<>, out float4 b[]

Hello,

I am getting strange errors with the following test program:

 

kernel void foo(out float4 a<>, out float4 b[])
{
}


int main()
{
    float4 a<20>;
    float4 b<30>;

    foo(a, b);

    return 0;
}

 


If I run it in CPU emulation mode, I get the following error message:

% BRT_RUNTIME=CPU ./test2
Using CPU runtime
test2: cpukernel.cpp:385: virtual void brook::CPUKernel::Map(): Assertion `output_args->getDomainMax() - output_args->getDomainMin() == dmax - dmin' failed.
Aborted

 

Why do I get an error here? If b was not a scatter stream (i.e. specifying the parameter b as 'out float4 b<>'), then it is clear that the sizes of a and b would have to be the same. But if b is a scatter stream, then this shouldn't matter, should it?

 

In CPU mode, the error disappears if I give a and b the same sizes (declaring b as 'float4 b<20>'). But when I use the GPU, I still get an error even if a and b are of the same size:

% ./test2
Could not setup output target
Assertion failure: calcontext.cpp (1070): Could not setup output target

test2: calbase.hpp:92: void CALAssertImpl(const char*, int, const char*): Assertion `0' failed.
Aborted

 

Is this a hardware problem (I just upgraded to an HD3850 card)? Or a bug in brook+/cal? Will this be resolved in future releases?

 

Thanks for any help,

Ingo

 

0 Likes
0 Replies