MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / getVectorDim

Method getVectorDim

src/ast/ast_typedecl.cpp:1965–1989  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1963 }
1964
1965 int TypeDecl::getVectorDim() const {
1966 switch (baseType) {
1967 case tInt2:
1968 case tUInt2:
1969 case tFloat2:
1970 case tRange:
1971 case tURange:
1972 case tRange64:
1973 case tURange64:
1974 return 2;
1975 case tInt3:
1976 case tUInt3:
1977 case tFloat3:
1978 return 3;
1979 case tInt4:
1980 case tUInt4:
1981 case tFloat4:
1982 return 4;
1983 default:
1984 DAS_ASSERTF(0,
1985 "we should not even be here. we are calling getVectorDim on an unsupported baseType."
1986 "likely new vector type been added.");
1987 return 0;
1988 }
1989 }
1990
1991 Type TypeDecl::getVectorBaseType() const {
1992 switch (baseType) {

Callers 4

visitMethod · 0.80
getConstExprMethod · 0.80
visitMethod · 0.80
visitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected