forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
112 lines (103 loc) · 3.18 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# -*- python -*-
load(
"@drake//tools/skylark:drake_cc.bzl",
"drake_cc_googletest",
"drake_cc_library",
"drake_cc_package_library",
)
load("//tools/lint:lint.bzl", "add_lint_tests")
package(default_visibility = ["//visibility:private"])
drake_cc_package_library(
name = "ad",
visibility = ["//visibility:private"],
deps = [
":auto_diff",
],
)
drake_cc_library(
name = "auto_diff",
srcs = [
"internal/partials.cc",
"internal/standard_operations.cc",
],
hdrs = [
"auto_diff.h",
"internal/partials.h",
"internal/standard_operations.h",
],
deps = [
"//common:essential",
],
)
drake_cc_googletest(
name = "auto_diff_basic_test",
deps = [
":auto_diff",
],
)
drake_cc_googletest(
name = "partials_test",
deps = [
":auto_diff",
"//common/test_utilities:eigen_matrix_compare",
"//common/test_utilities:expect_throws_message",
],
)
drake_cc_library(
name = "standard_operations_test_h",
testonly = True,
hdrs = ["test/standard_operations_test.h"],
visibility = [
# TODO(jwnimmer-tri) Once drake/common/autodiffxd.h is finally deleted,
# we can also delete its unit test and thus withdraw this visibility.
"//common:__pkg__",
],
deps = [
"//common/test_utilities:eigen_matrix_compare",
],
)
drake_cc_googletest(
name = "standard_operations_test",
# The test is split into multiple source files to improve compilation time.
srcs = [
"test/standard_operations_abs2_test.cc",
"test/standard_operations_abs_test.cc",
"test/standard_operations_acos_test.cc",
"test/standard_operations_add_test.cc",
"test/standard_operations_asin_test.cc",
"test/standard_operations_atan2_test.cc",
"test/standard_operations_atan_test.cc",
"test/standard_operations_cmp_test.cc",
"test/standard_operations_cos_test.cc",
"test/standard_operations_cosh_test.cc",
"test/standard_operations_dec_test.cc",
"test/standard_operations_div_test.cc",
"test/standard_operations_exp_test.cc",
"test/standard_operations_inc_test.cc",
"test/standard_operations_integer_test.cc",
"test/standard_operations_log_test.cc",
"test/standard_operations_max_test.cc",
"test/standard_operations_min_test.cc",
"test/standard_operations_mul_test.cc",
"test/standard_operations_pow_special_test.cc",
"test/standard_operations_pow_test.cc",
"test/standard_operations_sin_test.cc",
"test/standard_operations_sinh_test.cc",
"test/standard_operations_sqrt_test.cc",
"test/standard_operations_stream_test.cc",
"test/standard_operations_sub_test.cc",
"test/standard_operations_tan_test.cc",
"test/standard_operations_tanh_test.cc",
],
copts = [
# The test fixture at requires some configuration for the specific
# autodiff class to be tested.
"-DDRAKE_AUTODIFFXD_DUT=drake::ad::AutoDiff",
],
shard_count = 16,
deps = [
":auto_diff",
":standard_operations_test_h",
],
)
add_lint_tests()