Skip to content

Instantly share code, notes, and snippets.

View Riyaaaaa's full-sized avatar

Atsumu Ono Riyaaaaa

  • In Dust Box
View GitHub Profile
#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 / cpp
Last active June 9, 2016 01:24
std::bindの中にstd::bindを書くと死ぬ(挙動が変わる) ref: http://qiita.com/Riyaaaa_a/items/ef6cf75a75d2451e5379
Hoge() {
piyo = std::bind(&Hoge::f, this, std::placeholders::_1, protect(std::bind(&Hoge::g, this)));
}
@Riyaaaaa
Riyaaaaa / file0.cpp
Last active August 21, 2016 05:17
【SFINAE】可変リストによるテンプレート関数の優先実体化 ref: http://qiita.com/Riyaaaa_a/items/a156383f640263f35985
template<class T> struct is_const : public std::false_type {};
template<class T> struct is_const<T const> : public std::true_type {};
@Riyaaaaa
Riyaaaaa / file0.cpp
Last active June 21, 2017 08:14
【C++】CRTPによる静的インターフェースクラスはライブラリ実装において不適切+解決法 ref: http://qiita.com/Riyaaaa_a/items/a9af401520f238f45b80
template<class T>
class Base;
class Derived : Base<Derived>;
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;