View thread_vec.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------ | |
#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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <cuda.h> | |
int | |
main(void){ | |
int v = 0; | |
cuDriverGetVersion(&v); | |
printf("%d\n",v); | |
} |
View devicegetname.cu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/time.h> | |
#include <algorithm> | |
#ifdef POWER | |
#include <builtins.h> | |
#endif | |
//---------------------------------------------------------------------- |
View forceonly_aos.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
OlderNewer