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

Function array

include/af/array.h:545–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543 template <typename T, typename = typename std::enable_if<
544 std::is_fundamental<T>::value, void>::type>
545 array(std::initializer_list<T> list)
546 : arr(nullptr) {
547 dim_t size = list.size();
548 if (af_err __aferr = af_create_array(&arr, list.begin(), 1, &size,
549 static_cast<af_dtype>(af::dtype_traits<T>::af_type))) {
550 char *msg = NULL;
551 af_get_last_error(&msg, NULL);
552 af::exception ex(msg, __PRETTY_FUNCTION__, "include/af/array.h",
553 __LINE__, __aferr);
554 af_free_host(msg);
555 throw std::move(ex);
556 }
557 }
558
559 /// \brief Initializer list constructor
560 template <typename T, typename = typename std::enable_if<

Callers 1

array.hFile · 0.70

Calls 4

af_create_arrayFunction · 0.50
af_get_last_errorFunction · 0.50
af_free_hostFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected