Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3d8b5a3

Browse files
committed
make prefetch do something on msvc
1 parentf2d90a0 commit3d8b5a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/util/common.hpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#ifndef JUMANPP_COMMON_HPP
66
#defineJUMANPP_COMMON_HPP
77

8+
#include<intrin.h>
9+
810
#ifdef _MSC_VER
911
#defineJPP_ALWAYS_INLINE __forceinline
1012
#defineJPP_NO_INLINE__declspec(noinline)
@@ -58,6 +60,8 @@ template <PrefetchHint hint>
5860
inline JPP_ALWAYS_INLINEvoidprefetch(constvoid* x) {
5961
#if defined(__llvm__) || defined(__GNUC__)
6062
__builtin_prefetch(x,0, hint);
63+
#elif defined(_WIN32_WINNT) && (defined(_M_IX86) || defined(_M_X64))
64+
_mm_prefetch(static_cast<constchar*>(x), hint);
6165
#else
6266
// You get no effect. Feel free to add more sections above.
6367
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp