Skip to content

Instantly share code, notes, and snippets.

View kaityo256's full-sized avatar
🤖
I, Robot

Hiroshi Watanabe kaityo256

🤖
I, Robot
  • Keio University
  • Japan
View GitHub Profile
@kaityo256
kaityo256 / test.cpp
Last active October 18, 2022 03:35
MPI_Probe sample
#include <mpi.h>
#include <cstdio>
#include <vector>
int main(int argv, char **argc){
MPI_Init(&argv, &argc);
int rank;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
int send_buf[] = {3,5,3,1,6,7,8,8};
int count = sizeof(send_buf)/sizeof(int);
@kaityo256
kaityo256 / main.cpp
Created February 4, 2022 14:30
Trad vs. Clang
#include <cstdio>
#include <algorithm>
#include <random>
int main(){
std::mt19937 mt;
double s = 0.0;
std::uniform_real_distribution<double> ud(0.0, 1.0);
for (int i = 0; i < 1000000; i++) s+=ud(mt);
printf("%f\n",s);
@kaityo256
kaityo256 / main.cpp
Last active February 5, 2022 18:04
Trad vs. Clang
#include <algorithm>
#include <random>
#include <cstdio>
int main(void) {
std::mt19937 mt(1);
int s = 0;
for (int i = 0; i < 100; i++) {
std::uniform_real_distribution<double> ud(0.0, 1.0);
for(int j=0;j<10000;j++){
@kaityo256
kaityo256 / test.cpp
Created November 21, 2021 09:57
Logical operation of predicate registers on SVE
#include <arm_sve.h>
#include <iostream>
#include <vector>
#include <random>
void show_pr(svbool_t tp) {
int n = svcntb();
std::vector<int8_t> a(n);
std::vector<int8_t> b(n);
std::fill(a.begin(), a.end(), 1);
@kaityo256
kaityo256 / test.cpp
Created November 2, 2021 11:34
OpenMP Schedule Sample
#include <cstdio>
#include <omp.h>
const int N = 8;
int d[N] = {};
int main() {
int tid;
#pragma omp parallel for schedule(static)
for (int i = 0; i < N; i++) {
@kaityo256
kaityo256 / test.cpp
Created May 11, 2021 13:47
連番ファイル名を作る方法
#include <cstdio>
#include <cstdlib>
#include <string>
void save_data(const std::string filename) {
printf("%s\n", filename.c_str());
}
int main() {
std::string filename;
@kaityo256
kaityo256 / test.cpp
Created May 10, 2021 10:18
C++ to Python Sample
#include <cstdio>
#include <fstream>
#include <random>
#include <string>
#include <vector>
const int L = 64;
const int N = L * L;
std::vector<int> spins(L *L);
@kaityo256
kaityo256 / sve_check.cpp
Created January 7, 2021 07:05
Check availability and length of SVE
#include <cstdio>
#ifdef __ARM_FEATURE_SVE
#include <arm_sve.h>
#endif
int main() {
int n = 0;
#ifdef __ARM_FEATURE_SVE
n = svcntb() * 8;
#endif
@kaityo256
kaityo256 / cntb.cpp
Created January 6, 2021 07:50
Check the length of SVE
#include <cstdio>
int main(){
int x;
asm __volatile__("cntb %[x]" : [ x ] "=r"(x));
printf("%d\n",x*8);
}
@kaityo256
kaityo256 / howtoreview.md
Last active May 23, 2025 07:22
査読の仕方

査読の仕方

査読の仕方についての覚書。初めて査読をすることになり、どうして良いかわからないような人向けに書いてある。分野、雑誌、個人によって流儀が異なるので、全てを鵜呑みにしないで欲しい。なお、私の専門は数値計算であり、主な査読経験はPhys. Rev.系、J. Chem. Phys.、そしてJPSJなどである。

査読とは

査読システムに登場するプレイヤーは三種類、「著者」「エディタ」「査読者」である。

論文が投稿されると、まずエディタと呼ばれる研究者が論文を受け取る。エディタはその論文を読み、適切な査読者を選んで査読を依頼し、査読レポートを著者に送り、著者の反応を見て、最終的にその論文を出版するかどうか判断する。この一連の処理の責任を負うことを「ハンドルする」と呼んだりする。査読システムは著者と査読者のやりとりが主となるが、論文の生殺与奪権はエディタが握っており、実は最重要プレイヤーである。