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

Method getVectorField

src/backend/common/graphics_common.cpp:487–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487fg_vector_field ForgeManager::getVectorField(fg_chart chart, int nPoints,
488 fg_dtype type) {
489 unsigned long long key =
490 ((static_cast<unsigned long long>(nPoints) & _48BIT) << 16U) |
491 (type & _16BIT);
492
493 ChartKey keypair = make_pair(key, chart);
494 auto iter = mVcfMap.find(keypair);
495
496 if (iter == mVcfMap.end()) {
497 fg_chart_type chart_type;
498 FG_CHECK(mPlugin->fg_get_chart_type(&chart_type, chart));
499
500 fg_vector_field vfield = nullptr;
501 FG_CHECK(mPlugin->fg_create_vector_field(&vfield, nPoints, type,
502 chart_type));
503 FG_CHECK(mPlugin->fg_append_vector_field_to_chart(chart, vfield));
504 mVcfMap[keypair] = VectorFieldPtr(new VectorField({vfield}));
505 }
506 return mVcfMap[keypair]->handle;
507}
508
509bool ForgeManager::getChartAxesOverride(const fg_chart chart) {
510 auto iter = mChartAxesOverrideMap.find(chart);

Callers 1

setup_vector_fieldFunction · 0.80

Calls 1

findMethod · 0.80

Tested by

no test coverage detected