Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
Hello everyone!

Hiroshi Watanabe kaityo256

😀
Hello everyone!
View GitHub Profile
View thread_vec.cc
//------------------------------------------------------------------------
#include <stdio.h>
#include <vector>
#include <time.h>
//------------------------------------------------------------------------
const int N_THREADS = 16;
//------------------------------------------------------------------------
int
func1(int n, int i){
int sum = 0;
View driver_version.cu
#include <stdio.h>
#include <cuda.h>
int
main(void){
int v = 0;
cuDriverGetVersion(&v);
printf("%d\n",v);
}
View devicegetname.cu
#include <stdio.h>
#include <cuda.h>
int
main(void){
const int SIZE = 256;
char name[SIZE];
CUdevice device;
cuInit(0);
int count = 0;
View acctest.cc
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
const int N=10000000;
double a[N],b[N],c[N],d[N];
double
myrand(void){
return (double)rand()/((double)RAND_MAX+1.0);
View gist:d3b04c0421a35ac0691d
# -*- encoding: utf-8 -*-
require "rexml/document"
doc = nil
filename = ARGV[0]
if ARGV.size == 0
puts "usage: ruby kaken.rb filename"
exit
end
File.open(filename) {|fp|
View gist:c7cfeabc5079e4204f0b
# -*- encoding: utf-8 -*-
require "rexml/document"
doc = nil
filename = ARGV[0]
if ARGV.size == 0
puts "usage: ruby title.rb projects.xml"
exit
end
File.open(filename) {|fp|
View force.cc
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <algorithm>
#ifdef POWER
#include <builtins.h>
#endif
//----------------------------------------------------------------------
View forceonly_aos.cc
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <algorithm>
//----------------------------------------------------------------------
const int N = 20000;
const double L = 10.0;
const int D = 3;
View forceonly_soa.cc
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <algorithm>
//----------------------------------------------------------------------
const int N = 20000;
const double L = 10.0;
const int D = 3;
View forceonly_mda.cc
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
//----------------------------------------------------------------------
const int N = 20000;
const double L = 10.0;
const int D = 3;
const int X = 0;