Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cyril Moineau
aidge_core
Commits
5ace21a4
Commit
5ace21a4
authored
1 year ago
by
Maxence Naud
Committed by
Maxence Naud
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Add member function 'Tensor::backend' to check the backend in Tensor
parent
b4569cbe
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
include/aidge/data/Tensor.hpp
+6
-2
6 additions, 2 deletions
include/aidge/data/Tensor.hpp
with
6 additions
and
2 deletions
include/aidge/data/Tensor.hpp
+
6
−
2
View file @
5ace21a4
...
@@ -348,6 +348,10 @@ public:
...
@@ -348,6 +348,10 @@ public:
return
newTensor
;
return
newTensor
;
}
}
const
std
::
string
backend
()
const
{
return
hasImpl
()
?
getImpl
()
->
backend
()
:
""
;
}
/**
/**
* @brief Set the backend of the Tensor associated implementation. If there
* @brief Set the backend of the Tensor associated implementation. If there
* was no previous implementation set, data will be allocated, but it will
* was no previous implementation set, data will be allocated, but it will
...
@@ -410,8 +414,8 @@ public:
...
@@ -410,8 +414,8 @@ public:
* @brief Get the Impl object
* @brief Get the Impl object
* @return constexpr const std::shared_ptr<TensorImpl>&
* @return constexpr const std::shared_ptr<TensorImpl>&
*/
*/
constexpr
const
std
::
shared_ptr
<
TensorImpl
>
&
getImpl
()
const
{
return
mImpl
;
}
constexpr
const
std
::
shared_ptr
<
TensorImpl
>&
getImpl
()
const
noexcept
{
return
mImpl
;
}
constexpr
std
::
size_t
getImplOffset
()
const
{
return
mImplOffset
;
}
constexpr
std
::
size_t
getImplOffset
()
const
noexcept
{
return
mImplOffset
;
}
/**
/**
* @brief Set the Impl object
* @brief Set the Impl object
...
...
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