Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Show more breadcrumbs
keyboard
LatinIME
Commits
1ce96fec
Commit
1ce96fec
authored
12 years ago
by
Ken Wakasa
Browse files
Options
Downloads
Patches
Plain Diff
Fix debug build error
Change-Id: Id18d72093a36d41859744f98238b3b761ddb667e
parent
0dfb89b4
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
native/jni/src/defines.h
+7
-7
7 additions, 7 deletions
native/jni/src/defines.h
native/jni/src/words_priority_queue.h
+3
-3
3 additions, 3 deletions
native/jni/src/words_priority_queue.h
with
10 additions
and
10 deletions
native/jni/src/defines.h
+
7
−
7
View file @
1ce96fec
...
...
@@ -19,6 +19,12 @@
#include
<stdint.h>
#ifdef __GNUC__
#define AK_FORCE_INLINE __attribute__((always_inline)) __inline__
#else // __GNUC__
#define AK_FORCE_INLINE inline
#endif // __GNUC__
#if defined(FLAG_DO_PROFILE) || defined(FLAG_DBG)
#include
<android/log.h>
#ifndef LOG_TAG
...
...
@@ -60,7 +66,7 @@ static inline void dumpResult(const int *outWords, const int *frequencies, const
AKLOGI
(
"-------------------------"
);
}
static
inline
void
dumpWord
(
const
int
*
word
,
const
int
length
)
{
static
AK_FORCE_INLINE
void
dumpWord
(
const
int
*
word
,
const
int
length
)
{
static
char
charBuf
[
50
];
int
i
=
0
;
for
(;
i
<
length
;
++
i
)
{
...
...
@@ -383,12 +389,6 @@ template<typename T> inline T max(T a, T b) { return a > b ? a : b; }
#define NELEMS(x) (sizeof(x) / sizeof((x)[0]))
#ifdef __GNUC__
#define AK_FORCE_INLINE __attribute__((always_inline)) __inline__
#else // __GNUC__
#define AK_FORCE_INLINE inline
#endif // __GNUC__
// The ratio of neutral area radius to sweet spot radius.
#define NEUTRAL_AREA_RADIUS_RATIO 1.3f
...
...
This diff is collapsed.
Click to expand it.
native/jni/src/words_priority_queue.h
+
3
−
3
View file @
1ce96fec
...
...
@@ -112,15 +112,15 @@ class WordsPriorityQueue {
}
}
void
dumpTopWord
()
{
AK_FORCE_INLINE
void
dumpTopWord
()
{
if
(
size
()
<=
0
)
{
return
;
}
DUMP_WORD
(
mHighestSuggestedWord
->
mWord
,
mHighestSuggestedWord
->
mWordLength
);
}
float
getHighestNormalizedScore
(
const
int
*
before
,
const
int
beforeLength
,
int
**
outWord
,
int
*
outScore
,
int
*
outLength
)
{
AK_FORCE_INLINE
float
getHighestNormalizedScore
(
const
int
*
before
,
const
int
beforeLength
,
int
**
outWord
,
int
*
outScore
,
int
*
outLength
)
{
if
(
!
mHighestSuggestedWord
)
{
return
0.0
;
}
...
...
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