Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Root
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
cxwx
Root
Commits
763b94ae
Commit
763b94ae
authored
5 years ago
by
Stefan Wunsch
Browse files
Options
Downloads
Patches
Plain Diff
[TMVA experimental] Add correct RTensor interface for const objects
parent
2824060d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tmva/tmva/inc/TMVA/RTensor.hxx
+6
-4
6 additions, 4 deletions
tmva/tmva/inc/TMVA/RTensor.hxx
with
6 additions
and
4 deletions
tmva/tmva/inc/TMVA/RTensor.hxx
+
6
−
4
View file @
763b94ae
...
...
@@ -227,8 +227,10 @@ public:
std
::
size_t
GetSize
()
const
{
return
fSize
;
}
Shape_t
GetShape
()
const
{
return
fShape
;
}
Shape_t
GetStrides
()
const
{
return
fStrides
;
}
Value_t
*
GetData
()
const
{
return
fData
;
}
std
::
shared_ptr
<
Container_t
>
GetContainer
()
const
{
return
fContainer
;
}
Value_t
*
GetData
()
{
return
fData
;
}
const
Value_t
*
GetData
()
const
{
return
fData
;
}
std
::
shared_ptr
<
Container_t
>
GetContainer
()
{
return
fContainer
;
}
const
std
::
shared_ptr
<
Container_t
>
GetContainer
()
const
{
return
fContainer
;
}
MemoryLayout
GetMemoryLayout
()
const
{
return
fLayout
;
}
bool
IsView
()
const
{
return
fContainer
==
NULL
;
}
bool
IsOwner
()
const
{
return
!
IsView
();
}
...
...
@@ -256,8 +258,8 @@ public:
Iterator
operator
++
(
int
)
{
auto
tmp
=
*
this
;
operator
++
();
return
tmp
;
}
Iterator
&
operator
--
()
{
fGlobalIndex
--
;
return
*
this
;
}
Iterator
operator
--
(
int
)
{
auto
tmp
=
*
this
;
operator
--
();
return
tmp
;
}
Iterator
operator
+
(
difference_type
rhs
)
{
return
Iterator
(
fTensor
,
fGlobalIndex
+
rhs
);
}
Iterator
operator
-
(
difference_type
rhs
)
{
return
Iterator
(
fTensor
,
fGlobalIndex
-
rhs
);
}
Iterator
operator
+
(
difference_type
rhs
)
const
{
return
Iterator
(
fTensor
,
fGlobalIndex
+
rhs
);
}
Iterator
operator
-
(
difference_type
rhs
)
const
{
return
Iterator
(
fTensor
,
fGlobalIndex
-
rhs
);
}
difference_type
operator
-
(
const
Iterator
&
rhs
)
{
return
fGlobalIndex
-
rhs
.
GetGlobalIndex
();
}
Iterator
&
operator
+=
(
difference_type
rhs
)
{
fGlobalIndex
+=
rhs
;
return
*
this
;
}
Iterator
&
operator
-=
(
difference_type
rhs
)
{
fGlobalIndex
-=
rhs
;
return
*
this
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment