Start to add X86/SSE2+ optimized clcore library
'sqrt' and 'clamp' are optimized on x86/sse2 target.
Change-Id: Ia8f1b12c666828de88c49699006e44b17431a9ac
Author: Michael Liao <michael.liao@intel.com>
Signed-off-by: Yong Chen <yong.a.chen@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 61893
diff --git a/lib/Renderscript/RSScript.cpp b/lib/Renderscript/RSScript.cpp
index 75cfff9..1edef6c 100644
--- a/lib/Renderscript/RSScript.cpp
+++ b/lib/Renderscript/RSScript.cpp
@@ -27,6 +27,11 @@
BCCContext &context = pScript.getSource().getContext();
const char* core_lib = RSInfo::LibCLCorePath;
+ // SSE2- or above capable devices will use an optimized library.
+#if defined(ARCH_X86_HAVE_SSE2)
+ core_lib = RSInfo::LibCLCoreX86Path;
+#endif
+
// NEON-capable devices can use an accelerated math library for all
// reduced precision scripts.
#if defined(ARCH_ARM_HAVE_NEON)