Skip to content

Commit

Permalink
added license file.
Browse files Browse the repository at this point in the history
fixed registration of solver to factory
  • Loading branch information
Synge Todo committed May 2, 2013
1 parent 8da3d08 commit cc956ff
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 8 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Expand Up @@ -7,9 +7,13 @@ include(add_rokko_test)
# enable C and C++ compilers
enable_language(C CXX Fortran)

# options
option(BUILD_SHARED_LIBS "Build shared libraries" ON)

# MPI library
find_package(MPI)

# find Eigen3 Library
# Eigen3 Library
find_package(Eigen3)

set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
Expand Down
23 changes: 23 additions & 0 deletions LICENSE_1_0.txt
@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
3 changes: 3 additions & 0 deletions rokko/CMakeLists.txt
@@ -1,4 +1,7 @@
include_directories(${ELEMENTAL_INCLUDE_DIRS})

set(ROKKO_SOURCES solver_factory.cpp)
set(ROKKO_SOURCES ${ROKKO_SOURCES} elemental/elemental.cpp)

add_library(rokko ${ROKKO_SOURCES})
target_link_libraries(rokko ${ELEMENTAL_LIBRARIES})
4 changes: 4 additions & 0 deletions rokko/elemental/elemental.cpp
@@ -0,0 +1,4 @@
#include <rokko/solver_factory.hpp>
#include <rokko/elemental/core.hpp>

ROKKO_REGISTER_SOLVER(rokko::elemental::solver, "elemental")
12 changes: 12 additions & 0 deletions rokko/solver.hpp
@@ -1,3 +1,15 @@
/*****************************************************************************
*
* Rokko: Integrated Interface for libraries of eigenvalue decomposition
*
* Copyright (C) 2012-2013 by Tatsuya Sakashita <t-sakashita@issp.u-tokyo.ac.jp>,
* Synge Todo <wistaria@comp-phys.org>
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*****************************************************************************/

#ifndef ROKKO_SOLVER_HPP
#define ROKKO_SOLVER_HPP

Expand Down
3 changes: 0 additions & 3 deletions rokko/solver_factory.cpp
Expand Up @@ -29,6 +29,3 @@ solver_factory* solver_factory::instance() {
solver_factory* solver_factory::instance_ = 0;

} // end namespace rokko

#include <rokko/elemental/core.hpp>
ROKKO_REGISTER_SOLVER(rokko::elemental::solver, "elemental")
17 changes: 13 additions & 4 deletions rokko/solver_factory.hpp
@@ -1,3 +1,15 @@
/*****************************************************************************
*
* Rokko: Integrated Interface for libraries of eigenvalue decomposition
*
* Copyright (C) 2012-2013 by Tatsuya Sakashita <t-sakashita@issp.u-tokyo.ac.jp>,
* Synge Todo <wistaria@comp-phys.org>
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*****************************************************************************/

#ifndef ROKKO_SOLVER_FACTORY_H
#define ROKKO_SOLVER_FACTORY_H

Expand Down Expand Up @@ -86,9 +98,6 @@ class solver_factory : private boost::noncopyable {
} // end namespace rokko

#define ROKKO_REGISTER_SOLVER(solver, name) \
namespace { \
const bool BOOST_JOIN(solver_, __LINE__) = \
rokko::solver_factory::instance()->register_creator<solver>(name); \
}
namespace { struct register_caller { register_caller() { rokko::solver_factory::instance()->register_creator<solver>(name); } } caller; }

#endif // ROKKO_SOLVER_FACTORY_H

0 comments on commit cc956ff

Please sign in to comment.