Skip to content

Instantly share code, notes, and snippets.

786820954.8678019951
250480340.6880287008
710671228.9786555333
946667800.9609704122
19271058.1958137727
404902144.8161676367
251317817.9280375364
22712438.6279267610
520643152.5734917354
344670306.0791877247
@not522
not522 / fft.py
Created September 24, 2018 12:47
FFT Benchmark
import contextlib
import time
import cupy
from cupy.cuda import cufft
import cupyx.scipy.fftpack
import numpy
@contextlib.contextmanager
@not522
not522 / fft.cu
Created April 8, 2018 13:33
cuFFT
/*
/usr/local/cuda/bin/nvcc fft.cu -I/user/local/cuda/inc -L/usr/local/cuda/lib -lcufft
*/
#include <iostream>
#include <cufft.h>
int main() {
@not522
not522 / Answer.cpp
Created November 10, 2014 03:31
ハル研プロコン
#include "HPCAnswerInclude.hpp"
namespace {
using namespace hpc;
}
namespace hpc {
void Answer::Init(const StageAccessor& aStageAccessor) {}
// 自分史上最小のINF
import mechanize
import socket
import sys
import urllib2
from HTMLParser import HTMLParser
rd =
pm =
cr =
user_name = ''
repeat: 4
filename: test.in
format:
- repeat: 10
type:
- type: integer
range: (2,100)
name: h
delimiter: space
- type: integer
#include<iostream>
#include<complex>
#include<cstdio>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
typedef long double D;
typedef complex<D> P;
#include<iostream>
#include<cstdio>
#include<complex>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define X real()
#define Y imag()
#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
int main() {
while (true) {
#include<iostream>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
int g[111][111];
int f[111][111];
int main() {