osx fixes. Update cmake files.

pull/216/head
castano 12 years ago
parent 778bdec4ba
commit 21af952fec

@ -50,7 +50,7 @@ ELSE(CG_FOUND)
ENDIF(CG_FOUND)
# CUDA
FIND_PACKAGE(CUDA)
#FIND_PACKAGE(CUDA)
IF(CUDA_FOUND)
IF(MINGW)
MESSAGE(STATUS "Looking for CUDA - not supported on MinGW")

@ -25,7 +25,7 @@
#endif
#define NV_FASTCALL __attribute__((fastcall))
#define NV_FORCEINLINE __attribute__((always_inline))
#define NV_FORCEINLINE inline __attribute__((always_inline))
#define NV_DEPRECATED __attribute__((deprecated))
#if __GNUC__ > 2

@ -25,7 +25,7 @@
#endif
#define NV_FASTCALL __attribute__((fastcall))
#define NV_FORCEINLINE __attribute__((always_inline))
#define NV_FORCEINLINE inline __attribute__((always_inline))
#define NV_DEPRECATED __attribute__((deprecated))

@ -82,7 +82,7 @@ namespace nv
template <> inline uint8 toU8<uint16>(uint16 x) { nvDebugCheck(x <= NV_UINT8_MAX); return (uint8)x; }
template <> inline uint8 toU8<int16>(int16 x) { nvDebugCheck(x >= 0 && x <= NV_UINT8_MAX); return (uint8)x; }
//template <> inline uint8 toU8<uint8>(uint8 x) { return x; }
template <> inline uint8 toU8<int8>(int8 x) { nvDebugCheck(x >= 0 && x <= NV_UINT8_MAX); return (uint8)x; }
template <> inline uint8 toU8<int8>(int8 x) { nvDebugCheck(x >= 0); return (uint8)x; }
// int8 casts:
template <typename T> inline int8 toI8(T x) { return x; }

@ -9,6 +9,7 @@ SET(MATH_SRCS
Matrix.h
Plane.h Plane.inl Plane.cpp
SphericalHarmonic.h SphericalHarmonic.cpp
SimdVector.h SimdVector_SSE.h SimdVector_VE.h
Vector.h Vector.inl)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

@ -32,6 +32,28 @@ void Event::wait() {
WaitForSingleObject(m->handle, INFINITE);
}
#elif NV_OS_UNIX
// @@ TODO
#pragma NV_MESSAGE("Implement event using pthreads!")
struct Event::Private {
};
Event::Event() : m(new Private) {
}
Event::~Event() {
}
void Event::post() {
}
void Event::wait() {
}
#endif
/*static*/ void Event::post(Event * events, uint count) {
for (uint i = 0; i < count; i++) {
@ -40,14 +62,9 @@ void Event::wait() {
}
/*static*/ void Event::wait(Event * events, uint count) {
// @@ Use wait for multiple objects?
// @@ Use wait for multiple objects in win32?
for (uint i = 0; i < count; i++) {
events[i].wait();
}
}
#elif NV_OS_UNIX
// @@ TODO
#pragma NV_MESSAGE("Implement event using pthreads!")
#endif

@ -9,8 +9,12 @@
using namespace nv;
// @@ nvthread is only fully implemented in win32.
#if NV_OS_WIN32
#define ENABLE_PARALLEL_FOR 1
#else
#define ENABLE_PARALLEL_FOR 0
#endif
void worker(void * arg) {
ParallelFor * owner = (ParallelFor *)arg;

Loading…
Cancel
Save