Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ set( root_files
"graphblas/io.hpp" "graphblas/iomode.hpp" "graphblas/matrix.hpp"
"graphblas/monoid.hpp" "graphblas/ops.hpp" "graphblas/phase.hpp"
"graphblas/pinnedvector.hpp" "graphblas/properties.hpp" "graphblas/rc.hpp"
"graphblas/semiring.hpp" "graphblas/spmd.hpp" "graphblas/tags.hpp"
"graphblas/semiring.hpp" "graphblas/spmd.hpp" "graphblas/rdma.hpp" "graphblas/tags.hpp"
"graphblas/type_traits.hpp" "graphblas/utils.hpp" "graphblas/vector.hpp"
"graphblas/synchronizedNonzeroIterator.hpp" "graphblas/nonzeroStorage.hpp"
"graphblas/selection_ops.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/graphblas.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ namespace grb {
#include <graphblas/pinnedvector.hpp>
#include <graphblas/properties.hpp>
#include <graphblas/spmd.hpp>
#include <graphblas/rdma.hpp>

#ifdef _GRB_WITH_LPF
// collects various BSP utilities
Expand Down
85 changes: 85 additions & 0 deletions include/graphblas/base/rdma.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

/*
* Copyright 2021 Huawei Technologies Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* @file
*
* Exposes facilities for Remote Direct Memory Access
*
* @author G. Gaio
* @date 16th of December, 2025
*/

#ifndef _H_GRB_BASE_RDMA
#define _H_GRB_BASE_RDMA

#include <cstddef> //size_t

#include <stdint.h> // SIZE_MAX

#include <graphblas/backends.hpp>
#include <graphblas/rc.hpp>

#include "config.hpp"


namespace grb {

/**
* For backends that support multiple user processes this class defines some
* basic primitives to support RDMA programming.
*
* All backends must implement this interface, including backends that do not
* support multiple user processes. The interface herein defined hence ensures
* to allow for trivial implementations for single user process backends.
*/
template< Backend implementation >
class rdma {
public:
template< typename T >
static grb::RC register_global( T &buf);

template< typename T >
static grb::RC register_global( grb::Vector< T, grb::reference > &buf );

template< typename T >
static grb::RC get( const size_t src_pid, T &src, T &dst );

template<
grb::Descriptor descr = descriptors::no_operation,
grb::Backend backend = grb::reference,
typename T,
typename Coords
>
static grb::RC get( const size_t src_pid, const grb::Vector< T, backend, Coords > &src, grb::Vector< T, backend, Coords > &dst );

template< typename T >
static grb::RC put( const T &src, const size_t dst_pid, T &dst );

template<
grb::Descriptor descr = descriptors::no_operation,
grb::Backend backend = grb::reference,
typename T,
typename Coords
>
static grb::RC put( const grb::Vector< T, backend, Coords > &src, const size_t dst_pid, grb::Vector< T, backend, Coords > &dst);
}; // end class ``rdma''

} // namespace grb

#endif // end _H_GRB_BASE_SPMD

Loading