MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / parseIntegerRoundingMode

Function parseIntegerRoundingMode

lib/Dialect/CudaTile/IR/CudaTile.cpp:887–902  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

885}
886
887static ParseResult parseIntegerRoundingMode(OpAsmParser &parser,
888 RoundingModeAttr &attr) {
889 static const StringRef allowedModes[] = {"nearest_int_to_zero"};
890
891 auto intgerValidator = [](OpAsmParser &parser, RoundingMode roundingMode,
892 StringRef roundingModeStr) -> ParseResult {
893 // Only allow integer rounding modes
894 if (roundingMode != RoundingMode::NEAREST_INT_TO_ZERO)
895 return failure();
896 return success();
897 };
898
899 return parseRoundingModeWithModes(parser, attr, allowedModes,
900 RoundingMode::NEAREST_INT_TO_ZERO,
901 intgerValidator);
902}
903
904static void printIntegerRoundingMode(OpAsmPrinter &printer, Operation *op,
905 RoundingModeAttr attr) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected