mt19937-64.out.txt
に掲載されている、1000 outputs of genrand64_int64()
を、Fortran
で読み取れるように、
バイナリデータは保持しつつ、unsigned long
から signed long
に変換するための C++
と Fortran
のソースコード。
This file contains hidden or 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
FCFLAGS = -ffree-line-length-none -O2 -pedantic -std=f2008 -Wall -Wextra # -fbacktrace -fbounds-check | |
OBJS = ./mod_utility.o ./mod_eqn_func.o ./mod_solver.o ./main.o | |
main.exe: $(OBJS) | |
gfortran $(FCFLAGS) -o ./main.exe $(OBJS) | |
%.o: %.f08 | |
gfortran $(FCFLAGS) -c $< | |
clean: |
This file contains hidden or 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
FCFLAGS = -ffree-line-length-none -O2 -pedantic -std=f2008 -Wall -Wextra # -fbacktrace -fbounds-check | |
OBJS = ./main.o | |
main.exe: $(OBJS) | |
gfortran $(FCFLAGS) -o ./main.exe $(OBJS) | |
%.o: %.f08 | |
gfortran $(FCFLAGS) -c $< | |
clean: |
This file contains hidden or 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
% [reference] | |
% https://tex.stackexchange.com/questions/34424/how-do-i-calculate-n-modulo-3-in-latex | |
\RequirePackage{plautopatch} | |
\documentclass[uplatex]{jsarticle} | |
\makeatletter | |
\newcommand{\calcQuotient}[2]{{% | |
\newcount\@quotient% |
This file contains hidden or 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
! gfortran, gcc version 7.4.0 | |
! https://stdlib.fortran-lang.org/sourcefile/stdlib_strings.fypp.html | |
program test | |
use , intrinsic :: iso_fortran_env | |
implicit none | |
character(len=1) , parameter :: ASCII_HT = achar(int(Z'09')) | |
character(len=1) , parameter :: ASCII_LF = achar(int(Z'0A')) |
This file contains hidden or 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
# [reference] | |
# https://qiita.com/tell/items/5209b92d5f525ca7b028 | |
# https://ja.wikipedia.org/wiki/ヒストグラム | |
reset session | |
set datafile separator comma | |
# DATA_FILE_PATH = '10e3.csv' | |
# DATA_FILE_PATH = '10e4.csv' |
This file contains hidden or 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
# compiler selection | |
FC = gfortran | |
# compiler option: Common Options | |
FFLAGS_COMMON = -ffree-line-length-none -fimplicit-none -pedantic -std=f2008 -Wall -Werror -Wextra | |
# compiler option: Release mode | |
FFLAGS_RELEASE = ${FFLAGS_COMMON} -O3 | |
# compiler option: Debug mode |
This file contains hidden or 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
import numpy | |
import os | |
import pickle | |
import requests | |
def convert_data(targetData, fileName): | |
with open(fileName, 'wb') as writingFileStream: |
#include <iostream>
#include <sycl/sycl.hpp>
const std::string secret_string{ "Ifmmp-!xpsme\"\012J(n!tpssz-!Ebwf/!" "J(n!bgsbje!J!dbo(u!ep!uibu/!.!IBM\01" };
const auto secret_string_size = secret_string.size();
int main(void)