public void filter(float[] observation) { IntPtr intPtrFArray = Marshal.AllocHGlobal(observation.Length * sizeof(float)); Marshal.Copy(observation, 0, intPtrFArray, observation.Length); XmmInterface.filter(intPtrFArray, observation.Length); Marshal.FreeHGlobal(intPtrFArray); }
public void Filter(float[] observation) { XmmInterface.setCurrentModelInstance(thisIndex); IntPtr intPtrFArray = Marshal.AllocHGlobal(observation.Length * sizeof(float)); Marshal.Copy(observation, 0, intPtrFArray, observation.Length); XmmInterface.filter(intPtrFArray, observation.Length); Marshal.FreeHGlobal(intPtrFArray); }