#include #include #include #include #include #include #include #include #include namespace { TEST(DependencySmoke, CallsOneMklVectorOperation) { constexpr std::array x{1.0, 2.0, 3.0}; std::array y{4.0, 5.0, 6.0}; cblas_daxpy( static_cast(x.size()), 2.0, x.data(), 1, y.data(), 1); EXPECT_THAT(y, ::testing::ElementsAre(6.0, 9.0, 12.0)); } TEST(DependencySmoke, RunsLimitedOneTbbParallelLoop) { std::array values{}; const oneapi::tbb::global_control limit{ oneapi::tbb::global_control::max_allowed_parallelism, 2}; oneapi::tbb::parallel_for( std::size_t{0}, values.size(), [&values](const std::size_t index) { values[index] = index + 1; }); EXPECT_THAT(values, ::testing::ElementsAre( 1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U, 11U, 12U, 13U, 14U, 15U, 16U)); } TEST(DependencySmoke, CreatesAndClosesHdf5File) { const auto path = std::filesystem::path{::testing::TempDir()} / "fesa_dependency_smoke.h5"; const hid_t file = H5Fcreate( path.string().c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); ASSERT_GE(file, 0); EXPECT_GE(H5Fclose(file), 0); std::error_code error; std::filesystem::remove(path, error); EXPECT_FALSE(error); } } // namespace