#include <reference/RefTensorHandle.hpp>
#include <boost/test/unit_test.hpp>
Go to the source code of this file.
◆ BOOST_AUTO_TEST_CASE() [1/4]
BOOST_AUTO_TEST_CASE |
( |
AcquireAndRelease |
| ) |
|
Definition at line 12 of file RefTensorHandleTests.cpp.
References BOOST_CHECK(), armnn::Float32, and armnn::info.
14 std::shared_ptr<RefMemoryManager> memoryManager = std::make_shared<RefMemoryManager>();
22 memoryManager->Acquire();
24 float *buffer =
reinterpret_cast<float *
>(handle.Map());
33 memoryManager->Release();
35 memoryManager->Acquire();
37 float *buffer =
reinterpret_cast<float *
>(handle.Map());
45 memoryManager->Release();
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
◆ BOOST_AUTO_TEST_CASE() [2/4]
BOOST_AUTO_TEST_CASE |
( |
CheckSourceType |
| ) |
|
Definition at line 50 of file RefTensorHandleTests.cpp.
References BOOST_CHECK(), armnn::DmaBuf, armnn::DmaBufProtected, armnn::Float32, armnn::info, and armnn::Malloc.
52 std::shared_ptr<RefMemoryManager> memoryManager = std::make_shared<RefMemoryManager>();
55 RefTensorHandle handle(info, memoryManager, static_cast<unsigned int>(MemorySource::Malloc));
57 int* testPtr =
new int(4);
60 BOOST_CHECK(!handle.Import(static_cast<void *>(testPtr), MemorySource::DmaBuf));
63 BOOST_CHECK(!handle.Import(static_cast<void *>(testPtr), MemorySource::DmaBufProtected));
66 BOOST_CHECK(handle.Import(static_cast<void *>(testPtr), MemorySource::Malloc));
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
◆ BOOST_AUTO_TEST_CASE() [3/4]
BOOST_AUTO_TEST_CASE |
( |
ReusePointer |
| ) |
|
Definition at line 71 of file RefTensorHandleTests.cpp.
References BOOST_CHECK(), armnn::Float32, armnn::info, and armnn::Malloc.
73 std::shared_ptr<RefMemoryManager> memoryManager = std::make_shared<RefMemoryManager>();
76 RefTensorHandle handle(info, memoryManager, static_cast<unsigned int>(MemorySource::Malloc));
78 int* testPtr =
new int(4);
80 handle.Import(static_cast<void *>(testPtr), MemorySource::Malloc);
83 BOOST_CHECK(handle.Import(static_cast<void *>(testPtr), MemorySource::Malloc));
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
◆ BOOST_AUTO_TEST_CASE() [4/4]
BOOST_AUTO_TEST_CASE |
( |
MisalignedPointer |
| ) |
|