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 krnl1_fn(__global int* A, | |
local int* l) | |
{ | |
if (get_local_id(0)==0) { | |
*l = A[get_global_id(0)]; | |
} | |
barrier(CLK_LOCAL_MEM_FENCE); |
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 <iostream> | |
#include <vector> | |
#include <fstream> | |
#include <assert.h> | |
using std::cout; | |
using std::cerr; | |
using std::endl; | |
using std::string; |
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
Number of platforms: 2 | |
Platform Profile: FULL_PROFILE | |
Platform Version: OpenCL 2.0 AMD-APP (1598.5) | |
Platform Name: AMD Accelerated Parallel Processing | |
Platform Vendor: Advanced Micro Devices, Inc. | |
Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices | |
Platform Profile: FULL_PROFILE | |
Platform Version: OpenCL 1.2 LINUX | |
Platform Name: Intel(R) OpenCL | |
Platform Vendor: Intel(R) Corporation |
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 <iostream> | |
#include <vector> | |
#include <fstream> | |
using std::cout; | |
using std::cerr; | |
using std::endl; | |
using std::string; | |
using std::vector; |
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/env python3 | |
import re | |
import math | |
import urllib.request as urllib | |
from mpl_toolkits.mplot3d import Axes3D | |
import matplotlib.pyplot as plt | |
def parse_top_colors(file): |
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
#define BATCH_SIZE 64 | |
kernel void bound_n_split(... | |
global int* debug_flags) | |
{ | |
... | |
const size_t lid = get_local_id(0); | |
const size_t wid = get_group_id(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
diff --git a/premake4.lua b/premake4.lua | |
index 2c59ecf..86a5d5e 100644 | |
--- a/premake4.lua | |
+++ b/premake4.lua | |
@@ -105,6 +105,7 @@ solution "oclraster" | |
add_include("/usr/include/w32api/GL") | |
end | |
add_include("/usr/local/include") | |
+ add_include("/usr/local/include/floor") | |
add_include("/usr/include/libxml2") |
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
int hash(int i) | |
{ | |
return (int)((i*2654435761L) & 0xffffffffffffffffL); | |
} | |
float fhash(int i) | |
{ | |
return (float)hash(i) * pow(2., -32.); | |
} |
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 "stdio.h" | |
int main(void) | |
{ | |
int i = 1; | |
for (;;) { | |
printf("%d\n", i++); // 1 | |
printf("%d\n", i++); // 2 | |
printf("fizz\n", i++); // 3 |