Commit 65af8eb7 authored by incardon's avatar incardon
Browse files

Added missing files

parent b26f57eb
#ifndef CARTESIAN_GRAPH_UNIT_TEST_HPP
#define CARTESIAN_GRAPH_UNIT_TEST_HPP
#include "Graph/CartesianGraphFactory.hpp"
#include "map_graph.hpp"
#define GS_SIZE 8
/*!
*
* Test node
*
*/
struct node_cp
{
//! The node contain 3 unsigned long integer for comunication computation and memory
typedef boost::fusion::vector<size_t,size_t,size_t> type;
//! Attributes name
struct attributes
{
static const std::string name[];
};
//! The data
type data;
//! communication property id in boost::fusion::vector
static const unsigned int communication = 0;
//! computation property id in boost::fusion::vector
static const unsigned int computation = 1;
//! memory property id in boost::fusion::vector
static const unsigned int memory = 2;
//! total number of properties boost::fusion::vector
static const unsigned int max_prop = 3;
};
const std::string node_cp::attributes::name[] = {"communication","computation","memory"};
BOOST_AUTO_TEST_SUITE( CartesianGraphFactory_test )
BOOST_AUTO_TEST_CASE( CartesianGraphFactory_use)
{
typedef node_cp node;
CartesianGraphFactory<3,Graph_CSR<Point_test<float>,Point_test<float>>> g_factory;
// Cartesian grid
std::vector<size_t> sz;
sz.push_back(GS_SIZE);
sz.push_back(GS_SIZE);
sz.push_back(GS_SIZE);
// Box
Box<3,float> box({0.0,0.0,0.0},{1.0,1.0,1.0});
Graph_CSR<Point_test<float>,Point_test<float>> g = g_factory.construct<node::communication,float,2>(sz,box);
}
BOOST_AUTO_TEST_SUITE_END()
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment