| 104 | } |
| 105 | |
| 106 | af_err af_constant_long(af_array *result, const intl val, const unsigned ndims, |
| 107 | const dim_t *const dims) { |
| 108 | try { |
| 109 | af_array out; |
| 110 | AF_CHECK(af_init()); |
| 111 | |
| 112 | if (ndims <= 0) { return af_create_handle(result, 0, nullptr, s64); } |
| 113 | dim4 d = verifyDims(ndims, dims); |
| 114 | |
| 115 | out = getHandle(createValueArray<intl>(d, val)); |
| 116 | |
| 117 | std::swap(*result, out); |
| 118 | } |
| 119 | CATCHALL; |
| 120 | |
| 121 | return AF_SUCCESS; |
| 122 | } |
| 123 | |
| 124 | af_err af_constant_ulong(af_array *result, const uintl val, |
| 125 | const unsigned ndims, const dim_t *const dims) { |