• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2018 The Abseil Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15load(
16    "//absl:copts/configure_copts.bzl",
17    "ABSL_DEFAULT_COPTS",
18    "ABSL_DEFAULT_LINKOPTS",
19    "ABSL_TEST_COPTS",
20)
21
22package(default_visibility = ["//visibility:public"])
23
24licenses(["notice"])
25
26cc_library(
27    name = "bits",
28    hdrs = [
29        "bits.h",
30        "internal/bits.h",
31    ],
32    copts = ABSL_DEFAULT_COPTS,
33    linkopts = ABSL_DEFAULT_LINKOPTS,
34    deps = [
35        "//absl/base:config",
36        "//absl/base:core_headers",
37    ],
38)
39
40cc_test(
41    name = "bits_test",
42    size = "small",
43    srcs = [
44        "bits_test.cc",
45    ],
46    copts = ABSL_TEST_COPTS,
47    linkopts = ABSL_DEFAULT_LINKOPTS,
48    deps = [
49        ":bits",
50        "//absl/random",
51        "@com_google_googletest//:gtest_main",
52    ],
53)
54
55cc_library(
56    name = "int128",
57    srcs = [
58        "int128.cc",
59        "int128_have_intrinsic.inc",
60        "int128_no_intrinsic.inc",
61    ],
62    hdrs = ["int128.h"],
63    copts = ABSL_DEFAULT_COPTS,
64    linkopts = ABSL_DEFAULT_LINKOPTS,
65    deps = [
66        ":bits",
67        "//absl/base:config",
68        "//absl/base:core_headers",
69    ],
70)
71
72cc_test(
73    name = "int128_test",
74    size = "small",
75    srcs = [
76        "int128_stream_test.cc",
77        "int128_test.cc",
78    ],
79    copts = ABSL_TEST_COPTS,
80    linkopts = ABSL_DEFAULT_LINKOPTS,
81    deps = [
82        ":int128",
83        "//absl/base",
84        "//absl/base:core_headers",
85        "//absl/hash:hash_testing",
86        "//absl/meta:type_traits",
87        "@com_google_googletest//:gtest_main",
88    ],
89)
90
91cc_test(
92    name = "int128_benchmark",
93    srcs = ["int128_benchmark.cc"],
94    copts = ABSL_TEST_COPTS,
95    linkopts = ABSL_DEFAULT_LINKOPTS,
96    tags = ["benchmark"],
97    deps = [
98        ":int128",
99        "//absl/base:config",
100        "@com_github_google_benchmark//:benchmark_main",
101    ],
102)
103
104cc_library(
105    name = "representation",
106    hdrs = [
107        "internal/representation.h",
108    ],
109    copts = ABSL_DEFAULT_COPTS,
110    linkopts = ABSL_DEFAULT_LINKOPTS,
111    deps = [
112        "//absl/base:config",
113    ],
114)
115