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

Function af_constant_long

src/api/c/data.cpp:106–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106af_err af_constant_long(af_array *result, const intl val, const unsigned ndims,
107 const dim_t *const dims) {
108 try {
109 af_array out;
110 AF_CHECK(af_init());
111
112 if (ndims <= 0) { return af_create_handle(result, 0, nullptr, s64); }
113 dim4 d = verifyDims(ndims, dims);
114
115 out = getHandle(createValueArray<intl>(d, val));
116
117 std::swap(*result, out);
118 }
119 CATCHALL;
120
121 return AF_SUCCESS;
122}
123
124af_err af_constant_ulong(af_array *result, const uintl val,
125 const unsigned ndims, const dim_t *const 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