Commit 999d1ba3 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Debuging the matrix formats.

Implementing the matrix formats tests.
parent 631243a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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:

+3 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#define TNLCUDA_H_

#include <iostream>
#include <unistd.h>
#include <core/tnlDevice.h>
#include <core/tnlString.h>
#include <core/tnlAssert.h>
@@ -43,6 +44,8 @@ class tnlCuda

   static bool checkDevice( const char* file_name, int line );

   static size_t getFreeMemory();

   protected:

   static int maxGridSize, maxBlockSize;
+3 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#ifndef TNLHOST_H_
#define TNLHOST_H_

#include <unistd.h>
#include <core/tnlDevice.h>
#include <core/tnlString.h>

@@ -28,6 +29,8 @@ class tnlHost
   static tnlString getDeviceType();

   static tnlDeviceEnum getDevice();

   static size_t getFreeMemory();
};

#endif /* TNLHOST_H_ */
+5 −0
Original line number Diff line number Diff line
@@ -421,3 +421,8 @@ bool tnlCuda::checkDevice( const char* file_name, int line )
#endif
}

size_t tnlCuda::getFreeMemory()
{

}
+9 −2
Original line number Diff line number Diff line
@@ -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