mirror of
https://github.com/boostorg/math.git
synced 2026-01-19 04:22:09 +00:00
Add SYCL test for Landau distribution
This commit is contained in:
@@ -14,6 +14,7 @@ run test_arcsine.cpp ;
|
||||
run test_bernoulli.cpp ;
|
||||
run test_cauchy.cpp ;
|
||||
run test_exponential_dist.cpp ;
|
||||
run test_landau.cpp ;
|
||||
|
||||
# Special Functions
|
||||
run pow_test.cpp ;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Copyright Takuma Yoshimura 2024.
|
||||
// Copyright Takuma Yoshimura 2024.
|
||||
// Copyright Matt Borland 2024.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MAIN
|
||||
#define BOOST_TEST_MODULE StatsLandauTest
|
||||
#include <boost/math/tools/config.hpp>
|
||||
#include <boost/test/included/unit_test.hpp>
|
||||
#include <boost/test/tools/floating_point_comparison.hpp>
|
||||
#include <boost/multiprecision/cpp_bin_float.hpp>
|
||||
|
||||
#include <boost/math/distributions/landau.hpp>
|
||||
|
||||
#if __has_include(<stdfloat>)
|
||||
@@ -16,7 +16,11 @@
|
||||
#endif
|
||||
|
||||
using boost::math::landau_distribution;
|
||||
using boost::multiprecision::cpp_bin_float_quad;
|
||||
|
||||
#ifndef BOOST_MATH_HAS_GPU_SUPPORT
|
||||
# include <boost/multiprecision/cpp_bin_float.hpp>
|
||||
using boost::multiprecision::cpp_bin_float_quad;
|
||||
#endif
|
||||
|
||||
template<class RealType, int N>
|
||||
void do_test_landau_pdf(){
|
||||
@@ -738,10 +742,12 @@ BOOST_AUTO_TEST_CASE(landau_pdf_fp64_std)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_MATH_HAS_GPU_SUPPORT
|
||||
BOOST_AUTO_TEST_CASE(landau_pdf_fp128)
|
||||
{
|
||||
do_test_landau_pdf<cpp_bin_float_quad, 113>();
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_AUTO_TEST_CASE(landau_cdf_fp64)
|
||||
{
|
||||
@@ -755,10 +761,12 @@ BOOST_AUTO_TEST_CASE(landau_cdf_fp64_std)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_MATH_HAS_GPU_SUPPORT
|
||||
BOOST_AUTO_TEST_CASE(landau_cdf_fp128)
|
||||
{
|
||||
do_test_landau_cdf<cpp_bin_float_quad, 113>();
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_AUTO_TEST_CASE(landau_ccdf_fp64)
|
||||
{
|
||||
@@ -772,10 +780,12 @@ BOOST_AUTO_TEST_CASE(landau_ccdf_fp64_std)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_MATH_HAS_GPU_SUPPORT
|
||||
BOOST_AUTO_TEST_CASE(landau_ccdf_fp128)
|
||||
{
|
||||
do_test_landau_ccdf<cpp_bin_float_quad, 113>();
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_AUTO_TEST_CASE(landau_quantile_nearzero_fp64)
|
||||
{
|
||||
@@ -789,10 +799,12 @@ BOOST_AUTO_TEST_CASE(landau_quantile_nearzero_fp64_std)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_MATH_HAS_GPU_SUPPORT
|
||||
BOOST_AUTO_TEST_CASE(landau_quantile_nearzero_fp128)
|
||||
{
|
||||
do_test_landau_quantile_nearzero<cpp_bin_float_quad, 113>();
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_AUTO_TEST_CASE(landau_quantile_lower_fp64)
|
||||
{
|
||||
@@ -806,10 +818,12 @@ BOOST_AUTO_TEST_CASE(landau_quantile_lower_fp64_std)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_MATH_HAS_GPU_SUPPORT
|
||||
BOOST_AUTO_TEST_CASE(landau_quantile_lower_fp128)
|
||||
{
|
||||
do_test_landau_quantile_lower<cpp_bin_float_quad, 113>();
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_AUTO_TEST_CASE(landau_quantile_upper_fp64)
|
||||
{
|
||||
@@ -823,10 +837,12 @@ BOOST_AUTO_TEST_CASE(landau_quantile_upper_fp64_std)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_MATH_HAS_GPU_SUPPORT
|
||||
BOOST_AUTO_TEST_CASE(landau_quantile_upper_fp128)
|
||||
{
|
||||
do_test_landau_quantile_upper<cpp_bin_float_quad, 113>();
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_AUTO_TEST_CASE(landau_locscale_fp64)
|
||||
{
|
||||
@@ -840,8 +856,10 @@ BOOST_AUTO_TEST_CASE(landau_locscale_fp64_std)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_MATH_HAS_GPU_SUPPORT
|
||||
BOOST_AUTO_TEST_CASE(landau_locscale_fp128)
|
||||
{
|
||||
do_test_landau_locscale_param<cpp_bin_float_quad, 113>();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user