[PIPE2D-234] typeCastNdArray should not use an extra argument to define the output type Created: 29/Jul/17 Updated: 03/Nov/18 Resolved: 03/Nov/18 |
|
| Status: | Done |
| Project: | DRP 2-D Pipeline |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Normal |
| Reporter: | rhl | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Currently the function typeCastNdArray uses an unused extra parameter to define the type of the output array. Please replace this by explicit specification of the type when calling the function. Note that this will require switching the template order:
template<typename OutType, typename InType>
ndarray::Array<OutType, 1, 1> typeCastNdArray(ndarray::Array<InType, 1, 1> const& arr);
Also provide a specialisation for <float, float> to avoid an unnecessary copy. Note that this will require a check that the input array is not used again; after this check please rename the function to ndArrayConvertArrayType (as a cast leaves the input array unmodified). |
| Comments |
| Comment by price [ 03/Nov/18 ] |
|
Done in the big cleanup. |