Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
xerus
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xerus
xerus
Commits
aa5cad36
Commit
aa5cad36
authored
Jul 19, 2017
by
Ben Huber
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed compilation with gcc 7.1
parent
c1f013a4
Pipeline
#770
passed with stages
in 8 minutes and 24 seconds
Changes
5
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
8 deletions
+12
-8
include/xerus/cholmod_wrapper.h
include/xerus/cholmod_wrapper.h
+1
-0
include/xerus/measurments.h
include/xerus/measurments.h
+1
-0
include/xerus/tensor.h
include/xerus/tensor.h
+6
-5
include/xerus/tensorNetwork.h
include/xerus/tensorNetwork.h
+1
-0
src/xerus/tensor.cpp
src/xerus/tensor.cpp
+3
-3
No files found.
include/xerus/cholmod_wrapper.h
View file @
aa5cad36
...
...
@@ -27,6 +27,7 @@
#include <memory>
#include <map>
#include <mutex>
#include <functional>
#include <suitesparse/cholmod.h>
#include <suitesparse/SuiteSparseQR.hpp>
...
...
include/xerus/measurments.h
View file @
aa5cad36
...
...
@@ -26,6 +26,7 @@
#include <set>
#include <random>
#include <functional>
#include "basic.h"
...
...
include/xerus/tensor.h
View file @
aa5cad36
...
...
@@ -28,6 +28,7 @@
#include <limits>
#include <memory>
#include <random>
#include <functional>
#include "basic.h"
#include "misc/containerSupport.h"
...
...
@@ -159,7 +160,7 @@ namespace xerus {
* @param _dimensions the dimensions of the new tensor.
* @param _data inital dense data in row-major order.
*/
explicit
Tensor
(
DimensionTuple
_dimensions
,
std
::
unique_ptr
<
value_t
>&&
_data
);
explicit
Tensor
(
DimensionTuple
_dimensions
,
std
::
unique_ptr
<
value_t
[]
>&&
_data
);
/**
...
...
@@ -663,7 +664,7 @@ namespace xerus {
/**
* @brief Resets the tensor to the given dimensions and representation.
* @details Leaves the Tensor in the same state as if newly constructed with the the same arguments.
* @param _
dimensions
the dimensions of the new tensor.
* @param _
newDim
the dimensions of the new tensor.
* @param _representation the new representation of the tensor.
* @param _init (optional) data treatment, i.e. whether the tensor shall be zero initialized.
*/
...
...
@@ -672,7 +673,7 @@ namespace xerus {
/**
* @brief Resets the tensor to the given dimensions, preserving the current representation.
* @param _
dimensions
the dimensions of the new tensor.
* @param _
newDim
the dimensions of the new tensor.
* @param _init (optional) data treatment, i.e. whether the tensor shall be zero initialized.
*/
void
reset
(
DimensionTuple
_newDim
,
const
Initialisation
_init
=
Initialisation
::
Zero
);
...
...
@@ -685,7 +686,7 @@ namespace xerus {
/**
* @brief Resets the tensor to the given dimensions and uses the given data.
* @param _
dimensions
the dimensions of the new tensor.
* @param _
newDim
the dimensions of the new tensor.
* @param _newData new dense data in row-major order.
*/
void
reset
(
DimensionTuple
_newDim
,
const
std
::
shared_ptr
<
value_t
>&
_newData
);
...
...
@@ -693,7 +694,7 @@ namespace xerus {
/**
* @brief Resets the tensor to the given dimensions with data @a _newData.
* @param _
dimensions
the dimensions of the new tensor.
* @param _
newDim
the dimensions of the new tensor.
* @param _newData new dense data in row-major order.
*/
void
reset
(
DimensionTuple
_newDim
,
std
::
unique_ptr
<
value_t
[]
>&&
_newData
);
...
...
include/xerus/tensorNetwork.h
View file @
aa5cad36
...
...
@@ -26,6 +26,7 @@
#include <set>
#include <memory>
#include <functional>
#include "misc/fileIO.h"
#include "indexedTensor.h"
...
...
src/xerus/tensor.cpp
View file @
aa5cad36
...
...
@@ -65,8 +65,8 @@ namespace xerus {
}
Tensor
::
Tensor
(
DimensionTuple
_dimensions
,
std
::
unique_ptr
<
value_t
>&&
_data
)
:
dimensions
(
std
::
move
(
_dimensions
)),
size
(
misc
::
product
(
dimensions
)),
representation
(
Representation
::
Dense
),
denseData
(
std
::
move
(
_data
))
{
Tensor
::
Tensor
(
DimensionTuple
_dimensions
,
std
::
unique_ptr
<
value_t
[]
>&&
_data
)
:
dimensions
(
std
::
move
(
_dimensions
)),
size
(
misc
::
product
(
dimensions
)),
representation
(
Representation
::
Dense
),
denseData
(
_data
.
release
(
))
{
REQUIRE
(
size
!=
0
,
"May not create tensors with an dimension == 0."
);
}
...
...
@@ -600,7 +600,7 @@ namespace xerus {
representation
=
Representation
::
Dense
;
}
denseData
=
std
::
move
(
_newData
);
denseData
.
reset
(
_newData
.
release
()
);
}
void
Tensor
::
reset
(
DimensionTuple
_newDim
,
std
::
map
<
size_t
,
value_t
>&&
_newData
)
{
...
...
Martin
@Goedeker
mentioned in issue
#203 (closed)
·
Aug 04, 2017
mentioned in issue
#203 (closed)
mentioned in issue #203
Toggle commit list
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