Commit graph

281 commits

Author SHA1 Message Date
ahedberg
e41b5b1c8a
Add note at top that this is supported best-effort 2018-12-20 13:51:25 -05:00
Uilian Ries
325cf0d872 #187 Update Conan author
Signed-off-by: Uilian Ries <uilianries@gmail.com>
2018-12-20 09:41:53 -02:00
Uilian Ries
1aa550f840 #187 Add Conan topics
Signed-off-by: Uilian Ries <uilianries@gmail.com>
2018-12-13 08:33:39 -02:00
Uilian Ries
db6a736814 #187 Remove cctz as external dependency
- CCTZ was embedded in absl/time/internal

Signed-off-by: Uilian Ries <uilianries@gmail.com>
2018-12-04 14:41:28 -02:00
Uilian Ries
32930d7bd4 #187 Add Conan recipe
- Add generic Conan recipe

Signed-off-by: Uilian Ries <uilianries@gmail.com>
2018-12-03 17:59:33 -02:00
Abseil Team
926bfeb9ff Export of internal Abseil changes.
--
008301e65c323ea0b78e4a92221bf43f7f01e358 by Abseil Team <absl-team@google.com>:

Add k...Pad17 through 20 PadSpec enum values.

PiperOrigin-RevId: 223371590

--
ad0580b0a215257044e090181630793b7e5e9ab0 by Jon Cohen <cohenjon@google.com>:

Make the table in the prefetch check not fit in L2 cache.  This should help deflake the test.

PiperOrigin-RevId: 223224646

--
77c76690626b89944946d01da5e3428b763103e8 by Abseil Team <absl-team@google.com>:

Fixed typo in container by replacing asbl::Hash with absl::Hash.

PiperOrigin-RevId: 223083789
GitOrigin-RevId: 008301e65c323ea0b78e4a92221bf43f7f01e358
Change-Id: I81399f09cd82fbb27bcfec4c1517bb5d2fd07f3b
2018-11-29 15:52:29 -05:00
Abseil Team
13327debeb Export of internal Abseil changes.
--
15d7bcf28220750db46930f4d8c090b54e3ae5fe by Jon Cohen <cohenjon@google.com>:

Fix miscellaneous CMake change interleaving issues for the daily release:
  * add back the absl::container target
  * Add copts to absl_cc_library targets in absl/container/CMakeLists.txt
  * Add trailing newline to the end of AbseilConfigureCopts.cmake

PiperOrigin-RevId: 223057096

--
baac35470d75b6561477f688dc4eb021f604cf71 by Abseil Team <absl-team@google.com>:

Internal Cleanup.

PiperOrigin-RevId: 223051579

--
6791c2f2e35b030b5579f36d3c607c6ba92fa089 by Abseil Team <absl-team@google.com>:

Internal Change.

PiperOrigin-RevId: 223046855

--
5467ad987ea82aef77d2f1cc85aa9105e7d9c320 by Samuel Benzaquen <sbenza@google.com>:

Workaround for gcc bug https://gcc.gnu.org/PR88115

PiperOrigin-RevId: 223041901

--
36fa5cfd41df2b71d26487c45363901bbf6a2463 by Tom Manshreck <shreck@google.com>:

Clarify visit() constraints

PiperOrigin-RevId: 223032194

--
afdf4013de036b411db7f92cde8a2493e6665223 by Abseil Team <absl-team@google.com>:

Fix comment typos.

PiperOrigin-RevId: 223024090

--
e11c01927eb8b898f6633282824022104b258342 by Jon Cohen <cohenjon@google.com>:

Make absl::spinlock_test_common TESTONLY

This should fix https://github.com/abseil/abseil-cpp/issues/221

PiperOrigin-RevId: 222885323

--
5ccc576d1c68e4b92705aa8064f1e8d715e5415e by Abseil Team <absl-team@google.com>:

Internal change.

PiperOrigin-RevId: 222877017

--
96ff25bf78c4f4bca0d6e61faa4feeab91a2e73c by Jon Cohen <cohenjon@google.com>:

Align CMake and Bazel compile options.  This is the first step towards a single source of truth for Abseil compile options.  Also makes absl_test and absl_cc_test make binaries and targets with compatible names to each other to make testing easier.

PiperOrigin-RevId: 222858408

--
7dd3e2618ad5a5de5d918fc73e438ef0b98cec6a by Abseil Team <absl-team@google.com>:

Revert "absl: cap SpinLock backoff to 4ms"

PiperOrigin-RevId: 222656230

--
0d49538a3cab714156ed0a5651656c0aa098a1e5 by Abseil Team <absl-team@google.com>:

Update absl/container/CMakeLists.txt to use new functions
i.e. absl_cc_(library|test)

PiperOrigin-RevId: 222535766

--
92744e9d0e5c3bf9e1167a7bdf1a6777192531b1 by Abseil Team <absl-team@google.com>:

Disable header parsing for broken targets

PiperOrigin-RevId: 222257218

--
39a6c623601c44e02d91e412f126a813d719507b by Abseil Team <absl-team@google.com>:

absl: cap SpinLock backoff to 4ms

The current backoff logic has 3 problems:
1. It can produce too high values (up to 256ms), which can negatively
affect tail latency. The value was chosen long time ago and now it's
a good idea to reconsider it.
2. It does not have low bound, so on any iteration it can produce
a very small value that will lead to unnecessary cpu consumption.
3. It does not increase low bound with the number of iterations.
So if the SpinLock is actually somehow locked for a very prolonged time,
a waiter can still wake periodically.

Rework the logic to solve these problems.
Add lower bound of 128us, no code should rely on absence of episodic
delays in this range as they can occur everywhere.
Lower upper bound to 4ms. A thread sleeping for 4ms does not consume
significant cpu time (see below).
Grow lower bound with the number of iterations.

This is cpu consumption of a process doing usleep(x) in a loop
(sampled with ps):

    64us -> 4.0%
   128us -> 2.7%
   256us -> 3.5%
   512us -> 2.8%
  1024us -> 1.6%
  2048us -> 0.6%
  4096us -> 0.3%
  8192us -> 0.0%

Few millisecond sleeps do not consume significant time.

PiperOrigin-RevId: 222196086

