MCPcopy Create free account
hub / github.com/NVIDIA/cutlass / arg_as_ConvModeID

Function arg_as_ConvModeID

tools/profiler/src/problem_space.cpp:1086–1109  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////////////////////// Lexically casts an argument to an int64 if it is defined. Returns true if not null.

Source from the content-addressed store, hash-verified

1084/////////////////////////////////////////////////////////////////////////////////////////////////
1085/// Lexically casts an argument to an int64 if it is defined. Returns true if not null.
1086bool arg_as_ConvModeID(
1087 library::ConvModeID &conv_mode,
1088 KernelArgument::Value const *value_ptr) {
1089
1090 if (value_ptr->not_null) {
1091 if (value_ptr->argument->description->type == ArgumentTypeID::kEnumerated) {
1092
1093 conv_mode = library::from_string<library::ConvModeID>(
1094 static_cast<EnumeratedTypeArgument::EnumeratedTypeValue const *>(value_ptr)->element);
1095
1096 if (conv_mode == library::ConvModeID::kInvalid) {
1097 throw std::runtime_error(
1098 "arg_as_ConvModeID() - illegal cast.");
1099 }
1100 }
1101 else {
1102
1103 throw std::runtime_error(
1104 "arg_as_ConvModeID() - illegal cast.");
1105 }
1106 return true;
1107 }
1108 return false;
1109}
1110
1111/// Lexically casts an argument to an int64 if it is defined. Returns true if not null.
1112bool arg_as_ConvModeID(

Callers

nothing calls this directly

Calls 3

argument_indexMethod · 0.80
getMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected