Last change
on this file since 1571 was
1460,
checked in by yushan, 7 years ago
|
branch_openmp merged with XIOS_DEV_CMIP6@1459
|
File size:
906 bytes
|
Line | |
---|
1 | #ifndef __XIOS_DISTRIBUTE_FILE_SERVER2_HPP__ |
---|
2 | #define __XIOS_DISTRIBUTE_FILE_SERVER2_HPP__ |
---|
3 | |
---|
4 | #include <cstddef> |
---|
5 | #include <string> |
---|
6 | |
---|
7 | namespace xios |
---|
8 | { |
---|
9 | |
---|
10 | |
---|
11 | struct SDistServer ; |
---|
12 | struct SDistFiles ; |
---|
13 | struct SDistGrid ; |
---|
14 | |
---|
15 | struct SDistFile |
---|
16 | { |
---|
17 | SDistServer* servers_ ; |
---|
18 | std::string id_; |
---|
19 | |
---|
20 | double bandwith_ ; |
---|
21 | int nbGrids_ ; |
---|
22 | int* assignedGrid_ ; |
---|
23 | int assignedServer_ ; |
---|
24 | |
---|
25 | } ; |
---|
26 | |
---|
27 | struct SDistServer |
---|
28 | { |
---|
29 | SDistFile* files_ ; |
---|
30 | SDistGrid* grids_ ; |
---|
31 | |
---|
32 | double energy_ ; |
---|
33 | double bandwith_ ; |
---|
34 | double memory_ ; |
---|
35 | int nMaxGrid_ ; |
---|
36 | int* assignedGrid_ ; |
---|
37 | int num_ ; |
---|
38 | |
---|
39 | void initialize(int num, int nMaxGrid, SDistGrid* grids, int nMaxFile, SDistFile* files) ; |
---|
40 | void finalize(void) ; |
---|
41 | |
---|
42 | double addFile(int numFile) ; |
---|
43 | double removeFile(int numFile) ; |
---|
44 | } ; |
---|
45 | |
---|
46 | struct SDistGrid |
---|
47 | { |
---|
48 | double size_ ; |
---|
49 | } ; |
---|
50 | |
---|
51 | void distributeFileOverServer2(int nbServers, int nGrids, SDistGrid* grids, int nFiles, SDistFile* files); |
---|
52 | } |
---|
53 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.