Esempio n. 1
0
        public unsafe override void FindMaxMin(short[] src, out short maxValue, out short minValue, out int maxIdx, out int minIdx)
        {
            short[] max      = new short[1];
            short[] min      = new short[1];
            int[]   maxIndex = new int[1];
            int[]   minIndex = new int[1];
            fixed(short *pSrc = src, pMin = min, pMax = max)
            {
                fixed(int *pMinIdx = minIndex, pMaxIdx = maxIndex)
                {
                    IPPNative.ippsMinMaxIndx_16s(pSrc, src.Length, pMin, pMinIdx, pMax, pMaxIdx);
                }
            }

            maxValue = max[0];
            minValue = min[0];
            maxIdx   = maxIndex[0];
            minIdx   = minIndex[0];
        }