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
Breaking gdb: | |
#echo 'q' | gdb --annotate=2 | hexdump -c | |
0000000 G N U g d b ( U b u n t u | |
0000010 7 . 7 - 0 u b u n t u 3 . 1 ) | |
0000020 7 . 7 \n C o p y r i g h t ( C | |
0000030 ) 2 0 1 4 F r e e S o f t | |
0000040 w a r e F o u n d a t i o n , | |
0000050 I n c . \n L i c e n s e G P | |
0000060 L v 3 + : G N U G P L v e | |
0000070 r s i o n 3 o r l a t e r |
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
diff --git a/geomfunc.h b/geomfunc.h | |
index 6f2fde3..19ef462 100644 | |
--- a/geomfunc.h | |
+++ b/geomfunc.h | |
@@ -29,7 +29,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
#ifndef SMALLPT_GPU | |
-static float SphereIntersect( | |
+float SphereIntersect( |
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
__attribute__((aligned(128))) | |
__constant char data[128]; | |
kernel void test_as_type() | |
{ | |
char aligner[0x70]; | |
union { uint16 value; char raw[sizeof(uint16)]; } src; | |
printf("data@ %x\n", data); | |
printf("src@ %x\n", &src); | |
printf("aligner@ %x\n", aligner); |
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
.file "test-avx.c" | |
.text | |
.globl add | |
.align 16, 0x90 | |
.type add,@function | |
add: # @add | |
.cfi_startproc | |
# BB#0: # %entry | |
vaddpd %ymm1, %ymm0, %ymm0 | |
ret |
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/bash | |
clang -emit-llvm -S -march=$1 select.cl -o select.ll | |
clang -march=$1 select.c select.ll -o select | |
./select |