Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
common
Compare revisions
a887a31b4b9541a0997e9fa8ac34ad62977813fc to 84f4b39f550925479257f3032002e9aab2a5999e
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
sip/common
Select target project
No results found
84f4b39f550925479257f3032002e9aab2a5999e
Select Git revision
Loading items
Swap
Target
sip/common
Select target project
sip/common
1 result
a887a31b4b9541a0997e9fa8ac34ad62977813fc
Select Git revision
Loading items
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source
1
Make Array to respect alignment
· 84f4b39f
D-AIRY
authored
May 2, 2020
84f4b39f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
array.h
+4
-4
4 additions, 4 deletions
array.h
math.h
+4
-0
4 additions, 0 deletions
math.h
types.h
+4
-0
4 additions, 0 deletions
types.h
with
12 additions
and
4 deletions
array.h
View file @
84f4b39f
...
...
@@ -208,7 +208,7 @@ public:
{
DestructInterval
(
0
,
Size
-
1
);
}
free
(
Data
);
_aligned_
free
(
Data
);
}
void
clear
()
...
...
@@ -217,7 +217,7 @@ public:
{
DestructInterval
(
0
,
Size
-
1
);
}
free
(
Data
);
_aligned_
free
(
Data
);
Size
=
0
;
AllocSize
=
0
;
Data
=
NULL
;
...
...
@@ -284,7 +284,7 @@ protected:
{
return
;
}
T
*
tmpData
=
(
T
*
)
malloc
(
sizeof
(
T
)
*
NewSize
);
T
*
tmpData
=
(
T
*
)
_aligned_
malloc
(
sizeof
(
T
)
*
NewSize
,
alignof
(
T
)
);
assert
(
tmpData
);
if
(
!
tmpData
)
{
...
...
@@ -300,7 +300,7 @@ protected:
this
->
AllocSize
=
NewSize
;
T
*
tmpDel
=
this
->
Data
;
this
->
Data
=
tmpData
;
free
(
tmpDel
);
_aligned_
free
(
tmpDel
);
}
void
ConstructInterval
(
UINT
start
,
UINT
end
)
...
...
This diff is collapsed.
Click to expand it.
math.h
View file @
84f4b39f
...
...
@@ -23,6 +23,10 @@ void operator delete(void* ptr)\
{\
_aligned_free(ptr);\
};\
void* operator new(size_t size, void *ptr)\
{\
return(ptr);\
};\
\
void* operator new[](size_t size)\
{\
...
...
This diff is collapsed.
Click to expand it.
types.h
View file @
84f4b39f
...
...
@@ -82,6 +82,10 @@ typedef void* SXWINDOW;
#define mem_free(a) free(a)
#define mem_alloc(a) malloc(a)
#if defined(_MSC_VER) && (_MSC_VER < 1900)
# define alignof __alignof
#endif
inline
const
char
*
basename
(
const
char
*
str
)
{
const
char
*
pos
=
str
;
...
...
This diff is collapsed.
Click to expand it.