--
17104a2396ddda61fb0faed0a72ff8c161ca17ea by Shahriar Rouf <nafi@google.com>:

Add benchmarks for hashing civil_times.

PiperOrigin-RevId: 222152108
GitOrigin-RevId: 15d7bcf28220750db46930f4d8c090b54e3ae5fe
Change-Id: I73b929feaf6ce72b70fdafd6108f53bbbeaf9738
2018-11-27 17:37:00 -05:00
Abseil Team
3088e76c59 Export of internal Abseil changes.
--
5278e56bd7d322ecf161eaf29fd7fa3941d7431b by Greg Falcon <gfalcon@google.com>:

internal change

PiperOrigin-RevId: 222078614
GitOrigin-RevId: 5278e56bd7d322ecf161eaf29fd7fa3941d7431b
Change-Id: I1e86bef2e3733c81148a1a42dccd8182fe3f7fae
2018-11-19 15:11:12 -05:00
Abseil Team
f6ae816808 Export of internal Abseil changes.
--
da04b8cd21f6225d71397471474d34a77df0efd6 by Jon Cohen <cohenjon@google.com>:

Don't use std::any, std::optional, std::variant, and friends on MacOS versions older than 10.14.

Although Xcode 10 includes those headers and makes the types available to use, according to https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes, on MacOS 10.13 and earlier use of any functions (std::get, for example) results in an error message to upgrade to MacOS 10.14.

This fixes https://github.com/abseil/abseil-cpp/issues/207.  See that issue for more information on the error generated.

PiperOrigin-RevId: 221844618

--
1d99f77b4c60c5b0d7984f46e8ed63a3f969c635 by Jon Cohen <cohenjon@google.com>:

raw_hash_set_test is still flaky under gcc 4.8.  Since we now have the probe_test, we don't need the PerfectRatio tests.  Just remove them.

PiperOrigin-RevId: 221843042

--
135cbb2a5d90963256518b3b59fe6710815e5dfa by Abseil Team <absl-team@google.com>:

Update absl/algorithm/CMakeLists.txt to use new functions
i.e. absl_cc_(library|test)

PiperOrigin-RevId: 221828348

--
1a5abde4f17f998ae89d87155d59f982a70202d8 by Jon Cohen <cohenjon@google.com>:

Internal change

PiperOrigin-RevId: 221708245

--
e03e031d4de39275989f695c768b0940cce1ff16 by Matt Armstrong <marmstrong@google.com>:

Log to FATAL in throw_delegate.h

ABSL_RAW_LOG(FATAL, ...) is guaranteed to abort.
Previously, the code was logging to ERROR and
calling abort() explicitly, which defeated any
integration with absl::raw_logging_internal::AbortHook().

These changes are limited to Abseil internal APIs.

PiperOrigin-RevId: 221696513

--
d13691523a3f9a5367fd1194cf9604bf4a969029 by Shahriar Rouf <nafi@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 221694877

--
f4044c56d44ba0ac2a9f218ed55f1b1f9e985eae by Abseil Team <absl-team@google.com>:

Update absl/base/CMakeLists.txt to use new functions
i.e. absl_cc_(library|test)

PiperOrigin-RevId: 221676669
GitOrigin-RevId: da04b8cd21f6225d71397471474d34a77df0efd6
Change-Id: If6621e10d096a39b6a056a072c2727a0df0b0620
2018-11-16 16:38:42 -05:00
Abseil Team
a06c4a1d90 Export of internal Abseil changes.
--
5f1ab09522226336830d9ea6ef7276d37f536ac5 by Abseil Team <absl-team@google.com>:

Clarify the documentation of ABSL_MUST_USE_RESULT.

PiperOrigin-RevId: 221663609

--
af4c8359a20d56369fd1dce318220cf3be03ca66 by Greg Falcon <gfalcon@google.com>:

Internal change

PiperOrigin-RevId: 221538448

--
487cd09bd1942bf607080deeae38fee6ce66f294 by Eric Fiselier <ericwf@google.com>:

Work around emscripten bugs and missing features in absl/time:time_test.

The emscripten toolchain has a couple of issues that cause time_test
to fail. Specifically:

1) emscripten doesn't support signals.
2) The javascript implementation of strftime/strptime use different expansions
of '%c' that mean it doesn't round-trip.

PiperOrigin-RevId: 221523701

--
5823652e6a200b97b07334bc47128dfac40e20fc by Xiaoyi Zhang <zhangxy@google.com>:

Fix MSVC compiler warning by explicitly casting to char.
Currently our MSVC build breaks with the following error:
raw_hash_set.h(406): warning C4309: 'argument': truncation of constant value

PiperOrigin-RevId: 221492585

--
c5806358320711a5efbe5c523df13e14ab53a17d by Greg Falcon <gfalcon@google.com>:

Replace calls to getpagesize() with the more portable sysconf(_SC_PAGESIZE); the latter is in POSIX 1.0 and is called out in the Linux `getpagesize` man page as a more portable spelling.

PiperOrigin-RevId: 221492471

--
19ffe82851072229bb7ce73f754ffe4c18e8c575 by Abseil Team <absl-team@google.com>:

Fix -Wundef error in absl/hash/internal/hash.h.

PiperOrigin-RevId: 221444120

--
b30f3d0a848563b6e4ec33f3dc085831dfabb748 by Jon Cohen <cohenjon@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 221339736
GitOrigin-RevId: 5f1ab09522226336830d9ea6ef7276d37f536ac5
Change-Id: I96223d522d98bf6616dea88eb047c2d536eeddd0
2018-11-15 15:05:39 -05:00
Abseil Team
7b46e1d31a Export of internal Abseil changes.
--
07575526242a8e1275ac4223a3d2822795f46569 by CJ Johnson <johnsoncj@google.com>:

Comment cleanup on InlinedVector

PiperOrigin-RevId: 221322176

--
49a5e643f85e34d53c41f5e6cc33357c55c9115d by Matt Kulukundis <kfm@google.com>:

Internal cleanup

PiperOrigin-RevId: 221309185

--
bb35be87ec9c74244b7d902e7e7d2d33ab139d76 by Abseil Team <absl-team@google.com>:

Fix typo in comment.

