MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / init_cache_grid

Method init_cache_grid

source/matplot/util/contourc.cpp:1306–1324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1304 }
1305
1306 void QuadContourGenerator::init_cache_grid() {
1307 long i, j, quad;
1308
1309 quad = 0;
1310 for (j = 0; j < _ny; ++j) {
1311 for (i = 0; i < _nx; ++i, ++quad) {
1312 _cache[quad] = 0;
1313
1314 if (i < _nx - 1 && j < _ny - 1)
1315 _cache[quad] |= MASK_EXISTS_QUAD;
1316
1317 if ((i % _chunk_size == 0 || i == _nx - 1) && j < _ny - 1)
1318 _cache[quad] |= MASK_BOUNDARY_W;
1319
1320 if ((j % _chunk_size == 0 || j == _ny - 1) && i < _nx - 1)
1321 _cache[quad] |= MASK_BOUNDARY_S;
1322 }
1323 }
1324 }
1325
1326 void QuadContourGenerator::init_cache_levels(const double &lower_level,
1327 const double &upper_level) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected