I hereby claim:
- I am phdp on github.
- I am phdp (https://keybase.io/phdp) on keybase.
- I have a public key whose fingerprint is 081D 2E96 EC38 85A1 4E50 5C8C 9FA9 BB43 2964 5021
To claim this, I am signing this object:
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <time.h> | |
| #include <randamu/rng.h> | |
| int main() { | |
| const clock_t start = clock(); | |
| rd_rng r; // A random number generator. | |
| rd_rng_init_time(&r); // Initialize with the current time. | |
| const int max = 2000000000; |
| // From: http://c.learncodethehardway.org/book/ex20.html | |
| #ifndef __dbg_h__ | |
| #define __dbg_h__ | |
| #include <stdio.h> | |
| #include <errno.h> | |
| #include <string.h> | |
| #ifdef NDEBUG |
| os: Windows Server 2012 | |
| platform: x64 | |
| branches: | |
| only: | |
| - master | |
| install: | |
| - cinst cmake | |
| - cinst make |
I hereby claim:
To claim this, I am signing this object:
| // From Gaster et al.'s "Heterogeneous Computing with OpenCL". | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #if defined(__APPLE__) && defined(__MACH__) | |
| #include <OpenCL/OpenCL.h> | |
| #else | |
| #include <CL/cl.h> |
| // Compile with the -std=c++0x or -std=c++11 flag | |
| #include <iostream> | |
| #include <set> | |
| #include <algorithm> | |
| int main() { | |
| // Create a set of numbers with the new initializer: | |
| std::set<int> xs{ 6, 42, 47 }; |
| Section "Device" | |
| Identifier "nvidia" | |
| Driver "nvidia" | |
| Option "NoLogo" "true" | |
| Option "DPI" "96 x 96" | |
| # Specify Nvidia PCI device | |
| BusID "PCI:1:0:0" | |
| # Make sure X starts also when no outputs are connected to the Nvidia chip | |
| Option "AllowEmptyInitialConfiguration" | |
| EndSection |
| data Expr = | |
| Var String | |
| | Const Int | |
| | Add Expr Expr | |
| | Mult Expr Expr | |
| simplify1 :: Expr -> Expr | |
| simplify1 e = case e of | |
| Add (Const 0) x -> x | |
| Add x (Const 0) -> x |
| abstract Expr | |
| type Const <: Expr; value::Int end | |
| type Var <: Expr; name::String end | |
| type Add <: Expr; left::Expr; right::Expr end | |
| type Mult <: Expr; left::Expr; right::Expr end | |
| add(x::Const, y::Const) = Const(x.value + y.value) | |
| add(x::Const, y::Expr) = x.value == 0? y : Add(x, y) | |
| add(x::Expr, y::Const) = add(y, x) |
| #include <iostream> | |
| #include <string> | |
| #include <boost/variant.hpp> | |
| struct Add; | |
| struct Mult; | |
| using Expr = boost::variant<int, std::string, boost::recursive_wrapper<Add>, | |
| boost::recursive_wrapper<Mult>>; |