PiperOrigin-RevId: 221145354

--
afd4d7c106919708004e06aeea068a57c28aec44 by Derek Mauro <dmauro@google.com>:

Update the debugging log message in CallOnceImpl()

PiperOrigin-RevId: 221103254

--
0b9dace8b88113777bf26a6d38f9bc0bcaf053a1 by Abseil Team <absl-team@google.com>:

Workaround an MSVC 2015 bug in compile-time initialization.

PiperOrigin-RevId: 220871483

--
ea0a3854511ed26beab827e5a5113766b334db86 by Marek Gilbert <mcg@google.com>:

Fix ABSL_HAVE_THREAD_LOCAL when compiling for iOS 8 with Xcode 10.

Xcode 10 has moved the check for thread_local to a link time, so
clang reports __has_feature(cxx_thread_local) but then linking fails
with messages like this:

ld: targeted OS version does not support use of thread local variables
PiperOrigin-RevId: 220815885

--
485b6876c158c3dcf37eb32d7e512242d5d4ecc6 by Greg Falcon <gfalcon@google.com>:

Make the absl::c_set_xxxx() algorithms refuse to compile when passed an unordered collection from std:: or absl::.

These algorithms operate on sorted sequences; passing an unordered container to them is nearly certainly a bug.  This change is technically an API break, but it only breaks incorrect code.

We could try to be more clever and detect unordered collections from other libraries, but false positives will break legal code, and this would constitute an API break Abseil cannot afford.

PiperOrigin-RevId: 220794190

--
c47cff7f9cc70a4c1604eee0131af552f40e46d6 by Jon Cohen <cohenjon@google.com>:

MSVC 2017's STL throws a Structured Exception (not a C++ exception, essentially equivalent to SIGSEGV) when variant::emplace calls a throwing constructor when using the debug multithreaded MSVC runtime DLL.  This manifests in dbg mode in Bazel builds.  Disable tests which trigger this bug.

It's impossible to specifically pull out MSVC 2017 -dbg modes because there's no way for Bazel to know when version of MSVC is being used -- you tell Bazel the directory where the MSVC tools live, not which version of MSVC tools to use.  Thus the best we can do is switch on _DEBUG, which is set whenever the debug runtime is selected with the /MDd build flag, as in Bazel -dbg modes.  See https://msdn.microsoft.com/en-us/library/b0084kay.aspx ctrl-f "_DEBUG"

PiperOrigin-RevId: 220706161

--
43993d4af309d92f4ebff38391dcc245f154ecc7 by Shaindel Schwartz <shaindel@google.com>:

Internal change

PiperOrigin-RevId: 220688429

--
2448802972dcc261af153af464f2b022ef54a2a9 by Abseil Team <absl-team@google.com>:

Speed up operator* for uint128 in WIN64.

PiperOrigin-RevId: 220678790

--
7b376403dd05ba10152fb52e40b29d8af79b58bb by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 220654834

--
ae08af58111c3f838b8d4de25f501c3559c86002 by Abseil Team <absl-team@google.com>:

CMake: Add absl_cc_test function

PiperOrigin-RevId: 220603940
GitOrigin-RevId: 07575526242a8e1275ac4223a3d2822795f46569
Change-Id: Iba7f53eb394c8a9de564582a976793f9bb0596d9
2018-11-13 17:56:57 -05:00
Abseil Team
070f6e47b3 Export of internal Abseil changes.
--
178e7a9a76fc8fcd6df6335b59139cbe644a16b9 by Jon Cohen <cohenjon@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 220523164

--
59ef14fe7034a3148f1e9cef1f128b8ca264b444 by Jon Cohen <cohenjon@google.com>:

Don't assume how much std::vector's constructors allocate in InlinedVector's test for scoped_allocator_adaptor support.

PiperOrigin-RevId: 220464683

--
6f8351be43a44a8f10bf20612b2cc744a4a911c7 by Jon Cohen <cohenjon@google.com>:

Add VS Code and some Bazel output files to absl/.gitignore

PiperOrigin-RevId: 220464362

--
43fac22f8af6b6ed55309a784a9d25d837393d0e by Abseil Team <absl-team@google.com>:

absl: fix SpinLock::EncodeWaitCycles

If a thread has ever observed or set kSpinLockSleeper, it must
never leave 0 in kWaitTimeMask because at this point it is
expected to wake subsequent threads. Current calculations in
EncodeWaitCycles can result in 0 in kWaitTimeMask and lead to
missed wakeups. This is mostly theoretical today, because
the futex call needs to finish within 128 cycles (futex can
return immediately without waiting, but 128 cycles still
look too low for this). But this can well fire in future
if we bump granularity and/or threshold for recording contention.

Use kSpinLockSleeper instead of 0.

PiperOrigin-RevId: 220463123

--
def9b7e3d45c99d68cc52a4429256116d7f421f2 by Abseil Team <absl-team@google.com>:

absl: optimize SpinLock::SlowLock

Currently we record contention even after the first initial spin.
This leads to several performance issues:
1. If we succeed in acquiring the lock after the initial spin,
overall wait time can be within tens/hundreds of nanoseconds.
Recording such low wait time looks completely unnecessary and excessive.
From some point of view this is not even a wait, because we did not sleep.
And, for example, Mutex does not record contention in this case.
In majority of cases the lock should be acquired exactly during the initial
spin, yet we still go through full overhead of submitting contention.
2. Whenever a thread submits contention it also calls FUTEX_WAKE
(there is no way to understand if it's necessary or not when wait value
is stored in the lock). So if there are just 2 threads and a brief
contention, the second thread will still call FUTEX_WAKE which
is completely unnecessary overhead.

Don't record contention after the initial spin wait.

FWIW this also removes 2 CycleClock::Now calls and EncodeWaitCycles
from the common hot path.

PiperOrigin-RevId: 220379972

--
75b0c0cb214de904ea622f81ec3f4eabdc8695b0 by Derek Mauro <dmauro@google.com>:

Supress MSVC warnings in raw_hash_set's use of TrailingZeros and LeadingZeros.
https://github.com/abseil/abseil-cpp/issues/208

