Loading src/core/arrays/tnlArray.h +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ class tnlSharedArray; template< typename Element, typename Device = tnlHost, typename Index = int > class tnlArray : public tnlObject class tnlArray : public virtual tnlObject { public: Loading src/core/tnlCuda.h +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #define TNLCUDA_H_ #include <iostream> #include <unistd.h> #include <core/tnlDevice.h> #include <core/tnlString.h> #include <core/tnlAssert.h> Loading @@ -43,6 +44,8 @@ class tnlCuda static bool checkDevice( const char* file_name, int line ); static size_t getFreeMemory(); protected: static int maxGridSize, maxBlockSize; Loading src/core/tnlHost.h +3 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #ifndef TNLHOST_H_ #define TNLHOST_H_ #include <unistd.h> #include <core/tnlDevice.h> #include <core/tnlString.h> Loading @@ -28,6 +29,8 @@ class tnlHost static tnlString getDeviceType(); static tnlDeviceEnum getDevice(); static size_t getFreeMemory(); }; #endif /* TNLHOST_H_ */ src/implementation/core/tnlCuda.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -421,3 +421,8 @@ bool tnlCuda::checkDevice( const char* file_name, int line ) #endif } size_t tnlCuda::getFreeMemory() { } src/implementation/core/tnlHost.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -30,4 +30,11 @@ tnlDeviceEnum tnlHost :: getDevice() return tnlHostDevice; }; size_t tnlHost::getFreeMemory() { long pages = sysconf(_SC_PHYS_PAGES); long page_size = sysconf(_SC_PAGE_SIZE); return pages * page_size; }; #endif /* TNLHOST_H_ */ Loading
src/core/arrays/tnlArray.h +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ class tnlSharedArray; template< typename Element, typename Device = tnlHost, typename Index = int > class tnlArray : public tnlObject class tnlArray : public virtual tnlObject { public: Loading
src/core/tnlCuda.h +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #define TNLCUDA_H_ #include <iostream> #include <unistd.h> #include <core/tnlDevice.h> #include <core/tnlString.h> #include <core/tnlAssert.h> Loading @@ -43,6 +44,8 @@ class tnlCuda static bool checkDevice( const char* file_name, int line ); static size_t getFreeMemory(); protected: static int maxGridSize, maxBlockSize; Loading
src/core/tnlHost.h +3 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #ifndef TNLHOST_H_ #define TNLHOST_H_ #include <unistd.h> #include <core/tnlDevice.h> #include <core/tnlString.h> Loading @@ -28,6 +29,8 @@ class tnlHost static tnlString getDeviceType(); static tnlDeviceEnum getDevice(); static size_t getFreeMemory(); }; #endif /* TNLHOST_H_ */
src/implementation/core/tnlCuda.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -421,3 +421,8 @@ bool tnlCuda::checkDevice( const char* file_name, int line ) #endif } size_t tnlCuda::getFreeMemory() { }
src/implementation/core/tnlHost.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -30,4 +30,11 @@ tnlDeviceEnum tnlHost :: getDevice() return tnlHostDevice; }; size_t tnlHost::getFreeMemory() { long pages = sysconf(_SC_PHYS_PAGES); long page_size = sysconf(_SC_PAGE_SIZE); return pages * page_size; }; #endif /* TNLHOST_H_ */