Hi there,
In order to illustrate this, I've put two simple codes in
here: see domainout.cpp and domainglobal.cpp. Each sets up the appropriate buffer, then writes out vObjIndex0 and vWinCoord.xy for a subdomain.
To run them, compile with something like (on 64-bit linux)
g++ -m64 domainout.cpp -o domout.go -I/usr/local/amdcal/include -L/usr/local/amdcal/lib64 -lamdcalcl -lamdcalrt
and then run like
./domout.go > tmpout .
To see the output, open tmpout in a text editor like gedit (with the text wrapping turned off in the preferences!).
On my machine, both versions give the same output when the domain is e.g. the full size of the buffer, but give different outputs as mentioned in my previous post for a domain of {1,2,4,10} say.
Also of interest in the outputs is the relation of vObjIndex0.x to vWinCoord.xy. It doesn't seem to be the "y*width+x" of the cal-readme, but might rather be related to the way a domain is broken into wavefronts; it "snakes" around 8x8 blocks in the domain, based around 2x2 quads (try different values, including odd ones, for the domain parameters to see this).
Anyhow, any advice on what is going on with subdomains and global buffers (or suggestions on what I might be doing wrong in the global case leading to the apparent reinterpretation of the domain) would be much appreciated!
Thanks a lot,
Steven.