MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / num_channels

Method num_channels

tests/SimpleTensor.h:381–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379
380template <typename T>
381int SimpleTensor<T>::num_channels() const
382{
383 switch (_format)
384 {
385 case Format::U8:
386 case Format::U16:
387 case Format::S16:
388 case Format::U32:
389 case Format::S32:
390 case Format::U64:
391 case Format::S64:
392 case Format::F16:
393 case Format::F32:
394 return 1;
395 // Because the U and V channels are subsampled
396 // these formats appear like having only 2 channels:
397 case Format::YUYV422:
398 case Format::UYVY422:
399 return 2;
400 case Format::UV88:
401 return 2;
402 case Format::RGB888:
403 return 3;
404 case Format::RGBA8888:
405 return 4;
406 case Format::UNKNOWN:
407 return _num_channels;
408 //Doesn't make sense for planar formats:
409 case Format::NV12:
410 case Format::NV21:
411 case Format::IYUV:
412 case Format::YUV444:
413 default:
414 return 0;
415 }
416}
417
418template <typename T>
419int SimpleTensor<T>::num_elements() const

Callers 15

validate_argumentsFunction · 0.45
validate_argumentsFunction · 0.45
validate_argumentsFunction · 0.45
validate_argumentsFunction · 0.45
validate_argumentsFunction · 0.45
validate_argumentsFunction · 0.45
validate_argumentsFunction · 0.45
validate_argumentsFunction · 0.45
validate_argumentsFunction · 0.45
validateMethod · 0.45
validate_argumentsFunction · 0.45
validate_argumentsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected