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

Function IdentityLargeDimCheck

test/constant.cpp:112–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110
111template<typename T>
112void IdentityLargeDimCheck() {
113 SUPPORTED_TYPE_CHECK(T);
114
115 const size_t largeDim = 65535 * 8 + 1;
116
117 dtype dty = (dtype)dtype_traits<T>::af_type;
118 array out = identity(largeDim, dty);
119 ASSERT_EQ(1.f, sum<float>(out));
120
121 out = identity(1, largeDim, dty);
122 ASSERT_EQ(1.f, sum<float>(out));
123
124 out = identity(1, 1, largeDim, dty);
125 ASSERT_EQ(largeDim, sum<float>(out));
126
127 out = identity(1, 1, 1, largeDim, dty);
128 ASSERT_EQ(largeDim, sum<float>(out));
129}
130
131template<typename T>
132void IdentityCCheck() {

Callers

nothing calls this directly

Calls 1

identityFunction · 0.50

Tested by

no test coverage detected