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

Function example

src/api/c/exampleFunction.cpp:39–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38template<typename T>
39af_array example(const af_array& a, const af_array& b,
40 const af_someenum_t& param) {
41 // getArray<T> function is defined in handle.hpp
42 // and it returns backend specific Array, namely one of the following
43 // * cpu::Array<T>
44 // * arrayfire::cuda::Array<T>
45 // * opencl::Array<T>
46 // getHandle<T> function is defined in handle.hpp takes one of the
47 // above backend specific detail::Array<T> and returns the
48 // universal array handle af_array
49 return getHandle<T>(exampleFunction(getArray<T>(a), getArray<T>(b), param));
50}
51
52af_err af_example_function(af_array* out, const af_array a,
53 const af_someenum_t param) {

Callers

nothing calls this directly

Calls 1

exampleFunctionFunction · 0.50

Tested by

no test coverage detected