add group functionality.
This commit was SVN r751.
Этот коммит содержится в:
родитель
4d9dd4f5e5
Коммит
14bdbc5e91
@ -14,6 +14,33 @@
|
|||||||
#include "lam/lfc/lam_pointer_array.h"
|
#include "lam/lfc/lam_pointer_array.h"
|
||||||
#include "lam/util/output.h"
|
#include "lam/util/output.h"
|
||||||
|
|
||||||
|
static void lam_pointer_array_construct(lam_pointer_array_t *);
|
||||||
|
static void lam_pointer_array_destruct(lam_pointer_array_t *);
|
||||||
|
|
||||||
|
lam_class_t lam_pointer_array_t_class = {
|
||||||
|
"lam_pointer_array_t",
|
||||||
|
OBJ_CLASS(lam_object_t),
|
||||||
|
(lam_construct_t) lam_pointer_array_construct,
|
||||||
|
(lam_destruct_t) lam_pointer_array_destruct
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* lam_pointer_array constructor
|
||||||
|
*/
|
||||||
|
void lam_pointer_array_construct(lam_pointer_array_t *new_pointer_array){
|
||||||
|
|
||||||
|
/* return */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* lam_pointer_array destructor
|
||||||
|
*/
|
||||||
|
void lam_pointer_array_destruct(lam_pointer_array_t *pointer_array){
|
||||||
|
|
||||||
|
/* return */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add a pointer to dynamic pointer table
|
* add a pointer to dynamic pointer table
|
||||||
*
|
*
|
||||||
|
@ -7,16 +7,20 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "lam/threads/mutex.h"
|
#include "lam/threads/mutex.h"
|
||||||
|
#include "lam/lfc/lam_object.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* typedefs
|
* typedefs
|
||||||
*/
|
*/
|
||||||
typedef struct lam_pointer_array_t lam_pointer_array_t;
|
typedef struct lam_pointer_array_t lam_pointer_array_t;
|
||||||
|
extern lam_class_t lam_pointer_array_t_class;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dynamic pointer array
|
* dynamic pointer array
|
||||||
*/
|
*/
|
||||||
struct lam_pointer_array_t {
|
struct lam_pointer_array_t {
|
||||||
|
/* base class */
|
||||||
|
lam_object_t super;
|
||||||
/* synchronization object */
|
/* synchronization object */
|
||||||
lam_mutex_t lock;
|
lam_mutex_t lock;
|
||||||
/* inde_ of lowest free element */
|
/* inde_ of lowest free element */
|
||||||
|
@ -5,11 +5,17 @@
|
|||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
include $(top_srcdir)/config/Makefile.options
|
||||||
|
|
||||||
|
noinst_LTLIBRARIES = libmpi_group.la
|
||||||
|
|
||||||
# Source code files
|
# Source code files
|
||||||
|
|
||||||
headers = \
|
headers = \
|
||||||
group.h
|
group.h
|
||||||
|
|
||||||
|
libmpi_group_la_SOURCES = \
|
||||||
|
$(headers) \
|
||||||
|
mpi_group_init.c
|
||||||
|
|
||||||
# Conditionally install the header files
|
# Conditionally install the header files
|
||||||
|
|
||||||
if WANT_INSTALL_HEADERS
|
if WANT_INSTALL_HEADERS
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "mpi/proc/proc.h"
|
#include "mpi/proc/proc.h"
|
||||||
|
#include "lam/lfc/lam_pointer_array.h"
|
||||||
|
extern lam_class_t lam_group_t_class;
|
||||||
|
|
||||||
struct lam_group_t {
|
struct lam_group_t {
|
||||||
/* base class */
|
/* base class */
|
||||||
@ -23,4 +25,29 @@ struct lam_group_t {
|
|||||||
};
|
};
|
||||||
typedef struct lam_group_t lam_group_t;
|
typedef struct lam_group_t lam_group_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Table for Fortran <-> C group handle conversion
|
||||||
|
*/
|
||||||
|
extern lam_pointer_array_t *lam_group_f_to_c_table;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* function prototypes
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This routine is used to allocate a new group structure
|
||||||
|
*
|
||||||
|
* @param group_size Number of MPI processes in the group
|
||||||
|
*
|
||||||
|
* @return Pointer to new group structure
|
||||||
|
*/
|
||||||
|
lam_group_t *group_allocate(int group_size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize LAM group infrastructure
|
||||||
|
*
|
||||||
|
* @return Error code
|
||||||
|
*/
|
||||||
|
int lam_group_init(void);
|
||||||
|
|
||||||
#endif /* LAM_GROUP_H */
|
#endif /* LAM_GROUP_H */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user