Skip to content
Snippets Groups Projects
Commit dec73a97 authored by Oliver Sander's avatar Oliver Sander
Browse files

Merge branch 'feature/remove-deprecated-2.9' into 'master'

Remove code deprecated in 2.9 or earlier

See merge request !233
parents 45995f0c c338e5f8
No related branches found
No related tags found
Loading
Pipeline #68019 passed
......@@ -5,6 +5,20 @@ SPDX-License-Identifier: LGPL-2.1-or-later
# dune-uggrid 2.10 (unreleased)
* Remove deprecated `AllocEnvMemory` and `FreeEnvMemory`. They were
wrappers of standard `malloc` and `free`.
* Remove deprecated `Mark` and `Release`. Use `MarkTmpMem` and
`ReleaseTmpMem` instead.
* Remove deprecated `HeapAllocMode` and its flags `FROM_BOTTOM` and `FROM_TOP`.
They lost any influence, as we use the system heap.
* Remove deprecated `DDD_InfoProcList`, use `DDD_InfoProcListRange` instead.
* Remove deprecated `DDD_IFOneway`, use method overload with context as first
argument instead.
# dune-uggrid 2.9 (2022-11-25)
* The `dune-uggrid` module does not set the preprocessor flag `HAVE_UG` anymore.
......
......@@ -70,11 +70,6 @@ enum HeapType {GENERAL_HEAP, /**< Heap with alloc/free mechanis
SIMPLE_HEAP /**< Heap with mark/release mechanism*/
};
enum [[deprecated]] HeapAllocMode
{FROM_TOP=1, /**< Allocate from top of stack */
FROM_BOTTOM=2 /**< Allocate from bottom of stack */
};
/****************************************************************************/
/****************************************************************************/
/** @name Defines and macros for the virtual heap management */
......@@ -136,16 +131,6 @@ void DisposeMem (HEAP *theHeap, void *buffer);
INT MarkTmpMem (HEAP *theHeap, INT *key);
void *GetTmpMem (HEAP *theHeap, MEM n, INT key);
INT ReleaseTmpMem (HEAP *theHeap, INT key);
[[deprecated("Mark taking a mode is deprecated")]] inline INT
Mark (HEAP *theHeap, INT mode, INT *key)
{
return MarkTmpMem(theHeap,key);
}
[[deprecated("Release taking a mode is deprecated")]] inline INT
Release (HEAP *theHeap, INT mode, INT key)
{
return ReleaseTmpMem(theHeap,key);
}
/* @} */
END_UG_NAMESPACE
......
......@@ -568,38 +568,6 @@ ENVITEM * NS_PREFIX SearchEnv (const char *name, const char *where, INT type, IN
return(SearchTree(name,type,dirtype));
}
/****************************************************************************/
/** \brief For backward compatibility: Allocate memory from environment heap
* @param size - number of bytes to be allocated
\deprecated Simply a wrapper for malloc()
@return <ul>
Pointer to allocated memory
*/
/****************************************************************************/
void * NS_PREFIX AllocEnvMemory (INT size)
{
return malloc(size);
}
/****************************************************************************/
/** \brief For backward compatibility: Deallocate memory from environment heap
* @param buffer - pointer to buffer previously allocated
\deprecated Simply a wrapper for free()
*/
/****************************************************************************/
void NS_PREFIX FreeEnvMemory (void *buffer)
{
free(buffer);
}
/****************************************************************************/
/** \brief For backward compatibility: Print size and used of environment heap to string
......
......@@ -199,12 +199,6 @@ INT MoveEnvItem (ENVITEM *item, ENVDIR *oldDir, ENVDIR *newDir
/* search the environment for an item */
ENVITEM *SearchEnv (const char *name, const char *where, INT type, INT dirtype);
/* allocate memory from the environment heap */
void *AllocEnvMemory (INT size);
/* deallocate memory from the environment heap */
void FreeEnvMemory (void *buffer);
/* print used and size of environment heap */
void EnvHeapInfo (char *s);
......
......@@ -405,8 +405,6 @@ public:
void DDD_PrioritySet(DDD::DDDContext& context, DDD_HDR, DDD_PRIO);
void DDD_AttrSet (DDD_HDR, DDD_ATTR); /* this shouldn't be allowed */
[[deprecated("Use `DDD_InfoProcListRange` instead")]]
int * DDD_InfoProcList (DDD::DDDContext& context, DDD_HDR);
DDD_PROC DDD_InfoProcPrio(const DDD::DDDContext& context, DDD_HDR, DDD_PRIO);
bool DDD_InfoIsLocal(const DDD::DDDContext& context, DDD_HDR);
int DDD_InfoNCopies(const DDD::DDDContext& context, DDD_HDR);
......
......@@ -512,52 +512,6 @@ DDD_InfoProcListRange::DDD_InfoProcListRange(DDDContext& context, const DDD_HDR
}
}
/****************************************************************************/
/* */
/* Function: DDD_InfoProcList */
/* */
/* Purpose: return list of couplings of certain object */
/* */
/* Input: hdr: DDD-header of object with coupling */
/* */
/* Output: pointer to localIBuffer, which has been filled with: */
/* 1) id of calling processor */
/* 2) priority of local object copy on calling processor */
/* 3) id of processor which holds an object copy */
/* 4) priority of copy on that processor */
/* 5) 3+4 repeated for each coupling */
/* 6) processor number = -1 as end mark */
/* */
/****************************************************************************/
int *DDD_InfoProcList (DDD::DDDContext& context, DDD_HDR hdr)
{
auto& mctx = context.cplmgrContext();
COUPLING *cpl;
int i, objIndex = OBJ_INDEX(hdr);
/* insert description of own (i.e. local) copy */
mctx.localIBuffer[0] = context.me();
mctx.localIBuffer[1] = OBJ_PRIO(hdr);
i=2;
/* append descriptions of foreign copies */
if (objIndex < context.couplingContext().nCpls)
{
for(cpl=IdxCplList(context, objIndex); cpl!=NULL; cpl=CPL_NEXT(cpl), i+=2) {
mctx.localIBuffer[i] = CPL_PROC(cpl);
mctx.localIBuffer[i+1] = cpl->prio;
}
}
/* append end mark */
mctx.localIBuffer[i] = -1;
return(mctx.localIBuffer);
}
/****************************************************************************/
......
......@@ -69,17 +69,4 @@ static int realScatterWrapper(DDD::DDDContext&, DDD_OBJ obj, void* data)
return realGather(obj, data);
}
void DDD_IFOneway(DDD_IF interface, DDD_IF_DIR direction, std::size_t size, ComProcPtr gather, ComProcPtr scatter)
{
realGather = gather;
realScatter = scatter;
DDD_IFOneway(globalDDDContext(), interface, direction, size, realGatherWrapper, realScatterWrapper);
}
int* DDD_InfoProcList(DDD_HDR hdr)
{
return DDD_InfoProcList(globalDDDContext(), hdr);
}
END_UGDIM_NAMESPACE
......@@ -114,7 +114,7 @@ enum HandlerSets
#define EVGHOST(e) (EPRIO(e)==PrioVGhost || EPRIO(e)==PrioVHGhost)
#define EHGHOST(e) (EPRIO(e)==PrioHGhost || EPRIO(e)==PrioVHGhost)
#define EGID(e) DDD_InfoGlobalId(PARHDRE(e))
#define EPROCLIST(context, e) DDD_InfoProcList(context, PARHDRE(e))
#define EPROCLIST(context, e) DDD_InfoProcListRange(context, PARHDRE(e))
#define EPROCPRIO(context, e,p) DDD_InfoProcPrio(context, PARHDRE(e),p)
#define ENCOPIES(context, e) DDD_InfoNCopies(context, PARHDRE(e))
#define EATTR(e) DDD_InfoAttr(PARHDRE(e))
......@@ -133,7 +133,7 @@ enum HandlerSets
#define VGHOST(e) (PRIO(e)==PrioVGhost || PRIO(e)==PrioVHGhost)
#define HGHOST(e) (PRIO(e)==PrioHGhost || PRIO(e)==PrioVHGhost)
#define GID(e) DDD_InfoGlobalId(PARHDR(e))
#define PROCLIST(context, e) DDD_InfoProcList(context, PARHDR(e))
#define PROCLIST(context, e) DDD_InfoProcListRange(context, PARHDR(e))
#define PROCPRIO(context, e,p) DDD_InfoProcPrio(context, PARHDR(e),p)
#define NCOPIES(context, e) DDD_InfoNCopies(context, PARHDR(e))
#define ATTR(e) DDD_InfoAttr(PARHDR(e))
......@@ -152,7 +152,7 @@ enum HandlerSets
#define VXVGHOST(e) (VXPRIO(e)==PrioVGhost || VXPRIO(e)==PrioVHGhost)
#define VXHGHOST(e) (VXPRIO(e)==PrioHGhost || VXPRIO(e)==PrioVHGhost)
#define VXGID(e) DDD_InfoGlobalId(PARHDRV(e))
#define VXPROCLIST(context, e) DDD_InfoProcList(context, PARHDRV(e))
#define VXPROCLIST(context, e) DDD_InfoProcListRange(context, PARHDRV(e))
#define VXPROCPRIO(context, e,p) DDD_InfoProcPrio(context, PARHDRV(e),p)
#define VXNCOPIES(context, e) DDD_InfoNCopies(context, PARHDRV(e))
#define VXATTR(e) DDD_InfoAttr(PARHDRV(e))
......@@ -376,10 +376,6 @@ void globalDDDContext(const std::shared_ptr<DDD::DDDContext>& context);
void globalDDDContext(std::nullptr_t);
using ComProcPtr = int (*)(DDD_OBJ, void *);
[[deprecated("Use `DDD_IFOneway(context, ...)` instead")]]
void DDD_IFOneway(DDD_IF, DDD_IF_DIR, size_t, ComProcPtr, ComProcPtr);
[[deprecated("Use `DDD_InfoProcListRange` instead")]]
int* DDD_InfoProcList(DDD_HDR);
#endif /* ModelP */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment