| 325 | } |
| 326 | |
| 327 | void testSpclOutArray(TestOutputArrayType out_array_type) { |
| 328 | SUPPORTED_TYPE_CHECK(T); |
| 329 | |
| 330 | af_array out = 0; |
| 331 | TestOutputArrayInfo metadata(out_array_type); |
| 332 | if (out_array_type == NULL_ARRAY) { |
| 333 | genTestOutputArray(&out, this->gold_dims.ndims(), |
| 334 | this->gold_dims.get(), |
| 335 | (af_dtype)dtype_traits<T>::af_type, &metadata); |
| 336 | } else { |
| 337 | genTestOutputArray(&out, 0.0, this->gold_dims.ndims(), |
| 338 | this->gold_dims.get(), |
| 339 | (af_dtype)dtype_traits<T>::af_type, &metadata); |
| 340 | } |
| 341 | |
| 342 | // Taken from the Wrap.DocSnippet test |
| 343 | ASSERT_SUCCESS(af_wrap_v2(&out, this->in_, 4, 4, // output dims |
| 344 | 2, 2, // window size |
| 345 | 2, 2, // stride |
| 346 | 0, 0, // padding |
| 347 | true)); // is_column |
| 348 | |
| 349 | ASSERT_SPECIAL_ARRAYS_EQ(this->gold_, out, &metadata); |
| 350 | } |
| 351 | |
| 352 | void releaseArrays() { |
| 353 | if (this->in_ != 0) { ASSERT_SUCCESS(af_release_array(this->in_)); } |
no test coverage detected