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

Function exampleFunction

src/backend/cpu/exampleFunction.cpp:28–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27template<typename T>
28Array<T> exampleFunction(const Array<T> &a, const Array<T> &b,
29 const af_someenum_t method) {
30 dim4 outputDims; // this should be '= in.dims();' in most cases
31 // but would definitely depend on the type of
32 // algorithm you are implementing.
33
34 Array<T> out = createEmptyArray<T>(outputDims);
35 // Please use the create***Array<T> helper
36 // functions defined in Array.hpp to create
37 // different types of Arrays. Please check the
38 // file to know what are the different types you
39 // can create.
40
41 // Enqueue the function call on the worker thread
42 // This code will be present in src/backend/cpu/kernel/exampleFunction.hpp
43 getQueue().enqueue(kernel::exampleFunction<T>, out, a, b, method);
44
45 return out; // return the result
46}
47
48#define INSTANTIATE(T) \
49 template Array<T> exampleFunction<T>(const Array<T> &a, const Array<T> &b, \

Callers

nothing calls this directly

Calls 2

getQueueFunction · 0.50
enqueueMethod · 0.45

Tested by

no test coverage detected