-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
30,619 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# simdutf | ||
|
||
This project boosts unicode validation and transcoding performance by | ||
utilizing SIMD operations where possible. | ||
|
||
The source is pulled from: https://github.com/simdutf/simdutf | ||
|
||
Active development occurs in the default branch (currently named `master`). | ||
|
||
## Updating | ||
|
||
```sh | ||
$ git clone https://github.com/simdutf/simdutf | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
'variables': { | ||
'arm_fpu%': '', | ||
'target_arch%': '', | ||
}, | ||
'targets': [ | ||
{ | ||
'target_name': 'simdutf', | ||
'type': 'static_library', | ||
'include_dirs': ['.'], | ||
'sources': ['simdutf.cpp'], | ||
'conditions': [ | ||
[ 'arm_fpu=="neon" and target_arch=="arm"', { | ||
'dependencies': [ 'simdutf_neon32' ], | ||
}], | ||
|
||
# arm64 requires NEON, so it's safe to always use it | ||
[ 'target_arch=="arm64"', { | ||
'dependencies': [ 'simdutf_neon64' ], | ||
}], | ||
|
||
# Runtime detection will happen for x86 CPUs | ||
[ 'target_arch in "ia32 x64 x32"', { | ||
'dependencies': [ | ||
'simdutf_sse42', | ||
'simdutf_avx', | ||
'simdutf_avx2', | ||
], | ||
}], | ||
], | ||
}, | ||
|
||
{ | ||
'target_name': 'simdutf_neon32', | ||
'type': 'static_library', | ||
'include_dirs': ['.'], | ||
'sources': ['simdutf.cpp'], | ||
'cflags': [ '-Wno-unused-function' ], | ||
'conditions': [ | ||
[ 'OS!="win"', { | ||
'cflags': [ '-mfpu=neon' ], | ||
'xcode_settings': { | ||
'OTHER_CFLAGS': [ '-mfpu=neon' ] | ||
}, | ||
}], | ||
], | ||
}, | ||
|
||
{ | ||
'target_name': 'simdutf_neon64', | ||
'type': 'static_library', | ||
'include_dirs': ['.'], | ||
'sources': ['simdutf.cpp'], | ||
'cflags': [ '-Wno-unused-function' ], | ||
# NEON is required in arm64, so no -mfpu flag is needed | ||
}, | ||
|
||
{ | ||
'target_name': 'simdutf_avx', | ||
'type': 'static_library', | ||
'include_dirs': ['.'], | ||
'sources': ['simdutf.cpp'], | ||
'cflags': [ '-Wno-unused-function' ], | ||
'conditions': [ | ||
[ 'OS!="win"', { | ||
'cflags': [ '-mavx' ], | ||
'xcode_settings': { | ||
'OTHER_CFLAGS': [ '-mavx' ] | ||
}, | ||
}, { | ||
'msvs_settings': { | ||
'VCCLCompilerTool': { | ||
'AdditionalOptions': [ | ||
'/arch:AVX' | ||
], | ||
}, | ||
}, | ||
}], | ||
], | ||
}, | ||
|
||
{ | ||
'target_name': 'simdutf_avx2', | ||
'type': 'static_library', | ||
'include_dirs': ['.'], | ||
'sources': ['simdutf.cpp'], | ||
'cflags': [ '-Wno-unused-function' ], | ||
'conditions': [ | ||
[ 'OS!="win"', { | ||
'cflags': [ '-mavx2' ], | ||
'xcode_settings': { | ||
'OTHER_CFLAGS': [ '-mavx2' ] | ||
}, | ||
}, { | ||
'msvs_settings': { | ||
'VCCLCompilerTool': { | ||
'AdditionalOptions': [ | ||
'/arch:AVX2' | ||
], | ||
}, | ||
}, | ||
}], | ||
], | ||
}, | ||
|
||
{ | ||
'target_name': 'simdutf_sse42', | ||
'type': 'static_library', | ||
'include_dirs': ['.'], | ||
'sources': ['simdutf.cpp'], | ||
'cflags': [ '-Wno-unused-function' ], | ||
'conditions': [ | ||
[ 'OS!="win"', { | ||
'cflags': [ '-msse4.2' ], | ||
'xcode_settings': { | ||
'OTHER_CFLAGS': [ '-msse4.2' ] | ||
}, | ||
}], | ||
], | ||
}, | ||
] | ||
} |
Oops, something went wrong.