Fix errors on ibook G4.
This commit is contained in:
parent
ba72ebafcb
commit
5943e8f42f
@ -595,18 +595,43 @@ namespace nv
|
|||||||
template<typename T, typename U, typename hash_functor = hash<T> >
|
template<typename T, typename U, typename hash_functor = hash<T> >
|
||||||
class NVCORE_CLASS HashMap
|
class NVCORE_CLASS HashMap
|
||||||
{
|
{
|
||||||
NV_FORBID_COPY(HashMap)
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// Default ctor.
|
/// Default ctor.
|
||||||
HashMap() : entry_count(0), size_mask(-1), table(NULL) { }
|
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.
|
/// Ctor with size hint.
|
||||||
explicit HashMap(int size_hint) : entry_count(0), size_mask(-1), table(NULL) { setCapacity(size_hint); }
|
explicit HashMap(int size_hint) : entry_count(0), size_mask(-1), table(NULL) { setCapacity(size_hint); }
|
||||||
|
|
||||||
/// Dtor.
|
/// Dtor.
|
||||||
~HashMap() { clear(); }
|
~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.
|
/// Set a new or existing value under the key, to the value.
|
||||||
void set(const T& key, const U& value)
|
void set(const T& key, const U& value)
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#undef bool
|
#undef bool
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace squish {
|
namespace nvsquish {
|
||||||
|
|
||||||
#define VEC4_CONST( X ) Vec4( ( vector float )( X ) )
|
#define VEC4_CONST( X ) Vec4( ( vector float )( X ) )
|
||||||
|
|
||||||
|
@ -5,13 +5,15 @@ TARGET_LINK_LIBRARIES(filtertest nvcore nvmath nvimage)
|
|||||||
ADD_EXECUTABLE(nvtestsuite stress.cpp)
|
ADD_EXECUTABLE(nvtestsuite stress.cpp)
|
||||||
TARGET_LINK_LIBRARIES(nvtestsuite nvcore nvmath nvimage nvtt)
|
TARGET_LINK_LIBRARIES(nvtestsuite nvcore nvmath nvimage nvtt)
|
||||||
|
|
||||||
ADD_EXECUTABLE(driverapitest driverapi.cpp)
|
IF (CUDA_FOUND)
|
||||||
TARGET_LINK_LIBRARIES(driverapitest nvcore nvmath nvimage)
|
ADD_EXECUTABLE(driverapitest driverapi.cpp)
|
||||||
|
TARGET_LINK_LIBRARIES(driverapitest nvcore nvmath nvimage)
|
||||||
|
ENDIF (CUDA_FOUND)
|
||||||
|
|
||||||
ADD_EXECUTABLE(imperativeapi imperativeapi.cpp)
|
ADD_EXECUTABLE(imperativeapi imperativeapi.cpp)
|
||||||
TARGET_LINK_LIBRARIES(imperativeapi nvcore nvmath nvimage nvtt)
|
TARGET_LINK_LIBRARIES(imperativeapi nvcore nvmath nvimage nvtt)
|
||||||
|
|
||||||
INSTALL(TARGETS nvtestsuite driverapitest DESTINATION bin)
|
INSTALL(TARGETS nvtestsuite DESTINATION bin)
|
||||||
|
|
||||||
#include_directories("/usr/include/ffmpeg/")
|
#include_directories("/usr/include/ffmpeg/")
|
||||||
#ADD_EXECUTABLE(nvmpegenc tools/mpegenc.cpp tools/cmdline.h)
|
#ADD_EXECUTABLE(nvmpegenc tools/mpegenc.cpp tools/cmdline.h)
|
||||||
|
Loading…
Reference in New Issue
Block a user