Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: src/core/SkHalf.h

Issue 2138073002: Clean up hyper-local SkCpu feature test experiment. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkCpu.cpp ('k') | src/core/SkXfermodeF16.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkHalf.h
diff --git a/src/core/SkHalf.h b/src/core/SkHalf.h
index 82d4fb414c851b1cf1979c79b6bb424c5c966e2b..5f5575ae1aeaede7f1fd6bde72c8df549f8557bf 100644
--- a/src/core/SkHalf.h
+++ b/src/core/SkHalf.h
@@ -8,7 +8,6 @@
#ifndef SkHalf_DEFINED
#define SkHalf_DEFINED
-#include "SkCpu.h"
#include "SkNx.h"
#include "SkTypes.h"
@@ -123,32 +122,3 @@ static inline uint64_t SkFloatToHalf_01(const Sk4f& fs) {
}
#endif
-
-static inline Sk4f SkHalfToFloat_01(const uint64_t* hs) {
-#if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
- if (SkCpu::Supports(SkCpu::F16C)) {
- __m128 fs;
- #if defined(__GNUC__) || defined(__clang__)
- asm("vcvtph2ps %[hs], %[fs]" : [fs]"=x"(fs) : [hs]"m"(*hs));
- #else
- fs = _mm_cvtph_ps(_mm_loadl_epi64((const __m128i*)hs));
- #endif
- return fs;
- }
-#endif
- return SkHalfToFloat_01(*hs);
-}
-
-static inline void SkFloatToHalf_01(const Sk4f& fs, uint64_t* hs) {
-#if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
- if (SkCpu::Supports(SkCpu::F16C)) {
- #if defined(__GNUC__) || defined(__clang__)
- asm("vcvtps2ph $0, %[fs], %[hs]" : [hs]"=m"(*hs) : [fs]"x"(fs.fVec));
- #else
- _mm_storel_epi64((__m128i*)hs, _mm_cvtps_ph(fs.fVec, 0));
- #endif
- return;
- }
-#endif
- *hs = SkFloatToHalf_01(fs);
-}
« no previous file with comments | « src/core/SkCpu.cpp ('k') | src/core/SkXfermodeF16.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698