adding __have_native_{rsqrtd,rcpd} to select between native support for double precision reciprocals and using slower but safe version in stdlib

This commit is contained in:
Evghenii
2014-02-04 16:29:23 +01:00
parent fe98fe8cdc
commit d3a6693eef
6 changed files with 50 additions and 36 deletions

10
ispc.h
View File

@@ -281,6 +281,10 @@ public:
bool hasScatter() const {return m_hasScatter;}
bool hasTranscendentals() const {return m_hasTranscendentals;}
bool hasRsqrtd() const {return m_hasRsqrtd;}
bool hasRcpd() const {return m_hasRcpd;}
private:
@@ -380,6 +384,12 @@ private:
/** Indicates whether the target has support for transcendentals (beyond
sqrt, which we assume that all of them handle). */
bool m_hasTranscendentals;
/** Indicates whether there is an ISA double precision rsqrt. */
bool m_hasRsqrtd;
/** Indicates whether there is an ISA double precision rcp. */
bool m_hasRcpd;
};