MacPortsのmath/fftw-3のconfigureオプションに--enable-openmpを加えたいが、 /usr/bin/clangが-fopenmpを受け付けてくれないので今のところうまくいかない。
$ sudo emacs /opt/local/etc/macports/sources.conf # add a line of "file:///Users/t-nissie/ports"
$ mkdir -p ~/ports/math/fftw-3/files
(* perceptron : float -> float -> float -> float -> float -> float *) | |
(* description: perceptron with two inputs x1 and x2*) | |
let perceptron b w1 w2 x1 x2 = if b +. w1 *. x1 +. w2 *. x2 >= 0.0 then 1.0 else 0.0 | |
let and_gate = perceptron ~-.0.7 0.5 0.5 | |
let nand_gate = perceptron 0.7 ~-.0.5 ~-.0.5 | |
let or_gate = perceptron ~-.0.5 1.0 1.0 | |
let nor_gate = perceptron 0.5 ~-.1.0 ~-.1.0 | |
let xor_gate x1 x2 = and_gate (nand_gate x1 x2) (or_gate x1 x2) | |
(* tests *) |
MacPortsのmath/fftw-3のconfigureオプションに--enable-openmpを加えたいが、 /usr/bin/clangが-fopenmpを受け付けてくれないので今のところうまくいかない。
$ sudo emacs /opt/local/etc/macports/sources.conf # add a line of "file:///Users/t-nissie/ports"
$ mkdir -p ~/ports/math/fftw-3/files
Git と A successful Git branching model の練習のためSourceForgueのSubversionレポジトリにあるxtalgrowthを GitHubへ移動させる。ssh-keyは双方について適宜設定されているものとする。
もっと冴えたやりかた等、ご意見募集中。
// graphtest.cpp tests the Boost Graph Library (BGL) | |
// Reference: http://faithandbrave.hateblo.jp/entry/20100413/1271129607 | |
//// | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
#include <boost/graph/graph_traits.hpp> | |
#include <boost/graph/adjacency_list.hpp> | |
#include <boost/graph/dijkstra_shortest_paths.hpp> | |
#include <boost/graph/graph_utility.hpp> |
/* saturated_inc(x) http://qiita.com/shyouhei/items/e960e641882da80c8932 */ | |
#if __GNUC__ >= 7 | |
# define saturated_inc(x) __builtin_add_overflow_p(x, 1, x) ? x : ++x | |
#else | |
# define saturated_inc(x) ({__typeof__(x) y; __builtin_add_overflow(x, 1, &y) ? x : ++x; }) | |
#endif | |
signed long long | |
func(signed long long x) | |
{ | |
return saturated_inc(x); |
// large_array.c | |
// Gist: https://gist.github.com/t-nissie/38df694682cbdb08023567731f432fbf | |
// Description: pass a size_t as MPI_UINT64_T, allocate a large array of double, then first-touch it | |
// Author: Takeshi Nishimatsu | |
// License: GPLv3 | |
// Reference: https://github.com/jeffhammond/BigMPI/blob/master/test/test_reduce_x.c | |
//// | |
#include <mpi.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
SnO2 is a crystal which have rutile structure.
Original files are in https://gist.github.com/t-nissie/662ce194be356b5456c563195a052427/ .
git clone https://gist.github.com/662ce194be356b5456c563195a052427.git SnO2-LDA-vc-relax-03-gist
cd SnO2-LDA-vc-relax-03-gist
.O.pw-mt_fhi.UPF
and Sn.pw-mt_fhi.UPF
form http://www.quantum-espresso.org/pseudopotentials/ .Solve some ordinary differential equations (ODE).
Winston is used for plotting, but using Winston
takes some time.
Github: https://github.com/nolta/Winston.jl
Documents: https://winston.readthedocs.io/
# Style sheet for julia | |
# Ref: https://groups.google.com/forum/#!topic/julia-users/tisM_9sKPCc | |
# Gist: https://gist.github.com/t-nissie/83174cab99b11a2b5fa075ad845e6b4f | |
## | |
style Julia is | |
written by "Takeshi Nishimatsu" | |
version is 0.0.1 | |
first alphabet is |