Skip to content

Instantly share code, notes, and snippets.

View psiha's full-sized avatar

Domagoj Šarić psiha

  • Zagreb, Croatia
  • 02:53 (UTC +02:00)
  • LinkedIn in/psiha
View GitHub Profile
@psiha
psiha / gist:3873141
Created October 11, 2012 15:15
GCC 4.6 ICE workarounds
namespace boost
{
template <typename T> struct remove_reference;
template <> struct remove_reference<float const &> { typedef float const type; };
template <> struct remove_reference<float &> { typedef float type; };
template <> struct remove_reference< int const &> { typedef int const type; };
template <> struct remove_reference< int &> { typedef int type; };
template <> struct remove_reference<unsigned int const &> { typedef unsigned int const type; };
template <> struct remove_reference<unsigned int &> { typedef unsigned int type; };
@psiha
psiha / gist:1647026
Created January 20, 2012 11:55
nt2::sinecosine<small> msvc10 codegen
static inline A0_n sincosa(const A0_n a0_n, A0& c, const regular&)
{
063F9EF3 push ebp
063F9EF4 mov ebp,esp
063F9EF6 and esp,0FFFFFFF0h
063F9EF9 sub esp,68h
const A0 a0 = { a0_n };
const A0 x = nt2::abs(a0);
A0 xr = Nan<A0>(), xc;
063F9EFC movdqa xmm1,xmmword ptr ds:[0648AD50h]
@psiha
psiha / gist:1646185
Created January 20, 2012 08:47
nt2::sinecosine<small> msvc10 codegen
static inline A0_n sincosa(const A0_n a0_n, A0& c, const regular&)
{
063FA193 push ebp
063FA194 mov ebp,esp
063FA196 and esp,0FFFFFFF0h
063FA199 sub esp,68h
const A0 a0 = { a0_n };
const A0 x = nt2::abs(a0);
A0 xr = Nan<A0>(), xc;
063FA19C movdqa xmm1,xmmword ptr ds:[0648BD50h]