Skip to content

Build warnings with MSVC #221

@r-devulap

Description

@r-devulap

When building with MSVC, these warnings show up. Might be useful to fix them.

[1/8] Compiling C++ object x86simdsortcpp-1.dll.p/lib_x86simdsort.cpp.obj
../lib/x86simdsort.cpp(16): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[2/8] Compiling C++ object lib/liblibicl.a.p/x86simdsort-icl.cpp.obj
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-emu-funcs.hpp(150): warning C4244: 'argument': conversion from 'uint64_t' to 'std::array<std::array<int32_t,8>,256>::size_type', possible loss of data
..\src\avx512-16bit-qsort.hpp(52): warning C4309: 'argument': truncation of constant value
..\src\avx512-16bit-qsort.hpp(53): warning C4309: 'argument': truncation of constant value
..\src\avx512-16bit-qsort.hpp(65): warning C4309: 'argument': truncation of constant value
..\src\avx512-16bit-qsort.hpp(139): warning C4556: value of intrinsic immediate argument '8' is out of range '0 - 7'
[4/8] Compiling C++ object lib/liblibavx.a.p/x86simdsort-avx2.cpp.obj
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-emu-funcs.hpp(150): warning C4244: 'argument': conversion from 'uint64_t' to 'std::array<std::array<int32_t,8>,256>::size_type', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-32bit-half.hpp(45): warning C4244: 'argument': conversion from 'unsigned __int64' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-32bit-half.hpp(49): warning C4244: 'argument': conversion from 'uint64_t' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-32bit-half.hpp(212): warning C4244: 'argument': conversion from 'unsigned __int64' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-32bit-half.hpp(216): warning C4244: 'argument': conversion from 'uint64_t' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-32bit-half.hpp(390): warning C4244: 'argument': conversion from 'unsigned __int64' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-32bit-half.hpp(394): warning C4244: 'argument': conversion from 'uint64_t' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-64bit-qsort.hpp(56): warning C4244: 'argument': conversion from 'unsigned __int64' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-64bit-qsort.hpp(60): warning C4244: 'argument': conversion from 'uint64_t' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-64bit-qsort.hpp(244): warning C4244: 'argument': conversion from 'unsigned __int64' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-64bit-qsort.hpp(248): warning C4244: 'argument': conversion from 'uint64_t' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-64bit-qsort.hpp(442): warning C4244: 'argument': conversion from 'unsigned __int64' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-64bit-qsort.hpp(446): warning C4244: 'argument': conversion from 'uint64_t' to 'int32_t', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(591): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(591): note: the template instantiation context (the oldest one first) is
../lib/x86simdsort-avx2.cpp(87): note: see reference to function template instantiation 'void x86simdsortStatic::keyvalue_qsort<uint64_t,uint64_t>(T1 *,T2 *,size_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
..\src\x86simdsort-static-incl.h(208): note: see reference to function template instantiation 'void avx2_qsort_kv<T1,T2>(T1 *,T2 *,arrsize_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(758): note: see reference to function template instantiation 'void xss_qsort_kv<T1,T2,avx2_vector,avx2_half_vector>(T1 *,T2 *,arrsize_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(686): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(686): note: the template instantiation context (the oldest one first) is
../lib/x86simdsort-avx2.cpp(87): note: see reference to function template instantiation 'void x86simdsortStatic::keyvalue_select<uint64_t,uint64_t>(T1 *,T2 *,size_t,size_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
..\src\x86simdsort-static-incl.h(208): note: see reference to function template instantiation 'void avx2_select_kv<T1,T2>(T1 *,T2 *,arrsize_t,arrsize_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(782): note: see reference to function template instantiation 'void xss_select_kv<T1,T2,avx2_vector,avx2_half_vector>(T1 *,T2 *,arrsize_t,arrsize_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
[6/8] Compiling C++ object lib/liblibskx.a.p/x86simdsort-skx.cpp.obj
C:\Users\merag\source\repos\x86-simd-sort\src\avx2-emu-funcs.hpp(150): warning C4244: 'argument': conversion from 'uint64_t' to 'std::array<std::array<int32_t,8>,256>::size_type', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(591): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(591): note: the template instantiation context (the oldest one first) is
../lib/x86simdsort-skx.cpp(87): note: see reference to function template instantiation 'void x86simdsortStatic::keyvalue_qsort<uint64_t,uint64_t>(T1 *,T2 *,size_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
..\src\x86simdsort-static-incl.h(174): note: see reference to function template instantiation 'void avx512_qsort_kv<T1,T2>(T1 *,T2 *,arrsize_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(747): note: see reference to function template instantiation 'void xss_qsort_kv<T1,T2,zmm_vector,ymm_vector>(T1 *,T2 *,arrsize_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(686): warning C4244: 'initializing': conversion from 'double' to 'int', possible loss of data
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(686): note: the template instantiation context (the oldest one first) is
../lib/x86simdsort-skx.cpp(87): note: see reference to function template instantiation 'void x86simdsortStatic::keyvalue_select<uint64_t,uint64_t>(T1 *,T2 *,size_t,size_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
..\src\x86simdsort-static-incl.h(174): note: see reference to function template instantiation 'void avx512_select_kv<T1,T2>(T1 *,T2 *,arrsize_t,arrsize_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]
C:\Users\merag\source\repos\x86-simd-sort\src\xss-common-keyvaluesort.hpp(770): note: see reference to function template instantiation 'void xss_select_kv<T1,T2,zmm_vector,ymm_vector>(T1 *,T2 *,arrsize_t,arrsize_t,bool,bool)' being compiled
        with
        [
            T1=uint64_t,
            T2=uint64_t
        ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions