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

Function af_mul

src/api/c/binary.cpp:304–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304af_err af_mul(af_array *out, const af_array lhs, const af_array rhs,
305 const bool batchMode) {
306 try {
307 // Check if inputs are sparse
308 const ArrayInfo &linfo = getInfo(lhs, false);
309 const ArrayInfo &rinfo = getInfo(rhs, false);
310
311 if (linfo.isSparse() && rinfo.isSparse()) {
312 // return af_arith_sparse<af_mul_t>(out, lhs, rhs);
313 // MKL doesn't have mul or div support yet, hence
314 // this is commented out although alternative cpu code exists
315 return AF_ERR_NOT_SUPPORTED;
316 }
317 if (linfo.isSparse() && !rinfo.isSparse()) {
318 return af_arith_sparse_dense<af_mul_t>(out, lhs, rhs);
319 }
320 if (!linfo.isSparse() && rinfo.isSparse()) {
321 return af_arith_sparse_dense<af_mul_t>(
322 out, rhs, lhs,
323 true); // dense should be rhs
324 }
325 return af_arith<af_mul_t>(out, lhs, rhs, batchMode);
326 }
327 CATCHALL;
328}
329
330af_err af_sub(af_array *out, const af_array lhs, const af_array rhs,
331 const bool batchMode) {

Callers 9

iterDeconvImageTestFunction · 0.85
invDeconvImageTestFunction · 0.85
cannyImageOtsuTestFunction · 0.85
toTempFormatFunction · 0.85
imageTestFunction · 0.85
af_powFunction · 0.85
medianFunction · 0.85
af_save_imageFunction · 0.85
af_save_image_memoryFunction · 0.85

Calls 1

isSparseMethod · 0.80

Tested by 1

toTempFormatFunction · 0.68