Git Product home page Git Product logo

Comments (4)

progschj avatar progschj commented on September 22, 2024

I guess so, for the moment they use a STB style ANARI_FEATURE_UTILITY_IMPL macro to place the defininitions. As long as only one cpp file defines that before including it, it should be fine. I guess the other option would be to just make the functions static.

I'm not sure if "hardwiring" it into the sdk is the correct path. The utility to generate this helper is intentionally written so you could create a custom one with additional (vendor or extension provided) features in it.

from anari-sdk.

griffin28 avatar griffin28 commented on September 22, 2024

It doesn't need to go in the SDK, however the current setup doesn't work when ANARI_FEATURE_UTILITY_IMPL is defined in a header file. Making them static functions may be the best solution. In the words of Jakob it just seems weird to have to define ANARI_FEATURE_UTILITY_IMPL first in order to get the list of features from a device when, presumably, all front-ends will need to do this considering the direction the spec is going.

from anari-sdk.

griffin28 avatar griffin28 commented on September 22, 2024

Workaround: I created my own GetAnariDeviceFeatures method that returns an anari::Features object that gets updated after processing a list of feature strings returned by anariGetObjectInfo.

from anari-sdk.

jeffamstutz avatar jeffamstutz commented on September 22, 2024

Closing this as the STB-style usage is the current intention and alternatives introduce link dependencies we want to avoid. Applications should only define ANARI_FEATURE_UTILITY_IMPL in a single .cpp translation unit to ensure a single definition.

from anari-sdk.

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.