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 "Pointer Test.c" #This file is created using the commands gcc -S Test\ Pointers.c | |
.section .rodata # mv Test\ Pointers.s test | |
.LC0: | |
.string "This is the sum: %d\n" | |
.text | |
.globl main | |
.type main, @function | |
main: | |
.LFB0: | |
.cfi_startproc |
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
Process: Poison [9582] | |
Path: /Users/name/Desktop/poison/Poison.app/Contents/MacOS/Poison | |
Identifier: ca.kirara.Poison | |
Version: 1.1.11 (111) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [197] | |
Date/Time: 2014-02-21 17:07:36.218 +0100 | |
OS Version: Mac OS X 10.6.8 (10K549) | |
Report Version: 6 |
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
import numpy as np | |
import math as m | |
from PIL import Image | |
data = np.zeros((1800,2400,3), dtype=np.uint8) | |
torad = m.pi/180 | |
c = 0.1 | |
for y in range(0, 1800): | |
f = m.sin(.06*y*torad) |
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
#include <SFML/Audio.hpp> | |
#include <SFML/Graphics.hpp> | |
// Here is a small helper for you ! Have a look. | |
#include "ResourcePath.hpp" | |
int main(int, char const**) | |
{ | |
// Create the main window | |
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window"); |
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 defined(_WIN32) | |
#include <windows.h> | |
#endif | |
#include <GL/glut.h> | |
#include <GL/freeglut.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <assert.h> | |
#include "trackball.h" | |
#include "argumentParser.h" |
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
X=1024; Y=768; A=3; | |
J=0; | |
K=-10; | |
L=-7; | |
M=1296; | |
N=36; | |
O=255; | |
P=9; | |
_=1<<15; |
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
void RenderSession::render() { | |
unsigned int size = _scene->_cam->size(); | |
device_mem ray_dirs = _device->malloc(size * sizeof(cl_float4), READ_WRITE); | |
// Arguments: float4* output, cl_camera cam | |
void* argvalues[2] = { ray_dirs.ptr(), _scene->_cam.gpu_type() }; | |
size_t* arg_sizes; | |
// Blocking call! | |
_device->enqueue_kernel_range(KERNEL_PRODUCE_RAY, 2, arg_values, arg_sizes, 1, size); |
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
Build log: | |
<program source>:57:1: warning: no previous prototype for function 'intersect' | |
intersect( | |
^ | |
<program source>:63:37: error: no member named 'radiu' in 'struct shape::<anonymous at <program source>:31:3>'; did you mean 'radius'? | |
float sphere_radius = shape.sphere.radiu; | |
^~~~~ | |
radius | |
<program source>:33:10: note: 'radius' declared here | |
float radius; // offset 16 |
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
5 unsigned char | |
6 intersect( | |
7 __const float4 origin, | |
8 float4 dir, | |
9 shape shape) | |
10 { | |
11 float4 trans_origin = origin - shape.sphere.origin; | |
12 //float a = 0; | |
13 float a = dot(dir, dir); | |
14 //float b = 0; |
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
(lldb) bt | |
* thread #1: tid = 0x4307, 0x00007fff8d331866 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'opencl_runtime', stop reason = signal SIGABRT | |
* frame #0: 0x00007fff8d331866 libsystem_kernel.dylib`__pthread_kill + 10 | |
frame #1: 0x00007fff8f42835c libsystem_pthread.dylib`pthread_kill + 92 | |
frame #2: 0x00007fff8ca27b1a libsystem_c.dylib`abort + 125 | |
frame #3: 0x00007fff9496f1ca libGPUSupportMercury.dylib`gpusKillClient + 111 | |
frame #4: 0x00007fff9496fb51 libGPUSupportMercury.dylib`gpusQueueSubmitDataBuffers + 155 | |
frame #5: 0x00001234801ea0a0 AMDRadeonX3000GLDriver`___lldb_unnamed_function8559$$AMDRadeonX3000GLDriver + 230 | |
frame #6: 0x00001234801e9f86 AMDRadeonX3000GLDriver`___lldb_unnamed_function8558$$AMDRadeonX3000GLDriver + 30 | |
frame #7: 0x00001234801ea34f AMDRadeonX3000GLDriver`gldFinishQueue + 41 |
OlderNewer