Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
65eb0f09
Commit
65eb0f09
authored
Mar 06, 2019
by
pruthvi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added documentation for the cpu allocator class
parent
2a3ebb35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
cpu_mkl_allocator.hpp
src/ngraph/runtime/cpu/cpu_mkl_allocator.hpp
+7
-1
No files found.
src/ngraph/runtime/cpu/cpu_mkl_allocator.hpp
View file @
65eb0f09
...
@@ -55,6 +55,8 @@ namespace ngraph
...
@@ -55,6 +55,8 @@ namespace ngraph
}
}
}
}
// This class will be instantiated in the CPUCallFrame with the allocator object which will be used for the
// device memory allocation
class
ngraph
::
runtime
::
cpu
::
CPUAllocator
class
ngraph
::
runtime
::
cpu
::
CPUAllocator
{
{
public
:
public
:
...
@@ -69,7 +71,7 @@ private:
...
@@ -69,7 +71,7 @@ private:
size_t
m_alignment
;
size_t
m_alignment
;
};
};
// Abstarct class for the allocator
// Abstarct class for the allocator
, for allocating and deallocating device memory
class
ngraph
::
runtime
::
Allocator
class
ngraph
::
runtime
::
Allocator
{
{
public
:
public
:
...
@@ -77,6 +79,8 @@ public:
...
@@ -77,6 +79,8 @@ public:
virtual
void
cpu_free
(
void
*
ptr
,
void
*
)
=
0
;
virtual
void
cpu_free
(
void
*
ptr
,
void
*
)
=
0
;
};
};
// SystemAllocator overides and implements "cpu_malloc" & "cpu_free" of Alloctaor interface class
// this class uses system library malloc and free for device memory allocation
class
ngraph
::
runtime
::
SystemAllocator
:
public
ngraph
::
runtime
::
Allocator
class
ngraph
::
runtime
::
SystemAllocator
:
public
ngraph
::
runtime
::
Allocator
{
{
public
:
public
:
...
@@ -108,6 +112,8 @@ private:
...
@@ -108,6 +112,8 @@ private:
size_t
m_alignment
;
size_t
m_alignment
;
};
};
// FrameworkAllocator overides and implements "cpu_malloc" & "cpu_free" of Alloctaor interface class,
// this class uses framework provide allocators and deallocators for device memory allocation
class
ngraph
::
runtime
::
FrameworkAllocator
:
public
ngraph
::
runtime
::
Allocator
class
ngraph
::
runtime
::
FrameworkAllocator
:
public
ngraph
::
runtime
::
Allocator
{
{
public
:
public
:
...
...
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