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

Method getPlot

src/backend/common/graphics_common.cpp:414–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414fg_plot ForgeManager::getPlot(fg_chart chart, int nPoints, fg_dtype dtype,
415 fg_plot_type ptype, fg_marker_type mtype) {
416 unsigned long long key =
417 ((static_cast<unsigned long long>(nPoints) & _48BIT) << 16U);
418 key |=
419 (((dtype & _4BIT) << 12U) | ((ptype & _4BIT) << 8U) | (mtype & _8BIT));
420
421 ChartKey keypair = std::make_pair(key, chart);
422 auto iter = mPltMap.find(keypair);
423
424 if (iter == mPltMap.end()) {
425 fg_chart_type chart_type;
426 FG_CHECK(mPlugin->fg_get_chart_type(&chart_type, chart));
427
428 fg_plot plt = nullptr;
429 FG_CHECK(mPlugin->fg_create_plot(&plt, nPoints, dtype, chart_type,
430 ptype, mtype));
431 FG_CHECK(mPlugin->fg_append_plot_to_chart(chart, plt));
432
433 mPltMap[keypair] = PlotPtr(new Plot({plt}));
434 }
435 return mPltMap[keypair]->handle;
436}
437
438fg_histogram ForgeManager::getHistogram(fg_chart chart, int nBins,
439 fg_dtype type) {

Callers 1

setup_plotFunction · 0.80

Calls 1

findMethod · 0.80

Tested by

no test coverage detected