Skip to content

Instantly share code, notes, and snippets.

View johnwalley's full-sized avatar

John Walley johnwalley

View GitHub Profile
@johnwalley
johnwalley / index.html
Last active August 26, 2020 12:20
Weight
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 16px sans-serif;
}
.axis path,
.axis line {
@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 / developer-tools.md
Last active August 17, 2022 10:04
Developer Tools
@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];
}