MCPcopy Create free account
hub / github.com/RenderKit/oidn / getFormatDataType

Function getFormatDataType

common/common.cpp:20–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18 }
19
20 DataType getFormatDataType(Format format)
21 {
22 switch (format)
23 {
24 case Format::Undefined:
25 return DataType::Undefined;
26 case Format::Float:
27 case Format::Float2:
28 case Format::Float3:
29 case Format::Float4:
30 return DataType::Float32;
31 case Format::Half:
32 case Format::Half2:
33 case Format::Half3:
34 case Format::Half4:
35 return DataType::Float16;
36 default:
37 throw std::invalid_argument("invalid format");
38 }
39 }
40
41 Format makeFormat(DataType dataType, int numChannels)
42 {

Callers 1

getDataTypeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected