Code Monkey home page Code Monkey logo

Comments (7)

ermig1979 avatar ermig1979 commented on August 26, 2024

Hi! I can't reproduce this error. Any way I hope that fixed it in place where it can happen.

from simd.

jay3d avatar jay3d commented on August 26, 2024

I'm doing a much simpler internal cmake compile instructions because the project cmake file doesn't support Ninja generator with VS

    add_compile_definitions(
            SIMD_VERSION="unknown"
            SIMD_AVX512BW_DISABLE
            SIMD_AVX512VNNI_DISABLE
            SIMD_AVX512BF16_DISABLE
            SIMD_AMXBF16_DISABLE
            SIMD_INT8_DEBUG_DISABLE
    )

    file(GLOB_RECURSE SIMD_BASE_SRC ${Simd_SOURCE_DIR}/src/Simd/SimdBase*.cpp)

    if (WIN32)
        file(GLOB_RECURSE SIMD_SSE41_SRC ${Simd_SOURCE_DIR}/src/Simd/SimdSse41*.cpp)
        file(GLOB_RECURSE SIMD_AVX1_SRC ${Simd_SOURCE_DIR}/src/Simd/SimdAvx1*.cpp)
        file(GLOB_RECURSE SIMD_AVX2_SRC ${Simd_SOURCE_DIR}/src/Simd/SimdAvx2*.cpp)
        set(SIMD_ALG_SRC ${SIMD_BASE_SRC} ${SIMD_SSE41_SRC} ${SIMD_AVX1_SRC} ${SIMD_AVX2_SRC})
    elseif (APPLE)
        file(GLOB_RECURSE SIMD_NEON_SRC ${Simd_SOURCE_DIR}/src/Simd/SimdNeon*.cpp)
        set(SIMD_ALG_SRC ${SIMD_BASE_SRC} ${SIMD_NEON_SRC})
    endif ()

    file(GLOB_RECURSE SIMD_LIB_SRC ${Simd_SOURCE_DIR}/src/Simd/SimdLib.cpp)

    add_library(Simd STATIC ${SIMD_LIB_SRC} ${SIMD_ALG_SRC})

    target_include_directories(Simd PRIVATE ${Simd_SOURCE_DIR}/src)

Anything I'm missing here?

Also I can't just use the solution file in my project.

from simd.

ermig1979 avatar ermig1979 commented on August 26, 2024

Do you add compiler specific CPU extensions options to corresponding sources?

from simd.

jay3d avatar jay3d commented on August 26, 2024

I have added those:

        add_compile_options(
                /arch:AVX
                /arch:AVX2
        )

But still same error

Strange everything compiles file except this

from simd.

ermig1979 avatar ermig1979 commented on August 26, 2024

Do you set /arch:AVX only for SIMD_AVX1_SRC and /arch:AVX2 only for SIMD_AVX2_SRC ?

from simd.

jay3d avatar jay3d commented on August 26, 2024
        file(GLOB_RECURSE SIMD_SSE41_SRC ${Simd_SOURCE_DIR}/src/Simd/SimdSse41*.cpp)
        file(GLOB_RECURSE SIMD_AVX1_SRC ${Simd_SOURCE_DIR}/src/Simd/SimdAvx1*.cpp)
        file(GLOB_RECURSE SIMD_AVX2_SRC ${Simd_SOURCE_DIR}/src/Simd/SimdAvx2*.cpp)
        set_source_files_properties(${SIMD_AVX1_SRC} PROPERTIES COMPILE_OPTIONS "/arch:AVX")
        set_source_files_properties(${SIMD_AVX2_SRC} PROPERTIES COMPILE_OPTIONS "/arch:AVX2")
        set(SIMD_ALG_SRC ${SIMD_BASE_SRC} ${SIMD_SSE41_SRC} ${SIMD_AVX1_SRC} ${SIMD_AVX2_SRC})

Same error

from simd.

jay3d avatar jay3d commented on August 26, 2024

Ok you have a missing include:

#include "Simd/SimdInit.h"
#include "Simd/SimdSet.h"
#include "Simd/SimdMath.h"
#include "Simd/SimdUnpack.h"
#include "Simd/SimdLog.h"
#include "Simd/SimdLoad.h" // <-- It was missing

Sometimes VS IDE is permissive where it should not be, this would make portability a problem, so using a different IDE will have issues like that.
Adding the above include solves the problem.

Ah I see this is fixed in the master, or you just fixed it?! Thanks!!

from simd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.