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
9b195f83
Commit
9b195f83
authored
5 years ago
by
Danilo Piparo
Browse files
Options
Downloads
Patches
Plain Diff
[VecOps][NFC] Don't use the name TVec in the comments but rather RVec
parent
8a546ab9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tutorials/vecops/vo001_AdoptOrOwnMemory.C
+1
-1
1 addition, 1 deletion
tutorials/vecops/vo001_AdoptOrOwnMemory.C
tutorials/vecops/vo001_AdoptOrOwnMemory.py
+1
-1
1 addition, 1 deletion
tutorials/vecops/vo001_AdoptOrOwnMemory.py
with
2 additions
and
2 deletions
tutorials/vecops/vo001_AdoptOrOwnMemory.C
+
1
−
1
View file @
9b195f83
...
@@ -37,7 +37,7 @@ void vo001_AdoptOrOwnMemory()
...
@@ -37,7 +37,7 @@ void vo001_AdoptOrOwnMemory()
// Now, upon reallocation, the RVec stops adopting the memory and starts owning it. And yes,
// Now, upon reallocation, the RVec stops adopting the memory and starts owning it. And yes,
// a copy is triggered. Indeed internally the storage of the RVec is an std::vector. Moreover,
// a copy is triggered. Indeed internally the storage of the RVec is an std::vector. Moreover,
// the interface of the
T
Vec is very, very similar to the one of std::vector: you have already
// the interface of the
R
Vec is very, very similar to the one of std::vector: you have already
// noticed it when the `data()` method was invoked, right?
// noticed it when the `data()` method was invoked, right?
v2
.
push_back
(
UponCopyPrinter
());
v2
.
push_back
(
UponCopyPrinter
());
...
...
This diff is collapsed.
Click to expand it.
tutorials/vecops/vo001_AdoptOrOwnMemory.py
+
1
−
1
View file @
9b195f83
...
@@ -39,7 +39,7 @@ print("%s and %s" %(v.data(), v2.data()))
...
@@ -39,7 +39,7 @@ print("%s and %s" %(v.data(), v2.data()))
# Now, upon reallocation, the RVec stops adopting the memory and starts owning it. And yes,
# Now, upon reallocation, the RVec stops adopting the memory and starts owning it. And yes,
# a copy is triggered. Indeed internally the storage of the RVec is an std::vector. Moreover,
# a copy is triggered. Indeed internally the storage of the RVec is an std::vector. Moreover,
# the interface of the
T
Vec is very, very similar to the one of std::vector: you have already
# the interface of the
R
Vec is very, very similar to the one of std::vector: you have already
# noticed it when the `data()` method was invoked, right?
# noticed it when the `data()` method was invoked, right?
v2
.
resize
(
4
)
v2
.
resize
(
4
)
...
...
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