In Vis Studio 2005, the following code hangs -
sample.br -
kernel void hang(uint4 s<><>
{
int4 index = instance();
}
The compile starts and never returns. I can compile the samples, so I think my install is correct.
Originally posted by: drstrip In Vis Studio 2005, the following code hangs -
sample.br -
kernel void hang(uint4 s<><>) { int4 index = instance(); }
The compile starts and never returns. I can compile the samples, so I think my install is correct.
Try that:
kernel void does_not_hang(uint4 s<>) {
int4 index = instance();
}
please add out keyword to stream. it works fine.
see working kernel.
kernel void hang(out uint4 s<>
{
int4 index = instance();
}
thanks.
What if there is no output stream? (Can't actually think of a useful example at the moment.)
Originally posted by: genaganna please add out keyword to stream.
Oops, I just copied the example and removed the superfluous <>.
Originally posted by: drstrip thanks.
What if there is no output stream? (Can't actually think of a useful example at the moment.)
I guess it would be the fastest possible kernel, if you need no output
Originally posted by: Gipsel Originally posted by: genaganna please add out keyword to stream.
Oops, I just copied the example and removed the superfluous <>.
Originally posted by: drstrip thanks.
What if there is no output stream? (Can't actually think of a useful example at the moment.)
I guess it would be the fastest possible kernel, if you need no output
LOL, yes, I don't think the compiler generates code for a kernel without an output.
function semantics for Brook
1. kernel with alteast one output and void as return type can be called from other kernel or from host.
2. Kernel with no output and return type can be called from any other kernel
all other cases are invaild.
no output and return type = subkernel, yes?
Subkernels get inlined, yes?
Originally posted by: ryta1203 no output and return type = subkernel, yes?
yes
Subkernels get inlined, yes?
yes