-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #785 from MichaelBrim/scalable-svcmgr
Scalability improvements and a few bug fixes
- Loading branch information
Showing
117 changed files
with
978 additions
and
27,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright (c) 2023, Lawrence Livermore National Security, LLC. | ||
* Produced at the Lawrence Livermore National Laboratory. | ||
* | ||
* Copyright 2023, UT-Battelle, LLC. | ||
* | ||
* LLNL-CODE-741539 | ||
* All rights reserved. | ||
* | ||
* This is the license for UnifyFS. | ||
* For details, see https://github.com/LLNL/UnifyFS. | ||
* Please read https://github.com/LLNL/UnifyFS/LICENSE for full license text. | ||
*/ | ||
|
||
#include "compare_fn.h" | ||
|
||
int int_compare_fn(const void* a, const void* b) | ||
{ | ||
int ai = *(int*)a; | ||
int bi = *(int*)b; | ||
if (ai == bi) { | ||
return 0; | ||
} else if (ai > bi) { | ||
return 1; | ||
} else { | ||
return -1; | ||
} | ||
} | ||
|
||
int uint_compare_fn(const void* a, const void* b) | ||
{ | ||
unsigned int ai = *(unsigned int*)a; | ||
unsigned int bi = *(unsigned int*)b; | ||
if (ai == bi) { | ||
return 0; | ||
} else if (ai > bi) { | ||
return 1; | ||
} else { | ||
return -1; | ||
} | ||
} | ||
|
||
int float_compare_fn(const void* a, const void* b) | ||
{ | ||
float af = *(float*)a; | ||
float bf = *(float*)b; | ||
if (af == bf) { | ||
return 0; | ||
} else if (af > bf) { | ||
return 1; | ||
} else { | ||
return -1; | ||
} | ||
} | ||
|
||
int double_compare_fn(const void* a, const void* b) | ||
{ | ||
double ad = *(double*)a; | ||
double bd = *(double*)b; | ||
if (ad == bd) { | ||
return 0; | ||
} else if (ad > bd) { | ||
return 1; | ||
} else { | ||
return -1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (c) 2023, Lawrence Livermore National Security, LLC. | ||
* Produced at the Lawrence Livermore National Laboratory. | ||
* | ||
* Copyright 2023, UT-Battelle, LLC. | ||
* | ||
* LLNL-CODE-741539 | ||
* All rights reserved. | ||
* | ||
* This is the license for UnifyFS. | ||
* For details, see https://github.com/LLNL/UnifyFS. | ||
* Please read https://github.com/LLNL/UnifyFS/LICENSE for full license text. | ||
*/ | ||
|
||
#ifndef COMPARE_FUNC_H | ||
#define COMPARE_FUNC_H | ||
|
||
typedef int (*compare_fn)(const void *, const void *); | ||
|
||
int int_compare_fn(const void* a, const void* b); | ||
int uint_compare_fn(const void* a, const void* b); | ||
|
||
int float_compare_fn(const void* a, const void* b); | ||
int double_compare_fn(const void* a, const void* b); | ||
|
||
#endif /* COMPARE_FN_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.