8 #define BOOST_TEST_DYN_LINK 
    9 #include <boost/test/unit_test.hpp> 
   10 #include "DMatrix/EMatrix.hpp" 
   11 #include "memory/HeapMemory.hpp" 
   15 BOOST_AUTO_TEST_SUITE (EMatrix_test)
 
   17 BOOST_AUTO_TEST_CASE( EMatrix_test_use)
 
   24     for (
size_t i = 0 ; i < 8 ; i++)
 
   26         for (
size_t j = 0 ; j < 5 ; j++)
 
   39     BOOST_REQUIRE_EQUAL(pr,8*5*
sizeof(
double) + 2*
sizeof(
size_t));
 
   45     for (
size_t i = 0 ; i < 8 ; i++)
 
   47         for (
size_t j = 0 ; j < 5 ; j++)
 
   54     for (
size_t i = 0 ; i < 8 ; i++)
 
   56         for (
size_t j = 0 ; j < 5 ; j++)
 
   57         {BOOST_REQUIRE_EQUAL(em(i,j),i*8+j);}
 
   67     for (
size_t i = 0 ; i < 3 ; i++)
 
   69         for (
size_t j = 0 ; j < 3 ; j++)
 
   82     BOOST_REQUIRE_EQUAL(pr,3*3*
sizeof(
double) + 2*
sizeof(
size_t));
 
   88     for (
size_t i = 0 ; i < 3 ; i++)
 
   90         for (
size_t j = 0 ; j < 3 ; j++)
 
   97     for (
size_t i = 0 ; i < 3 ; i++)
 
   99         for (
size_t j = 0 ; j < 3 ; j++)
 
  100         {BOOST_REQUIRE_EQUAL(em(i,j),i*8+j);}
 
  105 BOOST_AUTO_TEST_SUITE_END()
 
virtual bool allocate(size_t sz)
allocate memory 
 
This class allocate, and destroy CPU memory. 
 
virtual void incRef()
Increment the reference counter.