本文整理汇总了C++中View1::dimension_7方法的典型用法代码示例。如果您正苦于以下问题:C++ View1::dimension_7方法的具体用法?C++ View1::dimension_7怎么用?C++ View1::dimension_7使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View1
的用法示例。
在下文中一共展示了View1::dimension_7方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkNewViewWasAllocated
inline void checkNewViewWasAllocated( View1 const &v1, View2 const &v2 )
{
BOOST_TEST( v1.data() != v2.data() );
BOOST_TEST( (int)View1::rank == (int)View2::rank );
BOOST_TEST( ( std::is_same<typename View1::const_value_type,
typename View2::const_value_type>::value ) );
BOOST_TEST( v1.dimension_0() == v2.dimension_0() );
BOOST_TEST( v1.dimension_1() == v2.dimension_1() );
BOOST_TEST( v1.dimension_2() == v2.dimension_2() );
BOOST_TEST( v1.dimension_3() == v2.dimension_3() );
BOOST_TEST( v1.dimension_4() == v2.dimension_4() );
BOOST_TEST( v1.dimension_5() == v2.dimension_5() );
BOOST_TEST( v1.dimension_6() == v2.dimension_6() );
BOOST_TEST( v1.dimension_7() == v2.dimension_7() );
}
示例2: checkNewViewWasAllocated
inline void checkNewViewWasAllocated( View1 const &v1, View2 const &v2,
bool &success,
Teuchos::FancyOStream &out )
{
TEST_INEQUALITY( v1.data(), v2.data() );
TEST_EQUALITY( (int)View1::rank, (int)View2::rank );
TEST_ASSERT( ( std::is_same<typename View1::const_value_type,
typename View2::const_value_type>::value ) );
TEST_EQUALITY( v1.dimension_0(), v2.dimension_0() );
TEST_EQUALITY( v1.dimension_1(), v2.dimension_1() );
TEST_EQUALITY( v1.dimension_2(), v2.dimension_2() );
TEST_EQUALITY( v1.dimension_3(), v2.dimension_3() );
TEST_EQUALITY( v1.dimension_4(), v2.dimension_4() );
TEST_EQUALITY( v1.dimension_5(), v2.dimension_5() );
TEST_EQUALITY( v1.dimension_6(), v2.dimension_6() );
TEST_EQUALITY( v1.dimension_7(), v2.dimension_7() );
}
示例3: checkViewWasNotAllocated
inline void checkViewWasNotAllocated( View1 const &v1, View2 const &v2 )
{
// NOTE: cannot use operator== here because array layout may "change" for
// rank-1 views
BOOST_TEST( v1.data() == v2.data() );
BOOST_TEST( v1.span() == v2.span() );
BOOST_TEST( (int)View1::rank == (int)View2::rank );
BOOST_TEST( ( std::is_same<typename View1::const_value_type,
typename View2::const_value_type>::value ) );
BOOST_TEST( ( std::is_same<typename View1::memory_space,
typename View2::memory_space>::value ) );
BOOST_TEST( v1.dimension_0() == v2.dimension_0() );
BOOST_TEST( v1.dimension_1() == v2.dimension_1() );
BOOST_TEST( v1.dimension_2() == v2.dimension_2() );
BOOST_TEST( v1.dimension_3() == v2.dimension_3() );
BOOST_TEST( v1.dimension_4() == v2.dimension_4() );
BOOST_TEST( v1.dimension_5() == v2.dimension_5() );
BOOST_TEST( v1.dimension_6() == v2.dimension_6() );
BOOST_TEST( v1.dimension_7() == v2.dimension_7() );
}
示例4: checkViewWasNotAllocated
inline void checkViewWasNotAllocated( View1 const &v1, View2 const &v2,
bool &success,
Teuchos::FancyOStream &out )
{
// NOTE: cannot use operator== here because array layout may "change" for
// rank-1 views
TEST_EQUALITY( v1.data(), v2.data() );
TEST_EQUALITY( v1.span(), v2.span() );
TEST_EQUALITY( (int)View1::rank, (int)View2::rank );
TEST_ASSERT( ( std::is_same<typename View1::const_value_type,
typename View2::const_value_type>::value ) );
TEST_ASSERT( ( std::is_same<typename View1::memory_space,
typename View2::memory_space>::value ) );
TEST_EQUALITY( v1.dimension_0(), v2.dimension_0() );
TEST_EQUALITY( v1.dimension_1(), v2.dimension_1() );
TEST_EQUALITY( v1.dimension_2(), v2.dimension_2() );
TEST_EQUALITY( v1.dimension_3(), v2.dimension_3() );
TEST_EQUALITY( v1.dimension_4(), v2.dimension_4() );
TEST_EQUALITY( v1.dimension_5(), v2.dimension_5() );
TEST_EQUALITY( v1.dimension_6(), v2.dimension_6() );
TEST_EQUALITY( v1.dimension_7(), v2.dimension_7() );
}