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; |
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); | |
} |
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; |
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); |
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| |
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| |
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 | |
//---------------------------------------------------------------------- |
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; |
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; |
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