MCPcopy Create free account
hub / github.com/alibaba/MNN / fillFloat

Function fillFloat

test/op/BatchMatMulTest.cpp:18–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16using namespace MNN::Express;
17
18static void fillFloat(float* dst, int h, int w, ConvertFP32 functor, float offset = 0.0f) {
19 for (int y = 0; y < h; ++y) {
20 auto dstY = dst + w * y;
21 for (int x = 0; x < w; ++x) {
22 int temp = (x + y) % 31;
23 dstY[x] = functor(((float)temp + offset) * 0.01f);
24 }
25 }
26}
27
28static bool checkMatMul(const float* C, const float* A, const float* B, int e, int l, int h, ConvertFP32 functor) {
29 bool res = true;

Callers 1

runMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected