MCPcopy Create free account
hub / github.com/ARM-software/armnn / GetImageChannelIndex

Function GetImageChannelIndex

tests/InferenceTestImage.cpp:27–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25{
26
27unsigned int GetImageChannelIndex(ImageChannelLayout channelLayout, ImageChannel channel)
28{
29 switch (channelLayout)
30 {
31 case ImageChannelLayout::Rgb:
32 return static_cast<unsigned int>(channel);
33 case ImageChannelLayout::Bgr:
34 return 2u - static_cast<unsigned int>(channel);
35 default:
36 throw UnknownImageChannelLayout(fmt::format("Unknown layout {}", static_cast<int>(channelLayout)));
37 }
38}
39
40inline float Lerp(float a, float b, float w)
41{

Calls 2

formatEnum · 0.85

Tested by

no test coverage detected