@@ -20,12 +20,12 @@ using af::dim4;
2020using namespace detail ;
2121
2222template <typename T>
23- static af_features * fast (af_array const &in, const float thr, const unsigned arc_length, const bool non_max, const float feature_ratio)
23+ static af_features fast (af_array const &in, const float thr, const unsigned arc_length, const bool non_max, const float feature_ratio)
2424{
25- return fast<T>(getArray<T>(in), thr, arc_length, non_max, feature_ratio)-> get ();
25+ return fast<T>(getArray<T>(in), thr, arc_length, non_max, feature_ratio). get ();
2626}
2727
28- af_err af_fast (af_features ** out, const af_array in, const float thr, const unsigned arc_length, const bool non_max, const float feature_ratio)
28+ af_err af_fast (af_features *out, const af_array in, const float thr, const unsigned arc_length, const bool non_max, const float feature_ratio)
2929{
3030 try {
3131 ArrayInfo info = getInfo (in);
@@ -39,18 +39,16 @@ af_err af_fast(af_features **out, const af_array in, const float thr, const unsi
3939 dim_type in_ndims = dims.ndims ();
4040 DIM_ASSERT (1 , (in_ndims <= 3 && in_ndims >= 2 ));
4141
42- af_features * output;
4342 af_dtype type = info.getType ();
4443 switch (type) {
45- case f32 : output = fast<float >(in, thr, arc_length, non_max, feature_ratio); break ;
46- case f64 : output = fast<double >(in, thr, arc_length, non_max, feature_ratio); break ;
47- case b8 : output = fast<char >(in, thr, arc_length, non_max, feature_ratio); break ;
48- case s32: output = fast<int >(in, thr, arc_length, non_max, feature_ratio); break ;
49- case u32 : output = fast<uint >(in, thr, arc_length, non_max, feature_ratio); break ;
50- case u8 : output = fast<uchar >(in, thr, arc_length, non_max, feature_ratio); break ;
44+ case f32 : *out = fast<float >(in, thr, arc_length, non_max, feature_ratio); break ;
45+ case f64 : *out = fast<double >(in, thr, arc_length, non_max, feature_ratio); break ;
46+ case b8 : *out = fast<char >(in, thr, arc_length, non_max, feature_ratio); break ;
47+ case s32: *out = fast<int >(in, thr, arc_length, non_max, feature_ratio); break ;
48+ case u32 : *out = fast<uint >(in, thr, arc_length, non_max, feature_ratio); break ;
49+ case u8 : *out = fast<uchar >(in, thr, arc_length, non_max, feature_ratio); break ;
5150 default : TYPE_ERROR (1 , type);
5251 }
53- *out = output;
5452 }
5553 CATCHALL;
5654
0 commit comments