2016-11-23 02:03:20 +03:00
|
|
|
/*
|
2018-02-21 19:26:32 +03:00
|
|
|
* Copyright (c) 2013-2018 Mellanox Technologies, Inc.
|
2016-11-23 02:03:20 +03:00
|
|
|
* All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
#ifndef _PROC_GROUP_CACHE_H
|
|
|
|
#define _PROC_GROUP_CACHE_H
|
|
|
|
|
|
|
|
#include "oshmem_config.h"
|
|
|
|
#include "proc.h"
|
|
|
|
|
2018-02-21 19:26:32 +03:00
|
|
|
#define OSHMEM_GROUP_CACHE_ENABLED 1
|
|
|
|
|
2016-11-23 02:03:20 +03:00
|
|
|
BEGIN_C_DECLS
|
2018-02-21 19:26:32 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A group cache.
|
|
|
|
*
|
|
|
|
* Deletion of a group is not implemented because it
|
|
|
|
* requires a synchronization between PEs
|
|
|
|
*
|
|
|
|
* If cache enabled every group is kept until the
|
|
|
|
* shmem_finalize() is called
|
|
|
|
*/
|
|
|
|
|
|
|
|
int oshmem_group_cache_init(void);
|
|
|
|
void oshmem_group_cache_destroy(void);
|
|
|
|
|
|
|
|
oshmem_group_t* oshmem_group_cache_find(int pe_start, int pe_stride, int pe_size);
|
|
|
|
|
|
|
|
int oshmem_group_cache_insert(oshmem_group_t *group, int pe_start,
|
|
|
|
int pe_stride, int pe_size);
|
|
|
|
|
|
|
|
static inline int oshmem_group_cache_enabled(void)
|
|
|
|
{
|
|
|
|
return OSHMEM_GROUP_CACHE_ENABLED;
|
|
|
|
}
|
|
|
|
|
2016-11-23 02:03:20 +03:00
|
|
|
END_C_DECLS
|
|
|
|
|
|
|
|
#endif
|