Statistics
| 44 | |
| 45 | // Statistics |
| 46 | void Statistics::PrepareBuffer(const ImageBase& Source) |
| 47 | { |
| 48 | size_t NbGroups = (size_t) GetNbGroups(Source); |
| 49 | |
| 50 | // We need space for 4 channels + another space for the number of pixels |
| 51 | size_t BufferSize = NbGroups * (4 + 1); |
| 52 | |
| 53 | if (m_PartialResultBuffer != nullptr && |
| 54 | m_PartialResultBuffer->Size() == BufferSize * sizeof(float) && |
| 55 | m_PartialResult.size() == BufferSize) |
| 56 | { |
| 57 | return; |
| 58 | } |
| 59 | |
| 60 | m_PartialResult.assign(BufferSize, 0); |
| 61 | |
| 62 | m_PartialResultBuffer.reset(); |
| 63 | m_PartialResultBuffer = make_shared<Buffer>(*m_CL, m_PartialResult.data(), BufferSize); |
| 64 | } |
| 65 | |
| 66 | void Statistics::PrepareCoords(const ImageBase& Source) |
| 67 | { |
nothing calls this directly
no test coverage detected