Skip to content

Instantly share code, notes, and snippets.

View johnwalley's full-sized avatar

John Walley johnwalley

View GitHub Profile
@johnwalley
johnwalley / Boxstarter
Last active August 29, 2015 14:00
My Boxstarter Script
cinst ansicon
cinst Console2
cinst powershell
cinst sysinternals
cinst dependencywalker
cinst putty
cinst nodejs.install
cinst curl
cinst Wget
@johnwalley
johnwalley / MatrixVectorMultiply1.cs
Last active August 29, 2015 14:05
Simple matrix-vector multiplication
using System;
using System.Diagnostics;
namespace MatrixVectorMultiply
{
class MatrixVectorMultiply1
{
static void Main(string[] args)
{
const int dim = 1024 * 8;
@johnwalley
johnwalley / MatrixVectorMultiply2.cu
Last active August 29, 2015 14:05
Simple matrix-vector multiplication
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
cudaError_t multiplyWithCuda(float *c, const float *a, const float *b, unsigned int size);
__global__ void multiplyKernel(float *c, const float *a, const float *b, const int size) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
@johnwalley
johnwalley / MatrixVectorMultiply1.cu
Created August 10, 2014 18:59
Simple matrix-vector multiplication
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdio.h>
cudaError_t multiplyWithCuda(float *c, const float *a, const float *b, unsigned int size);
__global__ void multiplyKernel(float *c, const float *a, const float *b, const int size) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
@johnwalley
johnwalley / MatrixVectorMultiply2.cs
Last active August 29, 2015 14:05
Simple matrix-vector multiplication
using System;
using System.Diagnostics;
namespace MatrixVectorMultiply
{
class MatrixVectorMultiply2
{
static void Main(string[] args)
{
const int dim = 1024 * 8;
@johnwalley
johnwalley / MatrixVectorMultiplyKernel2.cs
Last active August 29, 2015 14:05
Simple matrix-vector multiplication kernel
for (int i = 0; i < dim; i++)
{
for (int j = 0; j < dim; j++)
{
vecOut[i] += matrix[i, j] * vecIn[i];
}
}
@johnwalley
johnwalley / MatrixVectorMultiplyKernel1.cs
Last active August 29, 2015 14:05
Simple matrix-vector multiplication kernel
for (int j = 0; j < dim; j++)
{
for (int i = 0; i < dim; i++)
{
vecOut[j] += matrix[i, j] * vecIn[j];
}
}
@johnwalley
johnwalley / MatrixVectorMultiplyKernel.cu
Created August 10, 2014 19:24
Simple matrix-vector multiplication kernel
__global__ void multiplyKernel(float *c, const float *a, const float *b, const int size) {
int index = threadIdx.x + blockIdx.x * blockDim.x;
c[index] = 0;
for (int j = 0; j < size; ++j)
c[index] += a[index * size + j] * b[index];
}
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2015-05-07 11:56:42" build="141123">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{PowerShell (Admin)}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
@johnwalley
johnwalley / create.sql
Last active August 29, 2015 14:22
Populate Bumps database
CREATE TABLE [dbo].[Clubs]
(
[Name] [varchar] (50)
)
ALTER TABLE [dbo].[Clubs] ADD CONSTRAINT [PK_Clubs] PRIMARY KEY CLUSTERED ([Name])
CREATE TABLE [dbo].[Crews]
(
[Club] [varchar] (50) COLLATE Latin1_General_CI_AS NOT NULL,