Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1892 - trunk/Core/Util


Chronological Thread 
  • From: arobison@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1892 - trunk/Core/Util
  • Date: Sun, 2 Dec 2007 19:45:14 -0700 (MST)

Author: arobison
Date: Sun Dec  2 19:45:11 2007
New Revision: 1892

Modified:
   trunk/Core/Util/AlignedAllocator.cc
Log:
Adding WIN32 support for aligned allocations.

Modified: trunk/Core/Util/AlignedAllocator.cc
==============================================================================
--- trunk/Core/Util/AlignedAllocator.cc (original)
+++ trunk/Core/Util/AlignedAllocator.cc Sun Dec  2 19:45:11 2007
@@ -37,6 +37,8 @@
   void* memptr;
 #if defined( __APPLE__) || defined (__CYGWIN__)
   int return_code = ( ((memptr = malloc(size)) == NULL) ? ENOMEM : 0);
+#elif defined( _WIN32 ) || defined( __WIN32__ ) || defined( WIN32 )
+  int return_code = ( ((memptr = _aligned_malloc(size, alignment)) == NULL) 
? ENOMEM : 0 );
 #else
   int return_code = posix_memalign(&memptr, alignment, size);
 #endif




  • [Manta] r1892 - trunk/Core/Util, arobison, 12/02/2007

Archive powered by MHonArc 2.6.16.

Top of page