MCPcopy Create free account
hub / github.com/CRVI/OpenCLIPP / PrepareCoords

Method PrepareCoords

C++/programs/Statistics.cpp:66–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void Statistics::PrepareCoords(const ImageBase& Source)
67{
68 PrepareBuffer(Source);
69
70 size_t NbGroups = (size_t) GetNbGroups(Source);
71
72 // We are storing X and Y
73 size_t BufferSize = NbGroups * 2;
74
75 if (m_PartialCoordBuffer != nullptr &&
76 m_PartialCoordBuffer->Size() == BufferSize * sizeof(int) &&
77 m_PartialCoord.size() == BufferSize)
78 {
79 return;
80 }
81
82 m_PartialCoord.assign(BufferSize, 0);
83
84 m_PartialCoordBuffer.reset();
85 m_PartialCoordBuffer = make_shared<Buffer>(*m_CL, m_PartialCoord.data(), BufferSize);
86}
87
88
89// Init

Callers

nothing calls this directly

Calls 1

GetNbGroupsFunction · 0.85

Tested by

no test coverage detected