License stuff and a bit of documentation

parent bd393cae
# unsafe_mpi # unsafe_mpi
Unsafe but fast additions to Boost.MPI Unsafe but fast additions to Boost.MPI
Published under the Boost Software License, Version 1.0 (see LICENSE)
#pragma once #pragma once
/*
* allgatherv.hpp -- MPI_Allgatherv wrapper for std::vector
*
* Copyright (C) 2015 Lorenz Hübschle-Schneider <lorenz@4z2.de>
* Published under the Boost Software License, Version 1.0
*/
#include <errno.h> #include <errno.h>
#include <mpi.h> #include <mpi.h>
......
#pragma once #pragma once
/*
* broadcast.hpp -- MPI_Bcast wrapper for std::vector, supports serialization
* using Boost.Serialize
*
* Copyright (C) 2015 Lorenz Hübschle-Schneider <lorenz@4z2.de>
* Published under the Boost Software License, Version 1.0
*/
#include <mpi.h> #include <mpi.h>
#include <errno.h> #include <errno.h>
......
#pragma once #pragma once
/*
* common.hpp -- Triviality test for data types
*
* Copyright (C) 2015 Lorenz Hübschle-Schneider <lorenz@4z2.de>
* Published under the Boost Software License, Version 1.0
*/
#include <type_traits> #include <type_traits>
#include <utility> #include <utility>
namespace unsafe_mpi { namespace unsafe_mpi {
// Sort-of unsafe MPI operations on "trivial enough" (i.e. standard layout) data /*
// mostly because std::pair isn't technically a trivial type, but we want to treat it like one * Define "trivial enough" type trait for things that can be copied bitwise
* mostly because std::is_trivial is very strict, and std::pair does not fulfill
* its requirements, but is trivial enough [TM] in practice.
*
* Override this for any sufficiently trivial own data types.
*/
template <typename T> template <typename T>
struct is_trivial_enough : public std::is_trivial<T> {}; struct is_trivial_enough : public std::is_trivial<T> {};
// Pairs are trivial enough [TM] if both components are trivial enough [TM] // Pairs are trivial enough [TM] if both components are.
template <typename U, typename V> template <typename U, typename V>
struct is_trivial_enough<std::pair<U,V>> : struct is_trivial_enough<std::pair<U,V>> :
public std::integral_constant<bool, public std::integral_constant<bool,
is_trivial_enough<U>::value && is_trivial_enough<V>::value is_trivial_enough<U>::value && is_trivial_enough<V>::value
> {}; > {};
} }
#pragma once #pragma once
/*
* gatherv.hpp -- MPI_Gatherv wrapper for std::vector
*
* Copyright (C) 2015 Lorenz Hübschle-Schneider <lorenz@4z2.de>
* Published under the Boost Software License, Version 1.0
*/
#include <errno.h> #include <errno.h>
#include <mpi.h> #include <mpi.h>
......
#pragma once #pragma once
/*
* point-to-point.h -- send/receive wrappers for std::vector
*
* Copyright (C) 2015 Lorenz Hübschle-Schneider <lorenz@4z2.de>
* Published under the Boost Software License, Version 1.0
*/
#include <cstdint> #include <cstdint>
#include <vector> #include <vector>
......
#pragma once #pragma once
/*
* Fast, but potentially unsafe additions to Boost.MPI
*
* Copyright (C) 2015 Lorenz Hübschle-Schneider <lorenz@4z2.de>
* Published under the Boost Software License, Version 1.0
*/
#include "common.h" #include "common.h"
#include "point-to-point.h" #include "point-to-point.h"
......
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