Created
August 3, 2010 05:57
-
-
Save ZeroStride/505915 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected static float* AllocHGlobalAlignedF(int numToAlloc, out System.IntPtr freePtr) | |
| { | |
| freePtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(float)) * numToAlloc + 15); | |
| return (float*)(((int)freePtr + 15) & ~ 0x0F); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment