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

Function af_draw_plot3

src/api/c/plot.cpp:366–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366af_err af_draw_plot3(const af_window wind, const af_array P,
367 const af_cell* const props) {
368 try {
369 const ArrayInfo& info = getInfo(P);
370 af::dim4 dims = info.dims();
371
372 if (dims.ndims() == 2 && dims[1] == 3) {
373 return plotWrapper(wind, P, 1, props);
374 }
375 if (dims.ndims() == 2 && dims[0] == 3) {
376 return plotWrapper(wind, P, 0, props);
377 } else if (dims.ndims() == 1 && dims[0] % 3 == 0) {
378 dim4 rdims(dims.elements() / 3, 3, 1, 1);
379 af_array in = 0;
380 AF_CHECK(af_moddims(&in, P, rdims.ndims(), rdims.get()));
381 af_err err = plotWrapper(wind, in, 1, props);
382 AF_CHECK(af_release_array(in));
383 return err;
384 } else {
385 AF_RETURN_ERROR(
386 "Input needs to be either [n, 3] or [3, n] or [3n, 1]",
387 AF_ERR_SIZE);
388 }
389 }
390 CATCHALL;
391
392 return AF_SUCCESS;
393}
394
395// Scatter API
396af_err af_draw_scatter_nd(const af_window wind, const af_array in,

Callers

nothing calls this directly

Calls 7

plotWrapperFunction · 0.85
af_moddimsFunction · 0.70
af_release_arrayFunction · 0.70
dimsMethod · 0.45
ndimsMethod · 0.45
elementsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected