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

Function arg_as_RasterOrder

tools/profiler/src/problem_space.cpp:909–931  ·  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

907
908/// Lexically casts an argument to an int64 if it is defined. Returns true if not null.
909bool arg_as_RasterOrder(
910 library::RasterOrder &raster_order,
911 KernelArgument::Value const *value_ptr) {
912
913 if (value_ptr->not_null) {
914 if (value_ptr->argument->description->type == ArgumentTypeID::kEnumerated) {
915
916 raster_order = library::from_string<library::RasterOrder>(
917 static_cast<EnumeratedTypeArgument::EnumeratedTypeValue const *>(value_ptr)->element);
918
919 if (raster_order == library::RasterOrder::kInvalid) {
920 throw std::runtime_error(
921 "arg_as_RasterOrder() - illegal cast.");
922 }
923 }
924 else {
925 throw std::runtime_error(
926 "arg_as_RasterOrder() - illegal cast.");
927 }
928 return true;
929 }
930 return false;
931}
932
933/// Lexically casts an argument to an int64 if it is defined. Returns true if not null.
934bool arg_as_RasterOrder(

Callers

nothing calls this directly

Calls 3

argument_indexMethod · 0.80
getMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected