Пример #1
0
        public static AFArray TopK(AFArray arr, int k, int dim, int order)
        {
            IntPtr ptr;
            IntPtr idx;

            Internal.VERIFY(AFStatistics.af_topk(out ptr, out idx, arr._ptr, k, dim, order));
            return(new AFArray(idx));
        }
Пример #2
0
        public static SuperArray ArgMin(SuperArray arr)
        {
            AFArray y = CreateMajorSupportedArray(arr, false);
            IntPtr  ptr;
            IntPtr  idx;

            Internal.VERIFY(AFStatistics.af_topk(out ptr, out idx, y._ptr, 1, 0, 1));
            return(new SuperArray(new AFArray(idx)));
        }
Пример #3
0
        public static SuperArray TopK(SuperArray arr, int k, uint dim, int order)
        {
            AFArray y = CreateMajorSupportedArray(arr);
            IntPtr  ptr;
            IntPtr  idx;

            Internal.VERIFY(AFStatistics.af_topk(out ptr, out idx, y._ptr, k, (int)dim, order));
            return(new SuperArray(new AFArray(idx)));
        }