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

Function constant

src/api/cpp/data.cpp:49–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47};
48
49array constant(af_half val, const dim4 &dims, const dtype type) {
50 af_array res;
51 UNUSED(val);
52 AF_THROW(af_constant(&res, 0, //(double)val,
53 dims.ndims(), dims.get(), type));
54 return array(res);
55}
56
57template<typename T, typename = typename enable_if<
58 !static_cast<bool>(is_complex<T>::value), T>::type>

Callers 15

TESTFunction · 0.85
mainFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
single_knn_dataFunction · 0.85
knn_dataFunction · 0.85
BINARY_TESTS_NEARFunction · 0.85
TEST_PFunction · 0.85
testAllBroadcastFunction · 0.85
TESTFunction · 0.85

Calls 10

realFunction · 0.70
imagFunction · 0.70
af_constantFunction · 0.50
arrayClass · 0.50
af_constant_longFunction · 0.50
af_constant_ulongFunction · 0.50
af_constant_complexFunction · 0.50
dim4Class · 0.50
ndimsMethod · 0.45
getMethod · 0.45

Tested by 3

TESTFunction · 0.68
deathTestFunction · 0.68
TESTFunction · 0.68