Skip to content

Instantly share code, notes, and snippets.

View Jasper-Bekkers's full-sized avatar

Jasper Bekkers Jasper-Bekkers

View GitHub Profile
use ash::{vk, Entry, Instance};
use ash::version::{EntryV1_0, EntryV1_1, InstanceV1_0};
use ash::vk_make_version;
use std::ffi::CString;
use shared_library::dynamic_library::DynamicLibrary;
use std::sync::Arc;
use std::path::Path;
use ash::vk::Handle;
#[cfg(windows)]
import pyopencl as cl
import numpy as np
import random as r
import datetime as date
np.set_printoptions(threshold=np.nan)
#Averages ~250.000,000 CGoL cell updates a second, 1GB NVIDIA 560ti
# x*y*iterations = total = gpu time = cells/sec
# 36*36*100000 = 129600000 = 27s = 4,800,000
<?php
// Settings:
// - METRO_ID is extracted from the sl.se url. This URL is for slussen departures
// http://realtid.sl.se/?id=177&epslanguage=sv&WbSgnMdl=9192-U2x1c3NlbiAoU3RvY2tob2xtKQ%3d%3d-_--_-_-_
// the METRO_ID is 9192
//
// - DEPARTURE_NAME is the station the metro you want is going to as it appears on the above URL eg. 'Hässelby str.'
// - DEPARTURE_NICKNAME just a friendly name to make th english tts api be able to pronounce your destination
// - API_KEY is the api key, you can get one at http://www.trafiklab.se
@Jasper-Bekkers
Jasper-Bekkers / premake4.lua
Created July 17, 2012 23:38
premake make file for Win32, PS3 including SPU
function apply_base_settings()
kind "ConsoleApp"
language "C++"
files { "**.h", "**.cpp", "External/*.c", "External/*.h", "External/*.cpp", "External/json/**" }
excludes { "External/libRocket/**" }
includedirs {".", "./External", "./External/libRocket/Include"}
end
function apply_spu_settings(dir, symbol_name)
kind "ConsoleApp"
enum MetaSyntacticVariables
{
Foo,
Bar,
Baz,
MetaSyntacticVariables_Count,
}
std::map<MetaSyntacticVariables, std::string> uselessMapUsage;
const char *vertextype(BYTE type)
{
if(type == D3DDECLTYPE_FLOAT1) return "D3DDECLTYPE_FLOAT1";
if(type == D3DDECLTYPE_FLOAT2) return "D3DDECLTYPE_FLOAT2";
if(type == D3DDECLTYPE_FLOAT3) return "D3DDECLTYPE_FLOAT3";
if(type == D3DDECLTYPE_FLOAT4) return "D3DDECLTYPE_FLOAT4";
if(type == D3DDECLTYPE_D3DCOLOR) return "D3DDECLTYPE_D3DCOLOR";
if(type == D3DDECLTYPE_UBYTE4) return "D3DDECLTYPE_UBYTE4";
if(type == D3DDECLTYPE_SHORT2) return "D3DDECLTYPE_SHORT2";
if(type == D3DDECLTYPE_SHORT4) return "D3DDECLTYPE_SHORT4";
@Jasper-Bekkers
Jasper-Bekkers / gist:2230394
Created March 28, 2012 20:48
Simple test w/ data execution
// ExecuteSomeCode.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
typedef int (__stdcall MyFunctionType)(int a, int b, int c);
static int test(int a)
{