ArmNN
 21.02
ExecutionFrameTest.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <ExecutionFrame.hpp>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (NextExecutionFrameTest)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( NextExecutionFrameTest  )

Definition at line 17 of file ExecutionFrameTest.cpp.

References ExecutionFrame::ExecuteWorkloads(), and ExecutionFrame::SetNextExecutionFrame().

18 {
19  armnn::ExecutionFrame executionFrameA;
20  armnn::ExecutionFrame executionFrameB;
21  armnn::ExecutionFrame executionFrameC;
22 
23  executionFrameA.SetNextExecutionFrame(&executionFrameB);
24  executionFrameB.SetNextExecutionFrame(&executionFrameC);
25  //not setting C to check that the default setting is nullptr.
26 
27  auto nextExecutionFrameA = executionFrameA.ExecuteWorkloads(nullptr);
28  auto nextExecutionFrameB = executionFrameB.ExecuteWorkloads(&executionFrameA);
29  auto nextExecutionFrameC = executionFrameC.ExecuteWorkloads(&executionFrameB);
30 
31  BOOST_CHECK_EQUAL(nextExecutionFrameA, &executionFrameB);
32  BOOST_CHECK_EQUAL(nextExecutionFrameB, &executionFrameC);
33 
34  BOOST_CHECK(!nextExecutionFrameC);
35 
36  BOOST_CHECK_NE(nextExecutionFrameA, &executionFrameC);
37 }
IExecutionFrame * ExecuteWorkloads(IExecutionFrame *previousFrame) override
void SetNextExecutionFrame(IExecutionFrame *nextExecutionFrame)