//===- llvm/unittest/Support/ParallelTest.cpp -----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// /// \file /// Parallel.h unit tests. /// //===----------------------------------------------------------------------===// #include "llvm/Support/Parallel.h" #include "llvm/Config/llvm-config.h" // for LLVM_ENABLE_THREADS #include "llvm/Support/ThreadPool.h" #include "gtest/gtest.h" #include <array> #include <random> uint32_t array[1024 * 1024]; usingnamespacellvm; // Tests below are hanging up on mingw. Investigating. #if !defined(__MINGW32__) TEST(Parallel, sort) { … } TEST(Parallel, parallel_for) { … } TEST(Parallel, TransformReduce) { … } TEST(Parallel, ForEachError) { … } TEST(Parallel, TaskGroupSequentialFor) { … } #if LLVM_ENABLE_THREADS TEST(Parallel, NestedTaskGroup) { … } TEST(Parallel, ParallelNestedTaskGroup) { … } #endif #endif