Skip to content

Instantly share code, notes, and snippets.

Avatar

Atsumu Ono Riyaaaaa

  • In Dust Box
  • Japan
View GitHub Profile
View raymarching-sphere-lighting
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
View raymarching-terrain-sample
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
@Riyaaaaa
Riyaaaaa / file0.cpp
Last active Aug 21, 2016
【SFINAE】可変リストによるテンプレート関数の優先実体化 ref: http://qiita.com/Riyaaaa_a/items/a156383f640263f35985
View file0.cpp
template<class T> struct is_const : public std::false_type {};
template<class T> struct is_const<T const> : public std::true_type {};
@Riyaaaaa
Riyaaaaa / cpp
Last active Jun 9, 2016
std::bindの中にstd::bindを書くと死ぬ(挙動が変わる) ref: http://qiita.com/Riyaaaa_a/items/ef6cf75a75d2451e5379
View cpp
Hoge() {
piyo = std::bind(&Hoge::f, this, std::placeholders::_1, protect(std::bind(&Hoge::g, this)));
}
View file0.cpp
#include <iostream>
#include <amp.h>
using namespace concurrency;
int main() {
int v[11] = {'G', 'd', 'k', 'k', 'n', 31, 'v', 'n', 'q', 'k', 'c'};
array_view<int> av(11, v);
parallel_for_each(av.get_extent(), [=](index<1> idx) restrict(amp) {
av[idx] += 1;
});
@Riyaaaaa
Riyaaaaa / file0.cpp
Last active Jun 21, 2017
【C++】CRTPによる静的インターフェースクラスはライブラリ実装において不適切+解決法 ref: http://qiita.com/Riyaaaa_a/items/a9af401520f238f45b80
View file0.cpp
template<class T>
class Base;
class Derived : Base<Derived>;