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
871b8c93
Commit
871b8c93
authored
12 years ago
by
Ken Wakasa
Browse files
Options
Downloads
Patches
Plain Diff
Cleanups in defines.h
Change-Id: I75ab11e0d6374a2d1302d1684453a61b98682b13
parent
a8ce88bf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
native/jni/src/defines.h
+2
-25
2 additions, 25 deletions
native/jni/src/defines.h
with
2 additions
and
25 deletions
native/jni/src/defines.h
+
2
−
25
View file @
871b8c93
...
@@ -267,21 +267,6 @@ static inline void prof_out(void) {
...
@@ -267,21 +267,6 @@ static inline void prof_out(void) {
// loading time, and acceptable even for several initial lookups which involve page faults.
// loading time, and acceptable even for several initial lookups which involve page faults.
#define USE_MMAP_FOR_DICTIONARY
#define USE_MMAP_FOR_DICTIONARY
// 22-bit address = ~4MB dictionary size limit, which on average would be about 200k-300k words
#define ADDRESS_MASK 0x3FFFFF
// The bit that decides if an address follows in the next 22 bits
#define FLAG_ADDRESS_MASK 0x40
// The bit that decides if this is a terminal node for a word. The node could still have children,
// if the word has other endings.
#define FLAG_TERMINAL_MASK 0x80
#define FLAG_BIGRAM_READ 0x80
#define FLAG_BIGRAM_CHILDEXIST 0x40
#define FLAG_BIGRAM_CONTINUED 0x80
#define FLAG_BIGRAM_FREQ 0x7F
#define DICTIONARY_VERSION_MIN 200
#define NOT_VALID_WORD (-99)
#define NOT_VALID_WORD (-99)
#define NOT_A_CODE_POINT (-1)
#define NOT_A_CODE_POINT (-1)
#define NOT_A_DISTANCE (-1)
#define NOT_A_DISTANCE (-1)
...
@@ -297,10 +282,6 @@ static inline void prof_out(void) {
...
@@ -297,10 +282,6 @@ static inline void prof_out(void) {
#define KEYCODE_HYPHEN_MINUS '-'
#define KEYCODE_HYPHEN_MINUS '-'
#define CALIBRATE_SCORE_BY_TOUCH_COORDINATES true
#define CALIBRATE_SCORE_BY_TOUCH_COORDINATES true
#define SUGGEST_WORDS_WITH_MISSING_CHARACTER true
#define SUGGEST_WORDS_WITH_EXCESSIVE_CHARACTER true
#define SUGGEST_WORDS_WITH_TRANSPOSED_CHARACTERS true
#define SUGGEST_MULTIPLE_WORDS true
#define SUGGEST_MULTIPLE_WORDS true
// The following "rate"s are used as a multiplier before dividing by 100, so they are in percent.
// The following "rate"s are used as a multiplier before dividing by 100, so they are in percent.
...
@@ -366,7 +347,6 @@ static inline void prof_out(void) {
...
@@ -366,7 +347,6 @@ static inline void prof_out(void) {
#define DEFAULT_MAX_DIGRAPH_SEARCH_DEPTH 5
#define DEFAULT_MAX_DIGRAPH_SEARCH_DEPTH 5
#define MIN_USER_TYPED_LENGTH_FOR_MULTIPLE_WORD_SUGGESTION 3
#define MIN_USER_TYPED_LENGTH_FOR_MULTIPLE_WORD_SUGGESTION 3
#define MIN_USER_TYPED_LENGTH_FOR_EXCESSIVE_CHARACTER_SUGGESTION 3
// TODO: Remove
// TODO: Remove
#define MAX_POINTER_COUNT 1
#define MAX_POINTER_COUNT 1
...
@@ -390,14 +370,11 @@ static inline void prof_out(void) {
...
@@ -390,14 +370,11 @@ static inline void prof_out(void) {
#error "BIGRAM_FILTER_MODULO is larger than BIGRAM_FILTER_BYTE_SIZE"
#error "BIGRAM_FILTER_MODULO is larger than BIGRAM_FILTER_BYTE_SIZE"
#endif
#endif
template
<
typename
T
>
inline
T
min
(
T
a
,
T
b
)
{
return
a
<
b
?
a
:
b
;
}
template
<
typename
T
>
AK_FORCE_INLINE
const
T
&
min
(
const
T
&
a
,
const
T
&
b
)
{
return
a
<
b
?
a
:
b
;
}
template
<
typename
T
>
inline
T
max
(
T
a
,
T
b
)
{
return
a
>
b
?
a
:
b
;
}
template
<
typename
T
>
AK_FORCE_INLINE
const
T
&
max
(
const
T
&
a
,
const
T
&
b
)
{
return
a
>
b
?
a
:
b
;
}
#define NELEMS(x) (sizeof(x) / sizeof((x)[0]))
#define NELEMS(x) (sizeof(x) / sizeof((x)[0]))
// The ratio of neutral area radius to sweet spot radius.
#define NEUTRAL_AREA_RADIUS_RATIO 1.3f
// DEBUG
// DEBUG
#define INPUTLENGTH_FOR_DEBUG (-1)
#define INPUTLENGTH_FOR_DEBUG (-1)
#define MIN_OUTPUT_INDEX_FOR_DEBUG (-1)
#define MIN_OUTPUT_INDEX_FOR_DEBUG (-1)
...
...
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