Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
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
abc
Commits
67127b83
Commit
67127b83
authored
May 30, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New DSD detection code.
parent
c50c1fc6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
abclib.dsp
+4
-0
src/map/if/ifDsd.c
+0
-0
src/misc/vec/vecHsh.h
+16
-7
No files found.
abclib.dsp
View file @
67127b83
...
@@ -2287,6 +2287,10 @@ SOURCE=.\src\map\if\ifDec16.c
...
@@ -2287,6 +2287,10 @@ SOURCE=.\src\map\if\ifDec16.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\map\if\ifDsd.c
# End Source File
# Begin Source File
SOURCE=.\src\map\if\ifLibBox.c
SOURCE=.\src\map\if\ifLibBox.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/map/if/ifDsd.c
0 → 100644
View file @
67127b83
This diff is collapsed.
Click to expand it.
src/misc/vec/vecHsh.h
View file @
67127b83
...
@@ -137,10 +137,18 @@ static inline int Hsh_IntManHash( unsigned * pData, int nSize, int nTableSize )
...
@@ -137,10 +137,18 @@ static inline int Hsh_IntManHash( unsigned * pData, int nSize, int nTableSize )
Key
+=
pDataC
[
c
]
*
s_Primes
[
c
%
7
];
Key
+=
pDataC
[
c
]
*
s_Primes
[
c
%
7
];
return
(
int
)(
Key
%
nTableSize
);
return
(
int
)(
Key
%
nTableSize
);
}
}
static
inline
int
Hsh_IntManAdd
(
Hsh_IntMan_t
*
p
,
int
i
Data
)
static
inline
int
*
Hsh_IntManLookup
(
Hsh_IntMan_t
*
p
,
unsigned
*
p
Data
)
{
{
Hsh_IntObj_t
*
pObj
;
Hsh_IntObj_t
*
pObj
;
unsigned
*
pData
=
Hsh_IntData
(
p
,
iData
);
int
*
pPlace
=
Vec_IntEntryP
(
p
->
vTable
,
Hsh_IntManHash
(
pData
,
p
->
nSize
,
Vec_IntSize
(
p
->
vTable
))
);
for
(
;
(
pObj
=
Hsh_IntObj
(
p
,
*
pPlace
));
pPlace
=
&
pObj
->
iNext
)
if
(
!
memcmp
(
pData
,
Hsh_IntData
(
p
,
pObj
->
iData
),
sizeof
(
int
)
*
p
->
nSize
)
)
return
pPlace
;
assert
(
*
pPlace
==
-
1
);
return
pPlace
;
}
static
inline
int
Hsh_IntManAdd
(
Hsh_IntMan_t
*
p
,
int
iData
)
{
int
i
,
*
pPlace
;
int
i
,
*
pPlace
;
if
(
Vec_WrdSize
(
p
->
vObjs
)
>
Vec_IntSize
(
p
->
vTable
)
)
if
(
Vec_WrdSize
(
p
->
vObjs
)
>
Vec_IntSize
(
p
->
vTable
)
)
{
{
...
@@ -151,13 +159,14 @@ static inline int Hsh_IntManAdd( Hsh_IntMan_t * p, int iData )
...
@@ -151,13 +159,14 @@ static inline int Hsh_IntManAdd( Hsh_IntMan_t * p, int iData )
Hsh_IntObj
(
p
,
i
)
->
iNext
=
*
pPlace
;
*
pPlace
=
i
;
Hsh_IntObj
(
p
,
i
)
->
iNext
=
*
pPlace
;
*
pPlace
=
i
;
}
}
}
}
pPlace
=
Vec_IntEntryP
(
p
->
vTable
,
Hsh_IntManHash
(
pData
,
p
->
nSize
,
Vec_IntSize
(
p
->
vTable
))
);
pPlace
=
Hsh_IntManLookup
(
p
,
Hsh_IntData
(
p
,
iData
)
);
for
(
;
(
pObj
=
Hsh_IntObj
(
p
,
*
pPlace
));
pPlace
=
&
pObj
->
iNext
)
if
(
*
pPlace
==
-
1
)
if
(
!
memcmp
(
pData
,
Hsh_IntData
(
p
,
pObj
->
iData
),
sizeof
(
int
)
*
p
->
nSize
)
)
{
return
(
word
*
)
pObj
-
Vec_WrdArray
(
p
->
vObjs
);
*
pPlace
=
Vec_WrdSize
(
p
->
vObjs
);
*
pPlace
=
Vec_WrdSize
(
p
->
vObjs
);
Vec_WrdPush
(
p
->
vObjs
,
Hsh_IntWord
(
iData
,
-
1
)
);
Vec_WrdPush
(
p
->
vObjs
,
Hsh_IntWord
(
iData
,
-
1
)
);
return
Vec_WrdSize
(
p
->
vObjs
)
-
1
;
return
Vec_WrdSize
(
p
->
vObjs
)
-
1
;
}
return
(
word
*
)
Hsh_IntObj
(
p
,
*
pPlace
)
-
Vec_WrdArray
(
p
->
vObjs
);
}
}
/**Function*************************************************************
/**Function*************************************************************
...
...
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