Fix errors on ibook G4.

pull/216/head
castano 15 years ago
parent ba72ebafcb
commit 5943e8f42f

@ -595,18 +595,43 @@ namespace nv
template<typename T, typename U, typename hash_functor = hash<T> >
class NVCORE_CLASS HashMap
{
NV_FORBID_COPY(HashMap)
public:
/// Default ctor.
HashMap() : entry_count(0), size_mask(-1), table(NULL) { }
// Copy ctor.
HashMap(const HashMap & map) : entry_count(0), size_mask(-1), table(NULL)
{
operator = (map);
}
/// Ctor with size hint.
explicit HashMap(int size_hint) : entry_count(0), size_mask(-1), table(NULL) { setCapacity(size_hint); }
/// Dtor.
~HashMap() { clear(); }
// Assignment operator.
void operator= (const HashMap & map)
{
clear();
if (entry_count > 0)
{
entry_count = map.entry_count;
size_mask = map.size_mask;
const uint size = uint(size_mask + 1);
table = (Entry *)nv::mem::malloc(sizeof(Entry) * size);
// Copy elements using copy ctor.
for (uint i = 0; i < size; i++)
{
new (table + i) Entry(map.table[i]);
}
}
}
/// Set a new or existing value under the key, to the value.
void set(const T& key, const U& value)

@ -31,7 +31,7 @@
#undef bool
#endif
namespace squish {
namespace nvsquish {
#define VEC4_CONST( X ) Vec4( ( vector float )( X ) )

@ -5,13 +5,15 @@ TARGET_LINK_LIBRARIES(filtertest nvcore nvmath nvimage)
ADD_EXECUTABLE(nvtestsuite stress.cpp)
TARGET_LINK_LIBRARIES(nvtestsuite nvcore nvmath nvimage nvtt)
ADD_EXECUTABLE(driverapitest driverapi.cpp)
TARGET_LINK_LIBRARIES(driverapitest nvcore nvmath nvimage)
IF (CUDA_FOUND)
ADD_EXECUTABLE(driverapitest driverapi.cpp)
TARGET_LINK_LIBRARIES(driverapitest nvcore nvmath nvimage)
ENDIF (CUDA_FOUND)
ADD_EXECUTABLE(imperativeapi imperativeapi.cpp)
TARGET_LINK_LIBRARIES(imperativeapi nvcore nvmath nvimage nvtt)
INSTALL(TARGETS nvtestsuite driverapitest DESTINATION bin)
INSTALL(TARGETS nvtestsuite DESTINATION bin)
#include_directories("/usr/include/ffmpeg/")
#ADD_EXECUTABLE(nvmpegenc tools/mpegenc.cpp tools/cmdline.h)

Loading…
Cancel
Save