Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

error C2169: "_mm_set_epi64x": intrinsic function, cannot be defined #11

Open
robinchrist opened this issue Nov 2, 2016 · 3 comments · May be fixed by #15
Open

error C2169: "_mm_set_epi64x": intrinsic function, cannot be defined #11

robinchrist opened this issue Nov 2, 2016 · 3 comments · May be fixed by #15

Comments

@robinchrist
Copy link

robinchrist commented Nov 2, 2016

Project Files were generated with CMake for Visual Studio 14 2015.
Project File clRNG.sln. Building the Target "ALL_BUILD" fails because clRNG was not built before.
Building the "clRNG" Project fails with

1>------ Erstellen gestartet: Projekt: clRNG, Konfiguration: Debug Win32 ------
1>  philox432.c
1>d:\clrng\src\include\clrng\private\random123\features/sse.h(98): error C2169: "_mm_set_epi64x": Systeminterne Funktion kann nicht definiert werden

The code in the header file is

#if (defined(__ICC) && __ICC<1210) || (defined(_MSC_VER) && !defined(_WIN64))
/* Is there an intrinsic to assemble an __m128i from two 64-bit words? 
   If not, use the 4x32-bit intrisic instead.  N.B.  It looks like Intel
   added _mm_set_epi64x to icc version 12.1 in Jan 2012.
*/
R123_STATIC_INLINE __m128i _mm_set_epi64x(uint64_t v1, uint64_t v0){
    union{
        uint64_t u64;
        uint32_t u32[2];
    } u1, u0;
    u1.u64 = v1;
    u0.u64 = v0;
    return _mm_set_epi32(u1.u32[1], u1.u32[0], u0.u32[1], u0.u32[0]);
}
#endif

Is it me or is it clRNG?
Platform Win 10 x64, Visual Studio 2015 (Configuration "Visual Studio 14 2015" is right, "Visual Studio 2015" won't work).

@jakirkham
Copy link

jakirkham commented Jul 6, 2017

Am seeing this issue with 32-bit builds, but not 64-bit builds. Also not seeing this with older versions of Visual Studio. Seems to be unique to Visual Studio 2015 32-bit. Here's a log demonstrating the issue.

@jakirkham
Copy link

It appears the error is coming from the vendored copy of Random123, which is quite old. That said, I looked at a release from last year and it seems this portion of the code is unchanged. So there doesn't appear to be a strategy to handle this in recent versions of Random123 either. 😕

@jakirkham jakirkham linked a pull request Jul 8, 2017 that will close this issue
@jakirkham
Copy link

Looks like PR ( #15 ) should fix this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants