Skip to content

Commit

Permalink
Merge branch 'whitespaces-in-some-files' into 'master'
Browse files Browse the repository at this point in the history
remove extra whitespaces in some files

See merge request integer/scip!3120
  • Loading branch information
GioniMexi committed Jul 18, 2023
2 parents d1ee85d + 5b50f24 commit 97e5e5c
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 141 deletions.
20 changes: 10 additions & 10 deletions src/blockmemshell/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ struct BMS_BlkMem
* Efficient memory management for multiple objects of the same size
********************************************************************/

/*
/*
* block memory methods for faster memory access
*/

Expand Down Expand Up @@ -725,7 +725,7 @@ struct BMS_ChkMem
{
CHUNK* rootchunk; /**< array with the chunks of the chunk header */
FREELIST* lazyfree; /**< lazy free list of unused memory elements of all chunks of this chunk block */
CHUNK* firsteager; /**< first chunk with a non-empty eager free list */
CHUNK* firsteager; /**< first chunk with a non-empty eager free list */
BMS_CHKMEM* nextchkmem; /**< next chunk block in the block memory's hash list */
int elemsize; /**< size of each memory element in the chunk memory */
int nchunks; /**< number of chunks in this chunk block (used slots of the chunk array) */
Expand All @@ -734,7 +734,7 @@ struct BMS_ChkMem
int lazyfreesize; /**< number of elements in the lazy free list of the chunk block */
int eagerfreesize; /**< total number of elements of all eager free lists of the block's chunks */
int initchunksize; /**< number of elements in the first chunk */
int garbagefactor; /**< garbage collector is called, if at least garbagefactor * avg. chunksize
int garbagefactor; /**< garbage collector is called, if at least garbagefactor * avg. chunksize
* elements are free (-1: disable garbage collection) */
#ifndef NDEBUG
char* filename; /**< source file, where this chunk block was created */
Expand Down Expand Up @@ -943,7 +943,7 @@ int linkChunk(
assert(chunk != NULL);
assert(chunk->store != NULL);

debugMessage("linking chunk %p to chunk block %p [elemsize:%d, %d chunks]\n",
debugMessage("linking chunk %p to chunk block %p [elemsize:%d, %d chunks]\n",
(void*)chunk, (void*)chkmem, chkmem->elemsize, chkmem->nchunks);

pos = rbTreeFindChunk(chkmem->rootchunk, chunk->store, &parent);
Expand Down Expand Up @@ -974,7 +974,7 @@ void unlinkChunk(
assert(chkmem != NULL);
assert(chkmem->elemsize == chunk->elemsize);

debugMessage("unlinking chunk %p from chunk block %p [elemsize:%d, %d chunks]\n",
debugMessage("unlinking chunk %p from chunk block %p [elemsize:%d, %d chunks]\n",
(void*)chunk, (void*)chkmem, chkmem->elemsize, chkmem->nchunks);

/* remove the chunk from the chunks of the chunk block */
Expand Down Expand Up @@ -1463,7 +1463,7 @@ void freeChkmemElement(
BMS_CHKMEM* BMScreateChunkMemory_call(
size_t size, /**< element size of the chunk block */
int initchunksize, /**< number of elements in the first chunk of the chunk block */
int garbagefactor, /**< garbage collector is called, if at least garbagefactor * avg. chunksize
int garbagefactor, /**< garbage collector is called, if at least garbagefactor * avg. chunksize
* elements are free (-1: disable garbage collection) */
const char* filename, /**< source file of the function call */
int line /**< line number in source file of the function call */
Expand Down Expand Up @@ -1734,7 +1734,7 @@ int getHashNumber(
/** creates a block memory allocation data structure */
BMS_BLKMEM* BMScreateBlockMemory_call(
int initchunksize, /**< number of elements in the first chunk of each chunk block */
int garbagefactor, /**< garbage collector is called, if at least garbagefactor * avg. chunksize
int garbagefactor, /**< garbage collector is called, if at least garbagefactor * avg. chunksize
* elements are free (-1: disable garbage collection) */
const char* filename, /**< source file of the function call */
int line /**< line number in source file of the function call */
Expand Down Expand Up @@ -2390,13 +2390,13 @@ void BMSdisplayBlockMemory_call(
}
#ifndef NDEBUG
printInfo(" Total %6d %4d %7d %7d %7d %5d %4d %5.1f%% %6.1f\n",
totalnchunks, totalneagerchunks, totalnelems, totalneagerelems, totalnlazyelems,
totalnchunks, totalneagerchunks, totalnelems, totalneagerelems, totalnlazyelems,
totalngarbagecalls, totalngarbagefrees,
totalnelems > 0 ? 100.0 * (double) (totalneagerelems + totalnlazyelems) / (double) (totalnelems) : 0.0,
(double)allocedmem/(1024.0*1024.0));
#else
printInfo(" Total %6d %4d %7d %7d %7d %5.1f%% %6.1f\n",
totalnchunks, totalneagerchunks, totalnelems, totalneagerelems, totalnlazyelems,
totalnchunks, totalneagerchunks, totalnelems, totalneagerelems, totalnlazyelems,
totalnelems > 0 ? 100.0 * (double) (totalneagerelems + totalnlazyelems) / (double) (totalnelems) : 0.0,
(double)allocedmem/(1024.0*1024.0));
#endif
Expand Down Expand Up @@ -3038,7 +3038,7 @@ void BMSfreeBufferMemory_work(
if ( bufnum == 0 && buffer->data[bufnum] != *ptr )
{
printErrorHeader(filename, line);
printError("Tried to free unkown buffer pointer.\n");
printError("Tried to free unknown buffer pointer.\n");
return;
}
if ( ! buffer->used[bufnum] )
Expand Down
8 changes: 4 additions & 4 deletions src/objscip/objprop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ static
SCIP_DECL_PROPCOPY(propCopyObj)
{ /*lint --e{715}*/
SCIP_PROPDATA* propdata;

assert(scip != NULL);

propdata = SCIPpropGetData(prop);
assert(propdata != NULL);
assert(propdata->objprop != NULL);
Expand Down Expand Up @@ -103,7 +103,7 @@ SCIP_DECL_PROPFREE(propFreeObj)
/* free prop data */
delete propdata;
SCIPpropSetData(prop, NULL); /*lint !e64*/

return SCIP_OKAY;
}

Expand Down Expand Up @@ -318,7 +318,7 @@ scip::ObjProp* SCIPfindObjProp(

return propdata->objprop;
}

/** returns the prop object for the given propagator */
scip::ObjProp* SCIPgetObjProp(
SCIP* scip, /**< SCIP data structure */
Expand Down
14 changes: 7 additions & 7 deletions src/scip/cons_and.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ SCIP_RETCODE consdataCatchEvents(
assert(consdata != NULL);

/* catch bound change events for both bounds on resultant variable */
SCIP_CALL( SCIPcatchVarEvent(scip, consdata->resvar, SCIP_EVENTTYPE_BOUNDCHANGED,
SCIP_CALL( SCIPcatchVarEvent(scip, consdata->resvar, SCIP_EVENTTYPE_BOUNDCHANGED,
eventhdlr, (SCIP_EVENTDATA*)consdata, NULL) );

/* catch tightening events for upper bound and relaxed events for lower bounds on operator variables */
Expand Down Expand Up @@ -3326,7 +3326,7 @@ SCIP_RETCODE cliquePresolve(
static
SCIP_DECL_HASHGETKEY(hashGetKeyAndcons)
{ /*lint --e{715}*/
/* the key is the element itself */
/* the key is the element itself */
return elem;
}

Expand Down Expand Up @@ -3398,8 +3398,8 @@ SCIP_DECL_HASHKEYVAL(hashKeyValAndcons)
return SCIPhashFour(consdata->nvars, minidx, mididx, maxidx);
}

/** compares each constraint with all other constraints for possible redundancy and removes or changes constraint
* accordingly; in contrast to removeRedundantConstraints(), it uses a hash table
/** compares each constraint with all other constraints for possible redundancy and removes or changes constraint
* accordingly; in contrast to removeRedundantConstraints(), it uses a hash table
*/
static
SCIP_RETCODE detectRedundantConstraints(
Expand Down Expand Up @@ -4545,7 +4545,7 @@ SCIP_DECL_CONSPRESOL(consPresolAnd)
{
if( *nfixedvars == oldnfixedvars && *naggrvars == oldnaggrvars )
{
if( firstchange < nconss )
if( firstchange < nconss )
{
/* detect redundant constraints; fast version with hash table instead of pairwise comparison */
SCIP_CALL( detectRedundantConstraints(scip, SCIPblkmem(scip), conss, nconss, &firstchange, &cutoff, naggrvars, ndelconss) );
Expand Down Expand Up @@ -4734,10 +4734,10 @@ SCIP_DECL_CONSCOPY(consCopyAnd)
consname = SCIPconsGetName(sourcecons);

/* creates and captures a AND-constraint */
SCIP_CALL( SCIPcreateConsAnd(scip, cons, consname, resvar, nvars, vars,
SCIP_CALL( SCIPcreateConsAnd(scip, cons, consname, resvar, nvars, vars,
initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );

TERMINATE:
TERMINATE:
/* free buffer array */
SCIPfreeBufferArray(scip, &vars);

Expand Down
18 changes: 9 additions & 9 deletions src/scip/cons_bounddisjunction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ SCIP_RETCODE processWatchedVars(
}

/* the literal is still undecided and can be used as watched variable */
nbranchings = SCIPvarGetNBranchingsCurrentRun(vars[v],
nbranchings = SCIPvarGetNBranchingsCurrentRun(vars[v],
boundtypes[v] == SCIP_BOUNDTYPE_LOWER ? SCIP_BRANCHDIR_DOWNWARDS : SCIP_BRANCHDIR_UPWARDS);
if( nbranchings < nbranchings2 )
{
Expand Down Expand Up @@ -1613,9 +1613,9 @@ SCIP_Bool isConsViolated(
return TRUE;
}

/* registers variables of a constraint as branching candidates
* indicates whether an n-ary branch is necessary to enforce this constraint,
* because all active literals are w.r.t. continuous variables which bound (in the literal) is at the variable's bound
/* registers variables of a constraint as branching candidates
* indicates whether an n-ary branch is necessary to enforce this constraint,
* because all active literals are w.r.t. continuous variables which bound (in the literal) is at the variable's bound
*/
static
SCIP_RETCODE registerBranchingCandidates(
Expand Down Expand Up @@ -2139,7 +2139,7 @@ SCIP_DECL_CONSDELETE(consDeleteBounddisjunction)
}


/** transforms constraint data into data belonging to the transformed problem */
/** transforms constraint data into data belonging to the transformed problem */
static
SCIP_DECL_CONSTRANS(consTransBounddisjunction)
{ /*lint --e{715}*/
Expand All @@ -2165,7 +2165,7 @@ SCIP_DECL_CONSTRANS(consTransBounddisjunction)
SCIP_CALL( SCIPcreateCons(scip, targetcons, SCIPconsGetName(sourcecons), conshdlr, targetdata,
SCIPconsIsInitial(sourcecons), SCIPconsIsSeparated(sourcecons), SCIPconsIsEnforced(sourcecons),
SCIPconsIsChecked(sourcecons), SCIPconsIsPropagated(sourcecons),
SCIPconsIsLocal(sourcecons), SCIPconsIsModifiable(sourcecons),
SCIPconsIsLocal(sourcecons), SCIPconsIsModifiable(sourcecons),
SCIPconsIsDynamic(sourcecons), SCIPconsIsRemovable(sourcecons), SCIPconsIsStickingAtNode(sourcecons)) );

return SCIP_OKAY;
Expand Down Expand Up @@ -2291,7 +2291,7 @@ SCIP_DECL_CONSCHECK(consCheckBounddisjunction)
assert(consdata->vars[v] != NULL);
if( v > 0 )
SCIPinfoMessage(scip, NULL, ", ");
SCIPinfoMessage(scip, NULL, "<%s> = %.15g",
SCIPinfoMessage(scip, NULL, "<%s> = %.15g",
SCIPvarGetName(consdata->vars[v]), SCIPgetSolVal(scip, sol, consdata->vars[v]));
}
SCIPinfoMessage(scip, NULL, ")\n");
Expand Down Expand Up @@ -2767,7 +2767,7 @@ SCIP_DECL_CONSPARSE(consParseBounddisjunction)
{
SCIP_VAR* var;

/* parse variable name */
/* parse variable name */
SCIP_CALL( SCIPparseVarName(scip, str, &var, &endptr) );

if( var == NULL )
Expand Down Expand Up @@ -2848,7 +2848,7 @@ SCIP_DECL_CONSPARSE(consParseBounddisjunction)
/* add bounddisjunction */
if( *success && nvars > 0 )
{
SCIP_CALL( SCIPcreateConsBounddisjunction(scip, cons, name, nvars, vars, boundtypes, bounds,
SCIP_CALL( SCIPcreateConsBounddisjunction(scip, cons, name, nvars, vars, boundtypes, bounds,
initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
}

Expand Down
Loading

0 comments on commit 97e5e5c

Please sign in to comment.