Skip to content

Commit 99714a7

Browse files
authored
Merge pull request #10262 from JiayiFeng/fix_mac_compile_error
fix mac compile errors
2 parents 71fa3ca + 3137337 commit 99714a7

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

paddle/utils/tests/test_CustomStackTrace.cpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#include <chrono>
16-
17-
#include <gflags/gflags.h>
18-
#include <gtest/gtest.h>
15+
#include <gflags/gflags.h> // NOLINT
16+
#include <gtest/gtest.h> // NOLINT
1917

2018
#include "paddle/utils/CustomStackTrace.h"
2119
#include "paddle/utils/Locks.h"
@@ -39,14 +37,10 @@ void testNormalImpl(
3937
threads.reserve(FLAGS_test_thread_num);
4038

4139
for (int32_t i = 0; i < FLAGS_test_thread_num; ++i) {
42-
threads.emplace_back(new std::thread([&tracer,
43-
&countDown,
44-
&layerSize,
45-
&startBarrier,
46-
&doneBarrier,
47-
&callback] {
48-
callback(tracer, countDown, layerSize, startBarrier, doneBarrier);
49-
}));
40+
threads.emplace_back(
41+
new std::thread([&tracer, &startBarrier, &doneBarrier, &callback] {
42+
callback(tracer, countDown, layerSize, startBarrier, doneBarrier);
43+
}));
5044
}
5145
size_t cntDown = countDown;
5246
while (cntDown-- > 0) {

0 commit comments

Comments
 (0)