Code Monkey home page Code Monkey logo

Comments (7)

g1mv avatar g1mv commented on August 14, 2024

Hello Mark,

No it does’ build on MSVC anymore, it used to that’s why there might be those windows macro checks.
The problem is that MSVC did not provide the optimization environment I was looking for.
Good point though, I’ll remove these shortly !
Thanks

from density.

g1mv avatar g1mv commented on August 14, 2024

Just to add to this, the _WIN macro tests are used to compile on windows, not using MSVC but either Clang or GCC for windows.

from density.

nemequ avatar nemequ commented on August 14, 2024

This is a terrible way to handle the issue. If you really want to discourage people from using MSVC you could make this a #warning, and maybe slap a notice on the home page about MSVC being slow. Or maybe let people disable the message by defining something (e.g., -DYES_I_KNOW_MSVC_IS_SLOW).

Some people will still want to use MSVC even with the performance drop. Maybe DENSITY still provides better performance than the alternatives for their use case. Maybe they don't really care about performance, but need DENSITY for compatibility with something else.

Lots of people want to use MSVC because they like the Visual Studio IDE, and you pretty much have to use MSVC if you want that (clang is working on something, but last time I checked it's not production-ready). Maybe they'll even use something else for production builds.

Also, note that you're not disallowing MSVC here (you could do something like #if defined(_MSC_VER) … for that), you're disallowing everything except clang and gcc. Well, almost… some compilers define __GNUC__ even though they're not GCC, including clang (which makes the defined(__clang__) part of that directive interesting) and I think Intel. Do you really want to disallow EKOPath, IBM XL, Cray, Pelles, etc.?

from density.

nemequ avatar nemequ commented on August 14, 2024

FWIW I have something that I think should work in https://github.com/nemequ/density/tree/dev

I haven't even tried to compile it yet with MSVC, though an earlier version (in the "master" branch of that repo) does compile. Unfortunately I don't have a good way to build it until I port the Squash plugin to the new API.

from density.

g1mv avatar g1mv commented on August 14, 2024

Hey Evan,
Thanks for your great feedback as usual. I had a look at your proposal but the problem is it doesn't work with Clang on windows.
I had actually tried to do exactly the same thing (use a DENSITY_RESTRICT macro) but for some reason the preprocessor or the compiler does not accept this syntax on windows, probably the pointer star (*) before is a troublemaker.
So I'm still looking for an elegant solution to this problem, maybe I'll try with a newer Clang.
I'm reopening the issue since MSVC support seems to be a concern.

BTW I hope the Squash compression benchmark is doing great !

from density.

nemequ avatar nemequ commented on August 14, 2024

Interesting. That sounds like a bug with clang, and it doesn't seem like the kind of issue which would be platform-dependent. What version of clang are you using? Do you remember what the error message was?

One possibility could be defining DENSITY_RESTRICT to __restrict instead of __restrict__ (or restrict) when defined(__GNUC__); MSVC supports __restrict, so there is probably a better chance of clang supporting that on Windows…

from density.

g1mv avatar g1mv commented on August 14, 2024

Fixed in 0.14.1

from density.

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.