This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mov.u32 %r6, 0; | |
setp.eq.s32 %p1, %r5, %r6; ; bc == 0? | |
@%p1 bra $Lt_0_258; | |
mov.u32 %r7, 1; | |
setp.eq.s32 %p2, %r5, %r7; ; bc == 1? | |
@%p2 bra $Lt_0_770; | |
mov.u32 %r8, 2; | |
setp.eq.s32 %p3, %r5, %r8; ; bc == 2? | |
@%p3 bra $Lt_0_1026; | |
mov.u32 %r9, 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mbw = (blockIdx.x<<1) + (bcount & 0x0001); | |
mbh = (blockIdx.y<<1) + (bcount>>1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shr.s32 %r6, %r5, 1; ; r6 = bc /2 | |
mov.u32 %r7, %ctaid.y; | |
mul.lo.u32 %r8, %r7, 2; ; r8 = blkIdx.y * 2 | |
add.u32 %r9, %r6, %r8; ; mbh = r6 + r8 | |
and.b32 %r10, %r5, 1; ; r10 = bc & 1 | |
mov.u32 %r11, %ctaid.x; | |
mul.lo.u32 %r12, %r11, 2; ; r12 = blkIdx.x * 2 | |
add.u32 %r13, %r10, %r12; ; mbw = r10 + r12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// see if I got lucky | |
if (threadIdx.x == 7) { | |
luckyNumber++; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (luckyNumber != 1) { | |
fireTheMissiles(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm | |
svn co http://llvm.org/svn/llvm-project/cfe/trunk llvm/tools/clang | |
cd llvm && ./configure | |
make -j2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -D 9999 ubuntu@something.us-west-1.compute.amazonaws.com -i ~/Downloads/cakey.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/bin/ls *.CR2 | parallel -j 16 sips -s format jpeg {} --out out/{}.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert -monitor *.jpg out.mpg |
OlderNewer