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

Unified Diff: src/runtime/runtime-simd.cc

Issue 1356413002: [simdjs] Update Spec version to 0.9 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/runtime/runtime.h ('k') | test/simdjs/testcfg.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-simd.cc
diff --git a/src/runtime/runtime-simd.cc b/src/runtime/runtime-simd.cc
index f5fcd009593b38e6befbf37f92106d7952392789..0a1034dfc253b21323faae8eb15ecfe5595a3903 100644
--- a/src/runtime/runtime-simd.cc
+++ b/src/runtime/runtime-simd.cc
@@ -110,14 +110,6 @@ inline T AddSaturate(T a, T b) {
}
-// Widening absolute difference for uint16_t and uint8_t.
-template <typename T>
-inline uint32_t AbsoluteDifference(T a, T b) {
- uint32_t result = std::abs(a - b);
- return result;
-}
-
-
// Saturating subtraction for int16_t and int8_t.
template <typename T>
inline T SubSaturate(T a, T b) {
@@ -492,23 +484,10 @@ SIMD_MAXNUM_FUNCTION(Float32x4, float, 4)
return *result; \
}
-#define SIMD_HORIZONTAL_SUM_FUNCTION(type, lane_type, lane_bits, lane_count) \
- RUNTIME_FUNCTION(Runtime_##type##HorizontalSum) { \
- HandleScope scope(isolate); \
- DCHECK(args.length() == 1); \
- CONVERT_ARG_HANDLE_CHECKED(type, a, 0); \
- double sum = 0; \
- for (int i = 0; i < lane_count; i++) { \
- sum += a->get_lane(i); \
- } \
- return *isolate->factory()->NewNumber(sum); \
- }
-
SIMD_INT_TYPES(SIMD_LSL_FUNCTION)
SIMD_UINT_TYPES(SIMD_LSL_FUNCTION)
SIMD_INT_TYPES(SIMD_ASR_FUNCTION)
SIMD_UINT_TYPES(SIMD_LSR_FUNCTION)
-SIMD_UINT_TYPES(SIMD_HORIZONTAL_SUM_FUNCTION)
//-------------------------------------------------------------------
@@ -582,41 +561,6 @@ SIMD_SMALL_INT_TYPES(SIMD_SUB_SATURATE_FUNCTION)
//-------------------------------------------------------------------
-// Small Unsigned int-only functions.
-
-#define SIMD_SMALL_UINT_TYPES(FUNCTION) \
- FUNCTION(Uint16x8, uint16_t, 8, Uint32x4, uint32_t) \
- FUNCTION(Uint8x16, uint8_t, 16, Uint16x8, uint16_t)
-
-#define SIMD_ABS_DIFF_FUNCTION(type, lane_type, lane_count, wide_type, \
- wide_ctype) \
- RUNTIME_FUNCTION(Runtime_##type##AbsoluteDifference) { \
- HandleScope scope(isolate); \
- SIMD_BINARY_OP(type, lane_type, lane_count, AbsoluteDifference, result); \
- return *result; \
- }
-
-#define SIMD_WIDE_ABS_DIFF_FUNCTION(type, lane_type, lane_count, wide_type, \
- wide_ctype) \
- RUNTIME_FUNCTION(Runtime_##type##WidenedAbsoluteDifference) { \
- HandleScope scope(isolate); \
- static const int kLaneCount = lane_count / 2; \
- DCHECK(args.length() == 2); \
- CONVERT_ARG_HANDLE_CHECKED(type, a, 0); \
- CONVERT_ARG_HANDLE_CHECKED(type, b, 1); \
- wide_ctype lanes[kLaneCount]; \
- for (int i = 0; i < kLaneCount; i++) { \
- lanes[i] = AbsoluteDifference(a->get_lane(i), b->get_lane(i)); \
- } \
- Handle<wide_type> result = isolate->factory()->New##wide_type(lanes); \
- return *result; \
- }
-
-SIMD_SMALL_UINT_TYPES(SIMD_ABS_DIFF_FUNCTION)
-SIMD_SMALL_UINT_TYPES(SIMD_WIDE_ABS_DIFF_FUNCTION)
-
-//-------------------------------------------------------------------
-
// Numeric functions.
#define SIMD_NUMERIC_TYPES(FUNCTION) \
« no previous file with comments | « src/runtime/runtime.h ('k') | test/simdjs/testcfg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698