MCPcopy Create free account
hub / github.com/RenderKit/oidn / gcd

Function gcd

common/platform.h:220–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 // Returns the greatest common divisor of a and b
219 template<typename Int>
220 oidn_host_device_inline Int gcd(Int a, Int b)
221 {
222 while (b != 0)
223 {
224 const Int t = b;
225 b = a % b;
226 a = t;
227 }
228 return a;
229 }
230
231 // Returns the least common multiple of a and b
232 template<typename Int>

Callers 1

lcmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected