aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2020-02-10 15:08:18 -0800
committerMiao Wang <miaowang@google.com>2020-02-11 15:58:38 -0800
commit320f701e6eaddc006056e12dc0cff563426e4cdc (patch)
treec4c16e82d07bcfb917864111f3dad01a207e9e6c
parent7f095bd9d3a56c960dcf247c8a5a029ded1eb2d1 (diff)
downloadFXdiv-320f701e6eaddc006056e12dc0cff563426e4cdc.tar.gz
Add build files and meta data files
Bug: 148796256 Test: mm Change-Id: I4ec4c302e5235990b8322032718ead9e61c71cea
-rw-r--r--Android.bp57
-rw-r--r--METADATA23
-rw-r--r--MODULE_LICENSE_MIT0
l---------NOTICE1
-rw-r--r--TEST_MAPPING10
-rw-r--r--jni/Android.mk6
-rw-r--r--jni/Application.mk4
7 files changed, 91 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..8360525
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,23 @@
+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: "fd804a929fc64be9e40ee58bb51ed9f9cac98244"
+ last_upgrade_date { year: 2020 month: 2 day: 3 }
+ license_type: NOTICE
+}
diff --git a/MODULE_LICENSE_MIT b/MODULE_LICENSE_MIT
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_MIT
diff --git a/NOTICE b/NOTICE
new file mode 120000
index 0000000..7a694c9
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1 @@
+LICENSE \ No newline at end of file
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