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
94fe470c
Unverified
Commit
94fe470c
authored
Feb 20, 2018
by
Jayaram Bobba
Committed by
GitHub
Feb 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into pruthvi/max_pooling
parents
cbec3ad8
67c97f6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
cpu_tensor_view.cpp
src/ngraph/runtime/cpu/cpu_tensor_view.cpp
+9
-0
No files found.
src/ngraph/runtime/cpu/cpu_tensor_view.cpp
View file @
94fe470c
...
...
@@ -56,7 +56,16 @@ runtime::cpu::CPUTensorView::CPUTensorView(const ngraph::element::Type& element_
throw
ngraph_error
(
"Error allocating CPU Tensor View memory"
);
}
buffer
=
static_cast
<
char
*>
(
ptr
);
// GCC major versions below 5 do not implement C++11 std::align
#if !defined(__GNUC__) || __GNUC__ >= 5
std
::
align
(
BufferAlignment
,
buffer_size
,
ptr
,
allocation_size
);
#else
ptr
=
static_cast
<
char
*>
(
ptr
)
+
(
BufferAlignment
-
1
);
ptr
=
reinterpret_cast
<
void
*>
(
reinterpret_cast
<
uintptr_t
>
(
ptr
)
&
~
(
uintptr_t
(
BufferAlignment
-
1
)));
#endif
aligned_buffer
=
static_cast
<
char
*>
(
ptr
);
}
}
...
...
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