Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
9e28024a
Commit
9e28024a
authored
Dec 01, 2005
by
Nathan Sidwell
Committed by
Nathan Sidwell
Dec 01, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* vec.h (VEC_block_remove): New.
From-SVN: r107817
parent
5d352b2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
gcc/ChangeLog
+4
-0
gcc/vec.h
+31
-0
No files found.
gcc/ChangeLog
View file @
9e28024a
2005
-
12
-
01
Nathan
Sidwell
<
nathan
@codesourcery
.
com
>
*
vec
.
h
(
VEC_block_remove
)
:
New
.
2005
-
12
-
01
Gabriel
Dos
Reis
<
gdr
@integrable
-
solutions
.
net
>
PR
c
/
13384
...
...
gcc/vec.h
View file @
9e28024a
...
...
@@ -366,6 +366,15 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#define VEC_unordered_remove(T,V,I) \
(VEC_OP(T,base,unordered_remove)(VEC_BASE(V),I VEC_CHECK_INFO))
/* Remove a block of elements
void VEC_T_block_remove (VEC(T) *v, unsigned ix, unsigned len);
Remove LEN elements starting at the IXth. Ordering is retained.
This is an O(1) operation. */
#define VEC_block_remove(T,V,I,L) \
(VEC_OP(T,base,block_remove)(VEC_BASE(V),I,L VEC_CHECK_INFO))
/* Get the address of the array of elements
T *VEC_T_address (VEC(T) v)
...
...
@@ -636,6 +645,17 @@ static inline T VEC_OP (T,base,unordered_remove) \
return obj_; \
} \
\
static inline void VEC_OP (T,base,block_remove) \
(VEC(T,base) *vec_, unsigned ix_, unsigned len_ VEC_CHECK_DECL) \
{ \
T *slot_; \
\
VEC_ASSERT (ix_ + len_ <= vec_->num, "block_remove", T, base); \
slot_ = &vec_->vec[ix_]; \
vec_->num -= len_; \
memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (T)); \
} \
\
static inline T *VEC_OP (T,base,address) \
(VEC(T,base) *vec_) \
{ \
...
...
@@ -886,6 +906,17 @@ static inline void VEC_OP (T,base,unordered_remove) \
vec_->vec[ix_] = vec_->vec[--vec_->num]; \
} \
\
static inline void VEC_OP (T,base,block_remove) \
(VEC(T,base) *vec_, unsigned ix_, unsigned len_ VEC_CHECK_DECL) \
{ \
T *slot_; \
\
VEC_ASSERT (ix_ + len_ <= vec_->num, "block_remove", T, base); \
slot_ = &vec_->vec[ix_]; \
vec_->num -= len_; \
memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (T)); \
} \
\
static inline T *VEC_OP (T,base,address) \
(VEC(T,base) *vec_) \
{ \
...
...
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