MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / morphTest

Function morphTest

test/threading.cpp:131–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void morphTest(const array input, const array mask, const bool isDilation,
132 const array gold, int targetDevice) {
133 UNSUPPORTED_BACKEND(AF_BACKEND_ONEAPI);
134 setDevice(targetDevice);
135
136 array out;
137
138 for (unsigned i = 0; i < ITERATION_COUNT; ++i)
139 out = isDilation ? dilate(input, mask) : erode(input, mask);
140
141 ASSERT_IMAGES_NEAR(gold, out, 0.018f);
142}
143
144TEST(Threading, SetPerThreadActiveDevice) {
145 IMAGEIO_ENABLED_CHECK();

Callers

nothing calls this directly

Calls 3

dilateFunction · 0.85
erodeFunction · 0.85
setDeviceFunction · 0.50

Tested by

no test coverage detected