Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TAPIOCA
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Francois Tessier
TAPIOCA
Commits
d74c7497
Commit
d74c7497
authored
Aug 15, 2017
by
Francois Tessier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redesign the memory abstraction interface
parent
a1f7b43b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
3 deletions
+55
-3
architectures/tp_memory_interface.hpp
architectures/tp_memory_interface.hpp
+52
-0
architectures/tp_network_interface.hpp
architectures/tp_network_interface.hpp
+3
-3
No files found.
architectures/tp_memory_interface.hpp
View file @
d74c7497
#ifndef TP_MEMORY_INTERFACE_H
#define TP_MEMORY_INTERFACE_H
#include <stdio.h>
#include <stdlib.h>
typedef
enum
{
DDR
,
HBM
,
SSD
,
HDD
}
mem_t
;
class
iMemory
{
public:
/************************/
/* |-- Allocation */
/************************/
virtual
void
memAlloc
(
int64_t
buffSize
,
mem_t
mem
,
int
masterRank
,
char
*
fileName
,
MPI_Comm
comm
);
virtual
void
memFree
(
);
/************************/
/* |-- I/O */
/************************/
//virtual int memWrite ( iMemory srcMem, int64_t srcSize, int64_t offset );
//virtual int memRead ( iMemory srcMem, int64_t srcSize, int64_t offset );
virtual
int
memWrite
(
void
*
srcBuffer
,
int64_t
srcSize
,
int64_t
offset
);
virtual
int
memRead
(
void
*
srcBuffer
,
int64_t
srcSize
,
int64_t
offset
);
virtual
int
memFlush
(
);
/************************/
/* |-- Utils */
/************************/
virtual
char
*
memName
(
);
virtual
mem_t
memType
(
char
*
name
);
/************************/
/* |-- Characteristics */
/************************/
virtual
int64_t
memBandwidth
(
);
virtual
int64_t
memLatency
(
);
virtual
int64_t
memCapacity
(
);
protected:
mem_t
mem_
;
int
masterRank_
;
MPI_Comm
comm_
;
void
*
buffer_
;
int64_t
buffSize_
;
MPI_Win
RMAWin_
;
MPI_File
fileHandle_
;
char
fileName_
[
4096
];
};
#endif // TP_MEMORY_INTERFACE_H
architectures/tp_network_interface.hpp
View file @
d74c7497
#ifndef T
OPOLOGY
_H
#define T
OPOLOGY
_H
#ifndef T
P_NETWORK_INTERFACE
_H
#define T
P_NETWORK_INTERFACE
_H
#include <stdio.h>
#include <stdlib.h>
...
...
@@ -41,4 +41,4 @@ class iTopology {
//virtual int LinkToId ( int srcRank, int destRank ) = 0;
};
#endif // T
OPOLOGY
_H
#endif // T
P_NETWORK_INTERFACE
_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment