Skip to content

Instantly share code, notes, and snippets.

@ysh86
ysh86 / main.cpp
Last active March 6, 2026 09:05
CUDA init
#include <iostream>
#include <thread>
#include <vector>
#include <chrono>
//#include <cuda.h>
//#pragma once
typedef int CUdevice;
typedef struct CUctx_st* CUcontext;
-------------------------------------------------------------------------------
--
-- A VGA line-doubler for an Apple ][
--
-- Stephen A. Edwards, sedwards@cs.columbia.edu
--
--
-- FIXME: This is all wrong
--
-- The Apple ][ uses a 14.31818 MHz master clock. It outputs a new
@ysh86
ysh86 / t42_mod.cu
Created December 12, 2016 10:40
another dp4a
#include<iostream>
#include <stdio.h>
#define ITER 1024*1024*1024
#define SSZ 512
#define BSZ 7*16
#include <time.h>
#include <sys/time.h>
@ysh86
ysh86 / t42.cu
Created December 12, 2016 10:37
dp4a
#include<iostream>
#include <stdio.h>
#define ITER 1024
#define SSZ 512
#define BSZ 512
#include <time.h>
#include <sys/time.h>
@ysh86
ysh86 / mbx_checker.rb
Last active December 24, 2015 01:19
Checker for the UW IMAP mbx file format. http://www.washington.edu/imap/
#!/usr/bin/env ruby
# coding: utf-8
#RS = "\r\n"
RS = "\n"
File.open(ARGV[0], "r:ASCII-8BIT") do |f|
# header
magic = f.read(5)
if magic != '*mbx*'