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

Function af_create_handle

src/api/c/array.cpp:132–147  ·  view source on GitHub ↗

Strong Exception Guarantee

Source from the content-addressed store, hash-verified

130
131// Strong Exception Guarantee
132af_err af_create_handle(af_array *result, const unsigned ndims,
133 const dim_t *const dims, const af_dtype type) {
134 try {
135 AF_CHECK(af_init());
136
137 if (ndims > 0) { ARG_ASSERT(2, ndims > 0 && dims != NULL); }
138
139 dim4 d(0);
140 for (unsigned i = 0; i < ndims; i++) { d[i] = dims[i]; }
141
142 af_array out = createHandle(d, type);
143 std::swap(*result, out);
144 }
145 CATCHALL
146 return AF_SUCCESS;
147}
148
149// Strong Exception Guarantee
150af_err af_copy_array(af_array *out, const af_array in) {

Callers 15

convertFunction · 0.70
af_svdFunction · 0.70
af_svd_inplaceFunction · 0.70
af_arithFunction · 0.70
af_arith_realFunction · 0.70
af_atan2Function · 0.70
af_hypotFunction · 0.70
af_logicFunction · 0.70
af_bitwiseFunction · 0.70
af_sort_indexFunction · 0.70
af_sort_by_keyFunction · 0.70
af_constantFunction · 0.70

Calls 3

swapFunction · 0.85
af_initFunction · 0.70
createHandleFunction · 0.70

Tested by

no test coverage detected