| 70 | |
| 71 | template<typename T> |
| 72 | static af_array indexBySeqs(const af_array& src, |
| 73 | const vector<af_seq>& indicesV) { |
| 74 | auto ndims = static_cast<dim_t>(indicesV.size()); |
| 75 | const auto& input = getArray<T>(src); |
| 76 | |
| 77 | if (ndims == 1U && ndims != input.ndims()) { |
| 78 | return getHandle(createSubArray(flat(input), indicesV)); |
| 79 | } else { |
| 80 | return getHandle(createSubArray(input, indicesV)); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | af_err af_index(af_array* result, const af_array in, const unsigned ndims, |
| 85 | const af_seq* indices) { |
nothing calls this directly
no test coverage detected