Hi,
I do have some basic questions related to accessing directly CAL from a Brook program (with some caution obviously)
1) example 1
assuming you have something like:
float a<height,width>;
float b<height,width>; // intermediate working stream
streamread(a,...)
process(a,b,..)
streamwrite(a,...)
Then if I understand correctly, you're still left with stream b somewhere in the memory...
Would it be possible to deallocate this memory by using:
calresfree(...) or someting else, if yes what should be the resource pointer passed to calresfree ???
2) example 2
How to access from Brook, functions such as :
calDeviceGetAttribs(...)
This indeed would help to figure out the running environment
Thanks
Jean-Claude
No. But it is possible to write a Brook+ kernel, generate IL using BRCC or ShaderAnalyser, and use the IL with a CAL program.
Ok too bad!
Then coming back top example 1, how to deallocate intermediate working stream without streamwriting them into memory?
Originally posted by: jean-claude Ok too bad!
Then coming back top example 1, how to deallocate intermediate working stream without streamwriting them into memory?
Currently, streams have auto-pointer behavior -- they are de-allocated when they go out of memory. We are working towards adding dynamic allocation behavior in the next release.
float a<height,width>;
{
float b<height,width>; // intermediate working stream
streamread(a,...)
process(a,b,..)
} //b goes out of scope
streamwrite(a,...)