diff options
-rw-r--r-- | Android.bp | 57 | ||||
-rw-r--r-- | METADATA | 19 | ||||
-rw-r--r-- | MODULE_LICENSE_MIT | 0 | ||||
-rw-r--r-- | OWNERS | 11 | ||||
-rw-r--r-- | TEST_MAPPING | 10 | ||||
-rw-r--r-- | jni/Android.mk | 6 | ||||
-rw-r--r-- | jni/Application.mk | 4 |
7 files changed, 97 insertions, 10 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..972b0ab --- /dev/null +++ b/Android.bp @@ -0,0 +1,57 @@ +// Copyright (C) 2020 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +cc_library_headers { + name: "fxdiv_headers", + export_include_dirs: ["include"], + vendor_available: true, + sdk_version: "current", +} + +cc_defaults { + name: "fxdiv_tests_default", + sdk_version: "current", + cflags: [ + "-Wno-missing-field-initializers", + ], + header_libs: [ + "fxdiv_headers", + ], + stl: "libc++_static", + static_libs: [ + "libgmock_ndk", + ] +} + +cc_test { + name: "FxdivMultiplyHighTests", + defaults: ["fxdiv_tests_default"], + srcs: [ + "test/multiply-high.cc", + ], + test_suites: [ + "general-tests", + ], +} + +cc_test { + name: "FxdivQuotientTests", + defaults: ["fxdiv_tests_default"], + srcs: [ + "test/quotient.cc", + ], + test_suites: [ + "general-tests", + ], +} diff --git a/METADATA b/METADATA new file mode 100644 index 0000000..f0b139b --- /dev/null +++ b/METADATA @@ -0,0 +1,19 @@ +name: "FXdiv" +description: "Header-only library for division via fixed-point multiplication by inverse On modern CPUs and GPUs integer division is several times slower than multiplication. FXdiv implements an algorithm to replace an integer division with a multiplication and two shifts. This algorithm improves performance when an application performs repeated divisions by the same divisor." +third_party { + url { + type: HOMEPAGE + value: "https://github.com/Maratyszcza/FXdiv" + } + url { + type: GIT + value: "https://github.com/Maratyszcza/FXdiv" + } + version: "561254d968e5679460e6a0a743206410284d9f46" + license_type: NOTICE + last_upgrade_date { + year: 2020 + month: 4 + day: 13 + } +} diff --git a/MODULE_LICENSE_MIT b/MODULE_LICENSE_MIT new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/MODULE_LICENSE_MIT @@ -0,0 +1,11 @@ +butlermichael@google.com +dgross@google.com +galarragas@google.com +jeanluc@google.com +levp@google.com +maratek@google.com +miaowang@google.com +pszczepaniak@google.com +slavash@google.com +vddang@google.com +xusongw@google.com diff --git a/TEST_MAPPING b/TEST_MAPPING new file mode 100644 index 0000000..4fd4012 --- /dev/null +++ b/TEST_MAPPING @@ -0,0 +1,10 @@ +{ + "presubmit": [ + { + "name": "FxdivMultiplyHighTests" + }, + { + "name": "FxdivQuotientTests" + } + ] +} diff --git a/jni/Android.mk b/jni/Android.mk deleted file mode 100644 index 4e151dc..0000000 --- a/jni/Android.mk +++ /dev/null @@ -1,6 +0,0 @@ -LOCAL_PATH := $(call my-dir)/.. - -include $(CLEAR_VARS) -LOCAL_MODULE := fxdiv -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include -include $(BUILD_STATIC_LIBRARY) diff --git a/jni/Application.mk b/jni/Application.mk deleted file mode 100644 index 0f660e3..0000000 --- a/jni/Application.mk +++ /dev/null @@ -1,4 +0,0 @@ -APP_PLATFORM := android-15 -APP_PIE := true -APP_STL := c++_static -APP_ABI := all |