Skip to content

Commit 8806987

Browse files
committed
Reduce dependency of tests on specific AD type.
1 parent 6ae92a6 commit 8806987

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/tests/TestParallelCopyin.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ struct TestParallelCopyin : public TestBase<4, 1, 3, TestParallelCopyin<_Case>>
5050
#ifndef BUILD_REFERENCE
5151
/* Set activity of default tapes. They might record copy operations due to firstprivate. OpDiLib's AD approach
5252
* for parallel regions moves these recordings to the correct tapes. */
53-
if (T::getTape().isActive()) {
53+
if (opdi::tool->isActive(opdi::tool->getThreadLocalTape())) {
5454
opdi::logic->beginSkippedParallelRegion();
5555
OPDI_PARALLEL()
5656
{
5757
/* due to skipping, OpDiLib has not exchanged the tapes */
5858
if (omp_get_thread_num() != 0) {
59-
T::getTape().setActive();
59+
opdi::tool->setActive(opdi::tool->getThreadLocalTape(), true);
6060
}
6161
}
6262
OPDI_END_PARALLEL

tests/tests/TestParallelFirstprivate.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ struct TestParallelFirstprivate : public TestBase<4, 1, 3, TestParallelFirstpriv
4242
#ifndef BUILD_REFERENCE
4343
/* Set activity of default tapes. They might record copy operations due to firstprivate. OpDiLib's AD approach
4444
* for parallel regions moves these recordings to the correct tapes. */
45-
if (T::getTape().isActive()) {
45+
if (opdi::tool->isActive(opdi::tool->getThreadLocalTape())) {
4646
opdi::logic->beginSkippedParallelRegion();
4747
OPDI_PARALLEL()
4848
{
4949
/* due to skipping, OpDiLib has not exchanged the tapes */
5050
if (omp_get_thread_num() != 0) {
51-
T::getTape().setActive();
51+
opdi::tool->setActive(opdi::tool->getThreadLocalTape(), true);
5252
}
5353
}
5454
OPDI_END_PARALLEL

0 commit comments

Comments
 (0)