|
|
|
# Copyright 2018 The Abseil Authors.
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
# https://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.
|
|
|
|
|
|
|
|
load(
|
|
|
|
"//absl:copts/configure_copts.bzl",
|
|
|
|
"ABSL_DEFAULT_COPTS",
|
|
|
|
"ABSL_DEFAULT_LINKOPTS",
|
|
|
|
"ABSL_TEST_COPTS",
|
|
|
|
)
|
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
licenses(["notice"])
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "bits",
|
|
|
|
hdrs = [
|
|
|
|
"bits.h",
|
|
|
|
"internal/bits.h",
|
|
|
|
],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
deps = [
|
|
|
|
"//absl/base:config",
|
|
|
|
"//absl/base:core_headers",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
Export of internal Abseil changes
--
0db7f4046f9b59c0f8c3df2f0eb7fd88fc328439 by Abseil Team <absl-team@google.com>:
Revise documentation of bit_cast:
* Removes inappropriate examples (round-tripping pointers, serialization), for which reinterpret_cast is more appropriate.
* Removes mention of "bit representation", which is not an explicit notion in C++. The best we get is "byte representation".
* Removes a circular defition of "bitcast" as itself, and instead explains what it does.
* Removes the mathism "for some values of", which is probably not totally accessible to a general audience, and in any case needless verbiage.
* Fixes comments in the example.
* Replaces some colloquialisms with simpler, more direct language.
PiperOrigin-RevId: 421791786
--
e04e64df55d93c1b9a09c0483b97cc4d8763260d by Derek Mauro <dmauro@google.com>:
Update Docker image to use GCC 11.2, Clang 14 (prerelease),
CMake 3.22.1, and Bazel 4.2.2
PiperOrigin-RevId: 421658559
--
d002bb3dc5cd1fc5b4cbd79a450efc894caa567c by Chris Kennelly <ckennelly@google.com>:
Add a small microbenchmark for absl::bit_width.
PiperOrigin-RevId: 421604852
--
131b057d1b76ecd7170421b48d661bb958ff676b by Evan Brown <ezb@google.com>:
Adds a disabled test for EBO in nested `CompressedTuple`s.
PiperOrigin-RevId: 421413134
--
e34c7876d3a1212d90c73c030ccae6169b682d43 by Jorg Brown <jorg@google.com>:
Show users a better error message if they pass a pointer to absl::Uniform.
PiperOrigin-RevId: 421090472
GitOrigin-RevId: 0db7f4046f9b59c0f8c3df2f0eb7fd88fc328439
Change-Id: I5a004e8d17e974fa4897a09d1466ae8fc65dfdbb
3 years ago
|
|
|
cc_binary(
|
|
|
|
name = "bits_benchmark",
|
|
|
|
testonly = 1,
|
|
|
|
srcs = ["bits_benchmark.cc"],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
deps = [
|
|
|
|
":bits",
|
|
|
|
"//absl/base:core_headers",
|
|
|
|
"//absl/random",
|
|
|
|
"@com_github_google_benchmark//:benchmark_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "bits_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = [
|
|
|
|
"bits_test.cc",
|
|
|
|
],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
deps = [
|
|
|
|
":bits",
|
|
|
|
"//absl/random",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "int128",
|
|
|
|
srcs = [
|
|
|
|
"int128.cc",
|
|
|
|
"int128_have_intrinsic.inc",
|
|
|
|
"int128_no_intrinsic.inc",
|
|
|
|
],
|
|
|
|
hdrs = ["int128.h"],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
deps = [
|
|
|
|
":bits",
|
|
|
|
"//absl/base:config",
|
|
|
|
"//absl/base:core_headers",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "int128_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = [
|
|
|
|
"int128_stream_test.cc",
|
|
|
|
"int128_test.cc",
|
|
|
|
],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
deps = [
|
|
|
|
":int128",
|
|
|
|
"//absl/base",
|
|
|
|
"//absl/base:core_headers",
|
|
|
|
"//absl/hash:hash_testing",
|
|
|
|
"//absl/meta:type_traits",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "int128_benchmark",
|
|
|
|
srcs = ["int128_benchmark.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
tags = ["benchmark"],
|
|
|
|
deps = [
|
|
|
|
":int128",
|
|
|
|
"//absl/base:config",
|
|
|
|
"@com_github_google_benchmark//:benchmark_main",
|
|
|
|
],
|
|
|
|
)
|
Export of internal Abseil changes
--
e2de21d54c02b6419c57c0f4e2a16b608deca260 by Evan Brown <ezb@google.com>:
Remove the InsertEnd benchmark.
This benchmark has significantly different possible behaviors that can result in misleading metrics. Specifically, we can have a case where we are deallocating the last node in the b-tree in the erase and then allocating a new node in the insert call repeatedly, whereas normally, we end up just inserting/erasing a value from the last node. Also, the name of the benchmark is misleading because it involves an erase and an insert, but the name only mentions the insert.
PiperOrigin-RevId: 360930639
--
51f6bb97b9cbdb809c31b77e93ce080ca3cba9ea by Benjamin Barenblat <bbaren@google.com>:
Stop testing with double-double random variables
On POWER, long double is often represented as a pair of doubles added
together (double-double arithmetic). We’ve already special-cased
double-double arithmetic in a number of tests, but compiler
bugs [1, 2, 3] have now triggered both false positives and false
negatives, which suggests testing with double doubles is unlikely to
yield useful signal. Remove the special casing and detect if we’re on a
double-double system; if so, just don’t test long doubles.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99048
[2] https://bugs.llvm.org/show_bug.cgi?id=49131
[3] https://bugs.llvm.org/show_bug.cgi?id=49132
PiperOrigin-RevId: 360793161
--
07fb4d7932c2f5d711c480f759dacb0be60f975e by Abseil Team <absl-team@google.com>:
internal change
PiperOrigin-RevId: 360712825
GitOrigin-RevId: e2de21d54c02b6419c57c0f4e2a16b608deca260
Change-Id: I98389b5a8789dcc8f35abc00c767e909181665f0
4 years ago
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "representation",
|
|
|
|
hdrs = [
|
|
|
|
"internal/representation.h",
|
|
|
|
],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
deps = [
|
|
|
|
"//absl/base:config",
|
|
|
|
],
|
|
|
|
)
|