ArmNN
 21.02
ClMemCopyTests.cpp File Reference

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (CopyBetweenCpuAndGpu)
 
 BOOST_AUTO_TEST_CASE (CopyBetweenGpuAndCpu)
 
 BOOST_AUTO_TEST_CASE (CopyBetweenCpuAndGpuWithSubtensors)
 
 BOOST_AUTO_TEST_CASE (CopyBetweenGpuAndCpuWithSubtensors)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/4]

BOOST_AUTO_TEST_CASE ( CopyBetweenCpuAndGpu  )

Definition at line 18 of file ClMemCopyTests.cpp.

References CompareTensors(), LayerTestResult< T, n >::output, and LayerTestResult< T, n >::outputExpected.

19 {
21  MemCopyTest<armnn::RefWorkloadFactory, armnn::ClWorkloadFactory, armnn::DataType::Float32>(false);
22  BOOST_TEST(CompareTensors(result.output, result.outputExpected));
23 }
boost::test_tools::predicate_result CompareTensors(const boost::multi_array< T, n > &a, const boost::multi_array< T, n > &b, bool compareBoolean=false, bool isDynamic=false)
boost::multi_array< T, n > outputExpected
boost::multi_array< T, n > output

◆ BOOST_AUTO_TEST_CASE() [2/4]

BOOST_AUTO_TEST_CASE ( CopyBetweenGpuAndCpu  )

Definition at line 25 of file ClMemCopyTests.cpp.

References CompareTensors(), LayerTestResult< T, n >::output, and LayerTestResult< T, n >::outputExpected.

26 {
28  MemCopyTest<armnn::ClWorkloadFactory, armnn::RefWorkloadFactory, armnn::DataType::Float32>(false);
29  BOOST_TEST(CompareTensors(result.output, result.outputExpected));
30 }
boost::test_tools::predicate_result CompareTensors(const boost::multi_array< T, n > &a, const boost::multi_array< T, n > &b, bool compareBoolean=false, bool isDynamic=false)
boost::multi_array< T, n > outputExpected
boost::multi_array< T, n > output

◆ BOOST_AUTO_TEST_CASE() [3/4]

BOOST_AUTO_TEST_CASE ( CopyBetweenCpuAndGpuWithSubtensors  )

Definition at line 32 of file ClMemCopyTests.cpp.

References CompareTensors(), LayerTestResult< T, n >::output, and LayerTestResult< T, n >::outputExpected.

33 {
35  MemCopyTest<armnn::RefWorkloadFactory, armnn::ClWorkloadFactory, armnn::DataType::Float32>(true);
36  BOOST_TEST(CompareTensors(result.output, result.outputExpected));
37 }
boost::test_tools::predicate_result CompareTensors(const boost::multi_array< T, n > &a, const boost::multi_array< T, n > &b, bool compareBoolean=false, bool isDynamic=false)
boost::multi_array< T, n > outputExpected
boost::multi_array< T, n > output

◆ BOOST_AUTO_TEST_CASE() [4/4]

BOOST_AUTO_TEST_CASE ( CopyBetweenGpuAndCpuWithSubtensors  )

Definition at line 39 of file ClMemCopyTests.cpp.

References BOOST_AUTO_TEST_SUITE_END(), CompareTensors(), LayerTestResult< T, n >::output, and LayerTestResult< T, n >::outputExpected.

40 {
42  MemCopyTest<armnn::ClWorkloadFactory, armnn::RefWorkloadFactory, armnn::DataType::Float32>(true);
43  BOOST_TEST(CompareTensors(result.output, result.outputExpected));
44 }
boost::test_tools::predicate_result CompareTensors(const boost::multi_array< T, n > &a, const boost::multi_array< T, n > &b, bool compareBoolean=false, bool isDynamic=false)
boost::multi_array< T, n > outputExpected
boost::multi_array< T, n > output