MCPcopy Create free account
hub / github.com/ModelEngine-Group/flexai / CompareLimit

Function CompareLimit

GPU-Virtual-Service/gpu-remoting/include/define.h:106–114  ·  view source on GitHub ↗

* @brief compare the limits with the input * * @param input the input number * @param lower the lower bound of the limitation * @param upper the upper bound of the limitation * @return uint32_t */

Source from the content-addressed store, hash-verified

104 * @return uint32_t
105 */
106 inline uint32_t CompareLimit(uint32_t input, uint32_t lower, uint32_t upper) {
107 if (input <= lower) {
108 return lower;
109 } else if (input >= upper) {
110 return upper;
111 } else {
112 return input;
113 }
114 }
115
116 /**
117 * @brief get the ceil of the division

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected