MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetNumericTypePrecedence

Function GetNumericTypePrecedence

shadercompiler/Type.cpp:761–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759}
760
761int GetNumericTypePrecedence( int type )
762{
763 static const int typePrecedence[] = { OP_BOOL, OP_INT, OP_UINT, OP_HALF, OP_FLOAT, OP_DOUBLE };
764 for( int i = 0; i < int( sizeof( typePrecedence ) / sizeof( int ) ); ++i )
765 {
766 if( type == typePrecedence[i] )
767 {
768 return i;
769 }
770 }
771 return -1;
772}
773
774
775

Callers 3

MulIntrinsicTypeFunction · 0.85
CommonArgTypeFunction · 0.85
GetCommonTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected