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

Function af_constant_ulong

src/api/c/data.cpp:124–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124af_err af_constant_ulong(af_array *result, const uintl val,
125 const unsigned ndims, const dim_t *const dims) {
126 try {
127 af_array out;
128 AF_CHECK(af_init());
129
130 if (ndims <= 0) { return af_create_handle(result, 0, nullptr, u64); }
131 dim4 d = verifyDims(ndims, dims);
132
133 out = getHandle(createValueArray<uintl>(d, val));
134
135 std::swap(*result, out);
136 }
137 CATCHALL;
138
139 return AF_SUCCESS;
140}
141
142template<typename T>
143static inline af_array identity_(const af::dim4 &dims) {

Callers 2

initMethod · 0.50
constantFunction · 0.50

Calls 5

verifyDimsFunction · 0.85
swapFunction · 0.85
af_initFunction · 0.70
af_create_handleFunction · 0.70
getHandleFunction · 0.70

Tested by 1

initMethod · 0.40