Skip to content

Instantly share code, notes, and snippets.

@jacobtolar
Created January 30, 2012 00:45
Show Gist options
  • Save jacobtolar/1701663 to your computer and use it in GitHub Desktop.
Save jacobtolar/1701663 to your computer and use it in GitHub Desktop.
// set bcount somewhere above; assume 0 >= bcount <= 3:
//
switch (bcount) {
case 0: mbh = blockIdx.y*2;
mbw=blockIdx.x*2;
break;
case 1: mbh = blockIdx.y*2;
mbw=blockIdx.x*2+1;
break;
case 2: mbh = blockIdx.y*2+1;
mbw=blockIdx.x*2;
break;
case 3: mbh = blockIdx.y*2+1;
mbw=blockIdx.x*2+1;
break;
default: break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment