Skip to content

Instantly share code, notes, and snippets.

View futr's full-sized avatar

Masato Takahashi futr

View GitHub Profile
@futr
futr / Makefile-fortran
Last active July 31, 2018 00:02
Makefile for FORTRAN with gcc
# Linux,Mac,Windows用gcc用
# ソースコードと出力ファイル
FSOURCES = main.f
F90SOURCES =
F77SOURCES =
F95SOURCES =
TARGET = main
# .fファイルの標準
@futr
futr / .vimrc
Created May 15, 2015 01:08
cd; wget http://git.io/vTvJD -O .vimrc
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set smartindent
set autoindent
set number
set ruler
@futr
futr / .gitignore-C
Created February 11, 2015 16:34
.gitignore for C
*~
*.o
*.BAK
*.elf
*.exe
*.out
*.lst
@futr
futr / .gitignore-AVR
Created February 11, 2015 16:22
.gitignore for AVR
*~
*.creator.user*
*.o
*.lst
*.map
*.hex
*.elf
*.BAK
@futr
futr / .gitignore-Qt
Created February 11, 2015 16:20
.gitignore for Qt
*~
*.creator.user*
*.pro.user*
*.BAK
@futr
futr / micmatrix.c
Last active August 29, 2015 13:57
XeonPhi上でOpenMPを使って行列積
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
int main( void )
{
// l * m行列とm * n行列積
int i;
int j;
@futr
futr / XeonPhiOnWindows.md
Last active August 29, 2015 13:57
Windows上でXeonPhiを使う方法

Windows上でのXeonPhi環境構築手順

XeonPhiをWindows上で利用する際の手順のメモです。

インストール

Visual Studio 2010 Professionalのインストール

  • 可能ならば2012の方が良い(Qtも64bitが使える)
  • 2012以降でないとデバッグできない
@futr
futr / print_rect.cpp
Created March 26, 2014 09:54
Qtで3cmX3cmの四角形を印刷するコード
QPrinter printer;
QPrintDialog dialog( &printer, this );
if ( dialog.exec() == QPrintDialog::Accepted ) {
// 印刷開始
QPainter painter( &printer );
// DPI情報から3cmX3cmの四角形を作る
int dpi = printer.resolution();
QRect rect( 10, 10, 30 / 25.4 * dpi, 30 / 25.4 * dpi );
@futr
futr / pointer.cu
Last active August 29, 2015 13:55
CUDA上でのポインター配列テストプログラム
/*
* CUDA上でのポインター配列テスト
*/
#include <cuda_runtime_api.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
__global__ void dev_set_pointer( float **array, float *pointer, int index )