MCPcopy Create free account
hub / github.com/AnswerDotAI/gpu.cpp / cdiv

Function cdiv

gpu.hpp:1172–1172  ·  view source on GitHub ↗

* @brief Ceiling division. */

Source from the content-addressed store, hash-verified

1170 * @brief Ceiling division.
1171 */
1172inline size_t cdiv(size_t n, size_t d) { return (n + d - 1) / d; }
1173
1174/**
1175 * @brief cdiv for shape specification. Mostly useful for evenly dividing

Callers 15

selectMatmulFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
selectTransposeFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
testWGSLFunction · 0.85
testResidualFunction · 0.85
testHadamardFunction · 0.85
testMatmulFunction · 0.85

Calls

no outgoing calls

Tested by 15

testResidualFunction · 0.68
testHadamardFunction · 0.68
testMatmulFunction · 0.68
testGeluFunction · 0.68
testSoftmaxFunction · 0.68
ENCODER_FORWARD_GPUFunction · 0.68
ENCODER_BACKWARD_GPUFunction · 0.68
LAYERNORM_FORWARD_GPUFunction · 0.68
LAYERNORM_BACKWARD_GPUFunction · 0.68
MATMUL_FORWARD_GPUFunction · 0.68
MATMUL_BACKWARD_GPUFunction · 0.68
ATTENTION_FORWARD_GPUFunction · 0.68