PiperOrigin-RevId: 220372204
GitOrigin-RevId: 178e7a9a76fc8fcd6df6335b59139cbe644a16b9
Change-Id: I3a66af4e050810a3274e45d4e055b2aa19ffba1b
2018-11-07 16:54:23 -05:00
Abseil Team
7990fd459e Export of internal Abseil changes.
--
ee19e203eca970ff88e8f25ce4e19c32e143b988 by Jon Cohen <cohenjon@google.com>:

Exception safety testing no longer uses absl::optional

PiperOrigin-RevId: 220336204

--
460666eb0b316a8b4aeedc589644d53b05251bd1 by Derek Mauro <dmauro@google.com>:

Rework SwissTable SSE2 support
  - Use SSE2 on MSVC when available
    https://github.com/abseil/abseil-cpp/issues/210
  - Emulate _mm_cmpgt_epi8 with other SSE2 instructions when using
    -funsigned-char under GCC
    https://github.com/abseil/abseil-cpp/issues/209

PiperOrigin-RevId: 220312351

--
1f4318ecedf8d539b7b698eb803d613ad6b69278 by Abseil Team <absl-team@google.com>:

Change CollectPerfectRatios to use 10 trials to smooth out the outliers in the
sample.

PiperOrigin-RevId: 220286579

--
6755abc2673553a7f578bb29c6e9ca8d991bc9c8 by Abseil Team <absl-team@google.com>:

Internal change

PiperOrigin-RevId: 220274307

--
8645b6187329ebf0aaf3c2de2888ba44466cd879 by Abseil Team <absl-team@google.com>:

* #endif for a header guard should reference the guard macro in a comment

PiperOrigin-RevId: 220206868

--
3987a7ad11319230910931cd2468b60b3fd1b85c by Gennadiy Civil <misterg@google.com>:

Internal Change

PiperOrigin-RevId: 220136674

--
cc908c1db2ee0d4523dc813e33f600583bb986c5 by Abseil Team <absl-team@google.com>:

absl: fix backoff logic in SpinLockWait

There are 3 bugs in loop variable handling:
1. It starts with 0, but AbslInternalSpinLockDelay ignores loop == 0.
So it does not actually wait when it should.
2. loop is incremented after successful state changes,
but it should not (why would be increase backoff delay after that?).
3. loop is incremented after CAS failures,
but it should not (why would be increase backoff delay after that?).

Use the same handling of loop as used in SpinLock.

PiperOrigin-RevId: 220136079

--
a0a1c6ef5910ebd28e07215d7df03cc0da0b3eed by Abseil Team <absl-team@google.com>:

absl: relax unnecessarily strong memory ordering in SpinLock::SlowLock

We don't need to acquire visibility over anything when setting kSpinLockSleeper.
Replace the confusing and unnecessarily strong memory order with relaxed.

PiperOrigin-RevId: 220023380

--
c50858b51af28b9fca1a62616324f85f3e84ea74 by Tom Manshreck <shreck@google.com>:

Update comments in flat_hash_map, node_hash_{set, map} and the containers developer guide

PiperOrigin-RevId: 219938692

--
e87b7d1a5f61e165b1c44d3b16d8d967197cdfce by CJ Johnson <johnsoncj@google.com>:

Rearranges the public methods of InlinedVector and cleans up the comments

PiperOrigin-RevId: 219896257

--
f3234c466f792e0fc4bfd21fc7919dba5e679375 by CJ Johnson <johnsoncj@google.com>:

Adds branch prediction to exceptional early exit cases of inlined vector's API

PiperOrigin-RevId: 219887173

--
4dfccf1a81ca0425912d3da25a8470f78c532ce4 by CJ Johnson <johnsoncj@google.com>:

Fixes the InlinedVector public interface to use the allocator type references instead of assuming the type
Also cleans up some cruft in formatting and comments

PiperOrigin-RevId: 219878876

--
4bb6a2b892abb10bd6a424db7e94ed8640802470 by Tom Manshreck <shreck@google.com>:

Add comments on constructor and assignment operator support to flat_hash_set

PiperOrigin-RevId: 219825338

--
c23f973e2f7f4feea0da36bf8a9c3f8a8954bb74 by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 219823847
GitOrigin-RevId: ee19e203eca970ff88e8f25ce4e19c32e143b988
Change-Id: I288c927ca481dc57340420dbb4c278a05cf15e83
2018-11-06 16:06:39 -05:00
Abseil Team
f95179062e Export of internal Abseil changes.
--
4e224c85c3730398919fc5195cb1fc7a752e6e4f by Mark Barolak <mbar@google.com>:

Update some references to "StringPiece" to say "string_view" instead.

PiperOrigin-RevId: 219693697

--
6bdc925a3db5e97f1f8a404bdfda2e47e48f7b9a by Abseil Team <absl-team@google.com>:

Disable weak symbols for the Windows backend of LLVM, since they are currently buggy. See https://bugs.llvm.org/show_bug.cgi?id=37598 for more information.

PiperOrigin-RevId: 219676493

--
5823f495036181191f435efa4c45d60ca3160145 by Derek Mauro <dmauro@google.com>:

Don't use the SSE2 implementation of container_internal::Group
with -funsigned-char under GCC.

This is a workaround for https://github.com/abseil/abseil-cpp/issues/209.

_mm_cmpgt_epi8 is broken under GCC with -funsigned-char.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87853

PiperOrigin-RevId: 219666066
GitOrigin-RevId: 4e224c85c3730398919fc5195cb1fc7a752e6e4f
Change-Id: I2f115d0256576cf476ae73a9464c21d4106a2a56
2018-11-02 12:35:09 -04:00
Abseil Team
cc8dcd307b Export of internal Abseil changes.
--
9e8aa654630015ea8221703b0ea10dd1a47a848f by Abseil Team <absl-team@google.com>:

Fix typo

PiperOrigin-RevId: 219474910

--
b1621572fb5a326642766f9f0f16abc3620dd6e8 by Xiaoyi Zhang <zhangxy@google.com>:

Applies https://github.com/abseil/abseil-cpp/pull/194 to fix raw_hash_map
build issues for Windows VS 15.8.

PiperOrigin-RevId: 219473484

--
a61df296bc5449261c6deccb6410df83d560d210 by Jon Cohen <cohenjon@google.com>:

Remove reference to ABSL_COMPILE_CXXFLAGS in our cmakelists files.  It wasn't used, but we will soon instead use an INERFACE target with target_compile_options for the compile options needed for Abseil.

PiperOrigin-RevId: 219352641

--
0d9536a26c03229df3e782e78a8211e450259af2 by Abseil Team <absl-team@google.com>:

Add missing dependencies on base:core_headers

PiperOrigin-RevId: 219320098

--
5693e836e4ec4ce23315f3a7846c12c64cf3d5ab by Abseil Team <absl-team@google.com>:

Remove dynamic_annotations from core_headers, and add core_headers to CMakeLists.

PiperOrigin-RevId: 219306959
GitOrigin-RevId: 9e8aa654630015ea8221703b0ea10dd1a47a848f
Change-Id: Ie52b9fa7ab1285b6846ceea5503caf744e7303d8
2018-10-31 11:12:18 -04:00
Xiaoyi Zhang
a705aa78dc
Merge pull request #194 from Mizux/windows
absl::container Windows VS 15.8 (fix #192)
2018-10-31 10:34:05 -04:00
Abseil Team
a4c3ffff11 Export of internal Abseil changes.
--
ba4dd47492748bd630462eb68b7959037fc6a11a by Abseil Team <absl-team@google.com>:

Work around nvcc 9.0 compiler bug for open-source Tensorflow build.

With the current implementation, when I (unintentionally and transitively)
include absl/types/optional.h in a CUDA compilation unit, I get the following
nvcc error message:
  INFO: From Compiling tensorflow/core/kernels/crop_and_resize_op_gpu.cu.cc:
  external/com_google_absl/absl/types/optional.h: In member function 'void absl::optional_internal::optional_data_dtor_base<T, <anonymous> >::destruct()':
  external/com_google_absl/absl/types/optional.h:185:50: error: '__T0' was not declared in this scope
         data_.~T();

I've also seen similar compilation failures online, for flat_hash_map:
https://devtalk.nvidia.com/default/topic/1042599/nvcc-preprocessor-bug-causes-compilation-failure/

The bug is always around unnamed template parameters. Therefore, the workaround is to make them named.

PiperOrigin-RevId: 219208288

--
dad2f40cb2e8d5017660985ef6fb57f3c3cdcc80 by CJ Johnson <johnsoncj@google.com>:

Adds internal macros for catching and throwing unknown exception types

PiperOrigin-RevId: 219207362

--
0a9840328d2d86e8420b853435fdbf1f7a19d931 by Abseil Team <absl-team@google.com>:

Fix typo in mutex.h comments.

PiperOrigin-RevId: 219199397

--
0d576dc7597564210bfdf91518075064756f0bf4 by Matt Calabrese <calabrese@google.com>:

Internal change.

PiperOrigin-RevId: 219185475

--
66be156095571959fb19a76da8ad0b53ec37658e by Abseil Team <absl-team@google.com>:

Fix alignment conformance for VS 2017 >= 15.8 (fix #193)

PiperOrigin-RevId: 219129894

--
a6e1825a12587945f8194677ccfdcaba6f7aad1d by Abseil Team <absl-team@google.com>:

Reapply PR #173

PiperOrigin-RevId: 219129361

--
cf72ade4881b25acc6ccaea468f69793a0fdce32 by Abseil Team <absl-team@google.com>:

Update .gitignore

PiperOrigin-RevId: 219127495

--
0537490c6348a2cb489abe15638928ac5aa6982a by Jon Cohen <cohenjon@google.com>:

Small refactor and reformat of error messages from the exception safety test framework.

PiperOrigin-RevId: 218927773

--
4c556ca45fa25698ad12002a00c713aeceefab73 by CJ Johnson <johnsoncj@google.com>:

Updates the inlined vector swap tests to check for number of moves that took place if available

PiperOrigin-RevId: 218900777

--
dcbfda0021a1e6dfa9586986b1269c06ec394053 by Mark Barolak <mbar@google.com>:

Add parens around calls to std::numeric_limits<>::min and
std::numeric_limits<>::max to prevent compilation errors on Windows platforms
where min and max are defined as macros.

PiperOrigin-RevId: 218888700
GitOrigin-RevId: ba4dd47492748bd630462eb68b7959037fc6a11a
Change-Id: I0e393958eb8cb501b85f6114979f6d4d86ed996c
2018-10-30 11:19:34 -04:00
Matt Calabrese
0117457865
Merge pull request #201 from ccawley2011/fix-byteswap
Fix compilation of generic byteswap routines
2018-10-30 11:03:01 -04:00
Abseil Team
f86f941385 Export of internal Abseil changes.
--
dabd5614eec687a27bcba28e1d98e84ce716f281 by Abseil Team <absl-team@google.com>:

Demonstrate that std::bitset is supported by AbslHash, both with a comment and
a test.

PiperOrigin-RevId: 218782040
GitOrigin-RevId: dabd5614eec687a27bcba28e1d98e84ce716f281
Change-Id: I777d5e030ba8c6b8a2a353e29ace87484caa811f
2018-10-26 14:43:39 -04:00
Cameron Cawley
297e77fb90 Fix compilation of generic byteswap routines 2018-10-25 23:22:02 +01:00
Abseil Team
94c298e2a0 Export of internal Abseil changes.
--
441d1aa02483cdc510eb2fef012b31384fd8e3a6 by Eric Fiselier <ericwf@google.com>:

Fix str_format with non-POSIX libc implementations.

PiperOrigin-RevId: 218441122

--
da6190130e74222af6eb161a5593364341370370 by Jon Cohen <cohenjon@google.com>:

Refactor ExceptionSafetyTester::Test in order to remove the levels of indirection related to unpacking tuples.

PiperOrigin-RevId: 218403355
GitOrigin-RevId: 441d1aa02483cdc510eb2fef012b31384fd8e3a6
Change-Id: I6f6b978eb96fe261e8ee41ecdce185e5356a601d
2018-10-24 16:47:28 -04:00
Ashley Hedberg
8efc526087 Fix merge conflicts between GitHub and internal mirror.
Change-Id: Icd7c4e7d1fdf3557cd286c7686ebb1957ebeadca
2018-10-24 09:32:39 -04:00
Abseil Team
0884a6a04e Export of internal Abseil changes.
--
fe689b30f9a3a614e8a577997cc340043d01c2f1 by Abseil Team <absl-team@google.com>:

Change arm32 linux backtrace to use the generic implementation.

PiperOrigin-RevId: 218386158

--
86f8678d055d32edc989e6a4d1dc49c3a15cd350 by Abseil Team <absl-team@google.com>:

Update documentation on SHARED_LOCKS_REQUIRED and EXCLUSIVE_LOCKS_REQUIRED so that users know the differences between them.

PiperOrigin-RevId: 218365545

--
22947b48ce4a1ba71ad4794f762235dac3a1df12 by Greg Falcon <gfalcon@google.com>:

The from_chars implementation incorrectly assumed `uint32_t` was `unsigned int`.

`strings_internal::BigUnsigned` had `uint32_t` and `uint64_t` constructors; when both of these types differ from `unsigned int`, `BigUnsigned(1u)` is ambiguous (neither conversion is better).

Fix this by removing the `uint32_t` constructor.  When the `uint64_t` constructor is called with a literal or type that is 32 bits or narrower, the compiler is smart enough to optimize away the two-word case, so this fix is free.

PiperOrigin-RevId: 218346935

--
7201ab430bb90ca0e30b102915d02564f61353eb by Abseil Team <absl-team@google.com>:

Fix formatting errors discovered during merge conflict.

PiperOrigin-RevId: 218229891
GitOrigin-RevId: fe689b30f9a3a614e8a577997cc340043d01c2f1
Change-Id: I5d382482ad227d48ffe57b243ce11b1eb44a1314
2018-10-23 15:52:40 -04:00
Ashley Hedberg
c476da141c Export of internal Abseil changes.
--
4e043a11b4c10a24e84046827ee16f47e11e35cc by Abseil Team <absl-team@google.com>:

Merge of https://github.com/abseil/abseil-cpp/pull/136

PiperOrigin-RevId: 218197648

--
e61f06e1e601061a443feaa8c5207c52437bd641 by Abseil Team <absl-team@google.com>:

Don't include <iostream> into int128, it's wasteful

Including iostream emits a global constructor for initializing std::cout and
friends, which isn't actually used by this file.

PiperOrigin-RevId: 218156386

--
8a6c82396e4c956be7f285328aec131cb4965f16 by Xiaoyi Zhang <zhangxy@google.com>:

Fix MSVC compiler warnings on discarding return values of functions with 'nodiscard'
attribute.

PiperOrigin-RevId: 217883401

--
abf3e3a0f22bc4070df9dbc9a4ef4d883ed686bf by Tom Manshreck <shreck@google.com>:

Update public README to add new libraries

PiperOrigin-RevId: 217879399

--
43b3b420a4e861711abbfbd497b8f2b3de17ec8c by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 217780963

--
1c8831947ca6a65a63842e6bd5f37a7c102a4e1b by Abseil Team <absl-team@google.com>:

Fix typo in a comment (missing comma in usage example).

PiperOrigin-RevId: 217776645
GitOrigin-RevId: 4e043a11b4c10a24e84046827ee16f47e11e35cc
Change-Id: I8999ae928da7a0030b4ecfd8d13da8522fdd013a
2018-10-22 16:54:51 -04:00
Abseil Team
c16d5557cd Export of internal Abseil changes.
--
4e043a11b4c10a24e84046827ee16f47e11e35cc by Abseil Team <absl-team@google.com>:

Merge of https://github.com/abseil/abseil-cpp/pull/136

PiperOrigin-RevId: 218197648

--
e61f06e1e601061a443feaa8c5207c52437bd641 by Abseil Team <absl-team@google.com>:

Don't include <iostream> into int128, it's wasteful

Including iostream emits a global constructor for initializing std::cout and
friends, which isn't actually used by this file.

PiperOrigin-RevId: 218156386

--
8a6c82396e4c956be7f285328aec131cb4965f16 by Xiaoyi Zhang <zhangxy@google.com>:

Fix MSVC compiler warnings on discarding return values of functions with 'nodiscard'
attribute.

PiperOrigin-RevId: 217883401

--
abf3e3a0f22bc4070df9dbc9a4ef4d883ed686bf by Tom Manshreck <shreck@google.com>:

Update public README to add new libraries

PiperOrigin-RevId: 217879399

--
43b3b420a4e861711abbfbd497b8f2b3de17ec8c by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 217780963

--
1c8831947ca6a65a63842e6bd5f37a7c102a4e1b by Abseil Team <absl-team@google.com>:

Fix typo in a comment (missing comma in usage example).

PiperOrigin-RevId: 217776645
GitOrigin-RevId: 4e043a11b4c10a24e84046827ee16f47e11e35cc
Change-Id: I8999ae928da7a0030b4ecfd8d13da8522fdd013a
2018-10-22 15:01:16 -04:00
ahedberg
5fbde92571
Merge pull request #136 from rongjiecomputer/cc_library
[CMake] Implement absl_cc_library as Bazel's cc_library
2018-10-22 13:10:23 -04:00
Corentin Le Molgat
26da89db3e Fix absl::container on VS2017 v15.8 (#192) 2018-10-19 08:29:59 +02:00
Abseil Team
45221ccc4e Export of internal Abseil changes.
--
f6241e6923d4d1525d3ec54bc5b85178b18612e9 by Derek Mauro <dmauro@google.com>:

Make implicit_cast constexpr.
GitHub #191

PiperOrigin-RevId: 217726953
GitOrigin-RevId: f6241e6923d4d1525d3ec54bc5b85178b18612e9
Change-Id: I46e4d92cbd54a38bfe5faeb939cf19d871d8b697
2018-10-18 16:51:00 -04:00
Abseil Team
2019e17a52 Export of internal Abseil changes.
--
578b3ed641b8d92769a34d73389dfff5559925e6 by Abseil Team <absl-team@google.com>:

Prevents tail call optimization for
GetStackFrames[WithContext]/GetStackTrace[WithContext] functions, so the
skipped frames will not change because of optimization difference.

PiperOrigin-RevId: 217342437

--
31fad1337e146a6ec74ae887d95920373e36c8dd by Abseil Team <absl-team@google.com>:

Fixed syntax on flat_hash_set documentation for insert.

PiperOrigin-RevId: 217208659
GitOrigin-RevId: 578b3ed641b8d92769a34d73389dfff5559925e6
Change-Id: I121c42861e8321ab561326978ac8972c68f066d0
2018-10-17 16:27:44 -04:00
Abseil Team
5b70a8910b Export of internal Abseil changes.
--
f4e870453d02106c2685e0461816469a4704ad25 by Abseil Team <absl-team@google.com>:

Expose TimeZone::NextTransition() and PrevTransition() now that
we have absl::CivilSecond support in time.h.  Note that these are
for informational purposes only.  General time code should not
care when offset changes occur.

PiperOrigin-RevId: 217177292

--
cfadd275c7333f7c27c4d682b9d167010d874e69 by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 217153577

--
6ff5b8c61a1239b9c0478a7c62bcd2844b310307 by Jon Cohen <cohenjon@google.com>:

Fix code examples in hash_testing.h.  Includes random clang-format changes.

PiperOrigin-RevId: 216898995

--
de124129d27f4627dabe193a10bf106a11783fba by Shaindel Schwartz <shaindel@google.com>:

Add contribution guidelines describing how we decide whether to include an API in Abseil.

PiperOrigin-RevId: 216886943
GitOrigin-RevId: f4e870453d02106c2685e0461816469a4704ad25
Change-Id: Ib9c6706f5bf931b71c0357bf1342053a3bee8ff7
2018-10-15 15:32:46 -04:00
Loo Rong Jie
bd2d9a4207 Update TESONLY comment 2018-10-13 07:42:05 +08:00
Abseil Team
a00bdd176d Export of internal Abseil changes.
--
fa894a667a3bebbe479539c8d5e829beebf36c27 by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 216855907

--
59e0a42fa9045eb164573b82ce625248bd9999f3 by Jon Cohen <cohenjon@google.com>:

Some edits to the documentation for absl::Hash as I was reading through it.

Itemized changes:
  * implement -> implements for grammar
  * Fix an incomplete sentence
  * specify *any* type T as opposed to *a* type T ? this is just the language I tend to see for these sorts of concepts in math and makes it more clear that we?re talking about a set of all types T satisfying these constraints
  * add arguments to comine() and combine_contiguous() ? this was mostly because for hash_continuous there was a reference to `size` elements without any mention of what `size` was.

PiperOrigin-RevId: 216766923

--
c2a744d0f70ec5a079c22502b7a7ca72805a29dc by Shaindel Schwartz <shaindel@google.com>:

Remove unneeded include.

PiperOrigin-RevId: 216703710

--
ad22fc4e3d236f7bd354b61e0fa37ea524a7cf5e by Shaindel Schwartz <shaindel@google.com>:

Fix typos.

PiperOrigin-RevId: 216699071
GitOrigin-RevId: fa894a667a3bebbe479539c8d5e829beebf36c27
Change-Id: I35c8d8be66043aad9f17bbb867e69acb770bd1b0
2018-10-12 10:26:45 -04:00
Loo Rong Jie
dadcd56b4b Use target_sources and remove one non-existent file 2018-10-11 17:20:05 +08:00
Abseil Team
f340f773ed Export of internal Abseil changes.
--
906c47420646d510edd2479d5542c56f5fa31b65 by CJ Johnson <johnsoncj@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 216573923

--
74560d4afd2b605909e677c6fc3076049fb3010a by Eric Fiselier <ericwf@google.com>:

Avoid -Wformat-pedantic in benchmark.

PiperOrigin-RevId: 216523769

--
9bcc9da8b03e6d1ea43ee78931256c5541cb9686 by Eric Fiselier <ericwf@google.com>:

Delete unused CityHash functions.

PiperOrigin-RevId: 216464492

--
a42563b394c89fbb4c55cb5a6a5edbf96d271eea by Abseil Team <absl-team@google.com>:

Introduce new Abseil interfaces for converting between civil
times and absolute times.s

Deprecates absl::ConvertDateTime() and absl::FromDateTime().

PiperOrigin-RevId: 216424948

--
088e11235124267517d7f137854fa5554679c24f by Eric Fiselier <ericwf@google.com>:

Remove unneeded break statements in test.

PiperOrigin-RevId: 216403321
GitOrigin-RevId: 906c47420646d510edd2479d5542c56f5fa31b65
Change-Id: Idb44420be623e369c66f5a9c92bdc9ab46d3ec92
2018-10-10 15:35:19 -04:00
Loo Rong Jie
f59e0f1d08 Update comments too 2018-10-10 23:20:24 +08:00
Loo Rong Jie
fc2185a7f4 Use absl_ prefix for public target 2018-10-10 23:15:55 +08:00
Abseil Team
445998d7ac Export of internal Abseil changes.
--
714347c156cfe01575c1830a92bc6dea3030065b by Emma Christie <emmachristie@google.com>:

Release absl::EqualsIgnoreCase

PiperOrigin-RevId: 216243900

--
688106e2b9d2924799d597682690851cfba87818 by Abseil Team <absl-team@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 216208373

--
53638e4da238b230af0e56dc31b9fb790e708f36 by Emma Christie <emmachristie@google.com>:

Update StartsWithIgnoreCase(), EndsWithIgnoreCase(), and EqualsIgnoreCase() headers to say that these functions only consider ASCII case inputs.

PiperOrigin-RevId: 215930962
GitOrigin-RevId: 714347c156cfe01575c1830a92bc6dea3030065b
Change-Id: I7fb3506234185b1a961e0110c1f8302ffe7228fa
2018-10-09 15:36:40 -04:00
Loo Rong Jie
a76ceed6f6 Add comment and todo 2018-10-09 23:36:24 +08:00
Loo Rong Jie
6b16ba047a Convert VISIBILITY_PUBLIC to PUBLIC 2018-10-09 23:33:48 +08:00
Loo Rong Jie
67058cbbe6 Fix one comment 2018-10-09 23:33:48 +08:00
Loo Rong Jie
1ecb60be39 Set default prefix to absl_internal_ 2018-10-09 23:33:47 +08:00
Loo Rong Jie
f1c17a303a Revert migration for //absl/strings/... 2018-10-09 23:33:46 +08:00
Loo Rong Jie
73b908fbcf Migrate some internal base targets 2018-10-09 23:33:45 +08:00
Loo Rong Jie
027ebfdb8f Use ABSL_RUN_TESTS instead of BUILD_TESTING 2018-10-09 23:33:45 +08:00
Loo Rong Jie
fcc476cce5 Implement header-only target as INTERFACE lib 2018-10-09 23:33:44 +08:00
Loo Rong Jie
ac533e18db [CMake] Implement absl_cc_library as Bazel's cc_library
cc_library
2018-10-09 23:33:44 +08:00
Abseil Team
e821380d69 Export of internal Abseil changes.
--
e09635c907d471ab46e14fb8091988c92cb4e78e by Abseil Team <absl-team@google.com>:

Fix syntax error in documentation '}' -> ')'

PiperOrigin-RevId: 215744854

--
a9e2d036850748137355f4a07083f1052d5c3766 by Abseil Team <absl-team@google.com>:

WrapUnique's comment about avoiding explicit template specification
doesn't make clear what alternative there is when this hurts
readability. Add a comment about the approved alternative.

PiperOrigin-RevId: 215634917

--
596b8ff41ff70b27bff3a2369038c0fe7d13ae85 by Greg Falcon <gfalcon@google.com>:

Allow for a small amount of slop in timeout tests, as not all OSs we support give us the perfect timing behavior we're testing for here.

PiperOrigin-RevId: 215615172
GitOrigin-RevId: e09635c907d471ab46e14fb8091988c92cb4e78e
Change-Id: I30721294bac86510a49bb7f405149fc74c532abb
2018-10-05 10:53:08 -04:00
Abseil Team
f21d187b80 Export of internal Abseil changes.
--
1c1d6e2404dfc6caa022b335df5acdac6da50fe1 by Derek Mauro <dmauro@google.com>:

Fix the internal namespacing in unaligned_access.h

PiperOrigin-RevId: 215434506

--
17d4400aebf025a230690fc1c7a968ef8d85bbba by Eric Fiselier <ericwf@google.com>:

gtest depends on the GCC extension allowing variadic macros
to be passed a empty parameter pack for ..., but LLVM diagnoses
this as a GNU extension.

This patch suppresses the warning when building the absl tests.

PiperOrigin-RevId: 215426161

--
f2c49dde23a9f445b9de963f1bbe840ebb568b30 by Eric Fiselier <ericwf@google.com>:

Use EXPECT_DEATH_IF_SUPPORTED instead of EXPECT_DEATH.

This avoids breaking the test when gtest doesn't support
death tests.

PiperOrigin-RevId: 215423849

--
cd687c1e121709603f4fc3726b534f6a9c52cc89 by Eric Fiselier <ericwf@google.com>:

Disable LLVM's -Wmissing-variable-declarations in tests.

GCC's configuration already disables this via -Wno-missing-declarations,
this change makes LLVM do the same.

The warning would otherwise flag most tests which use ABSL_FLAG.

PiperOrigin-RevId: 215407429

--
d14098824c84e3a8c8f6fb920e0335fb48fe2010 by Eric Fiselier <ericwf@google.com>:

Fix local variable shadowing in city hash implementation.

PiperOrigin-RevId: 215407249

--
4b5e140ba743f0d231790a26c49083abb4329e2c by Abseil Team <absl-team@google.com>:

Make raw_hash_set::reserve 2X fast when reserve doesn't do any allocation.
Make raw_hash_set::reserve ~1% faster when reserve does some (128~4k) allocation.

PiperOrigin-RevId: 215348727

--
461161e65e04b801480aa117af2534c594654ccf by Eric Fiselier <ericwf@google.com>:

Internal change

PiperOrigin-RevId: 215272283

--
50413ae31ad3d3a177257416acd8ede47a17bff2 by Eric Fiselier <ericwf@google.com>:

Internal Change

PiperOrigin-RevId: 215233183

--
477be54c43d61019a8fe4e190e340eb52737d383 by Abseil Team <absl-team@google.com>:

Clarify misleading comment on ABSL_ATTRIBUTE_UNUSED

PiperOrigin-RevId: 215185496

--
2cafa2b5287507d3a946682aee9ab13af6d471c9 by Matt Kulukundis <kfm@google.com>:

Add support for absl::Hash to various absl in types.

PiperOrigin-RevId: 215039569

--
082248901991aa3d29be0ea3689c7f213cf0fd83 by Derek Mauro <dmauro@google.com>:

Remove an instance of HAS_GLOBAL_STRING from hash_function_defaults.h

PiperOrigin-RevId: 214989094

--
b929f61907f0786a6133e3a9d7287e339c0a0acb by Derek Mauro <dmauro@google.com>:

Internal import of Github #174
Fix code snippet in comment
https://github.com/abseil/abseil-cpp/pull/174

PiperOrigin-RevId: 214958849

--
f2c5e829eca11c352e121f56eefbf87083305023 by Derek Mauro <dmauro@google.com>:

Internal import of GitHub #173
Fix CMake build for absl::container.
https://github.com/abseil/abseil-cpp/pull/173

PiperOrigin-RevId: 214957796

--
d704f860f9fddafb99e34e6c5032e49f73874e10 by Abseil Team <absl-team@google.com>:

Internal change

PiperOrigin-RevId: 214828181
GitOrigin-RevId: 1c1d6e2404dfc6caa022b335df5acdac6da50fe1
Change-Id: I551de2b1ba0cbaf6856cd5959358cf6651179dea
2018-10-03 09:19:28 -04:00
Loo Rong Jie
5441bbe1db Fix code snippet in comment (#174) 2018-09-28 13:41:11 -04:00
Stephan Dollberg
5aae0cffae Fix CMake build (#173)
* Fix CMake build after Swissmap addition

`absl::container` library now contains source files so needs to be
respectively built for CMake as well.

Switches `absl::container` from being a header library to a source
library.

* Add raw_hash_set_test to CMake test build
2018-09-28 13:35:51 -04:00