Code Monkey home page Code Monkey logo

Comments (3)

bl4ckb0ne avatar bl4ckb0ne commented on June 14, 2024 1

Thanks! I haven't had much time to sink into my anari device lately but I'll definetly go through that file.

from anari-sdk.

jeffamstutz avatar jeffamstutz commented on June 14, 2024

Hi! This is definitely a gap in SDK documentation right now, so I'll do my best to direct you here.

Even though you're not planning on using helium, the helide device is still a reasonable reference point for some of the other miscellaneous things that device implementations need in order to work in the SDK:

  • ANARI_DEFINE_LIBRARY_ENTRYPOINT (Example here) is what anariLoadLibrary() looks for when loading your library dynamically. You can probably just copy that file and change names to fit your library.
  • The jsons are only used for generating device/object info data for anariGetDeviceExtensions, anariGetObjectSubtypes, anariGetObjectInfo, and anariGetParameterInfo. Those are about listing what extensions you implement that are in the core spec and then creating definitions for any extensions you add beyond the spec. The best strategy to use is to adapt an example json combined with CMake infrastructure for invoking the Python generation scripts (example here).
  • The main component you must implement is DeviceImpl -- yes it's a C++ pure-virtual class, but you don't have to use any C++ in order to implement it. The stuff helium does is inject a class layer in between DeviceImpl and yours to handle some generic stuff (object lifetimes, array data + lifetime, parameter transactions, etc.), but DeviceImpl itself is straight 1:1 with the public C API. If you understand the C API from the docs, then you should easily be able to implement DeviceImpl with whatever you want to do....it's ultimately up to you.

Let me know if you have any other questions, as there's plenty of things to talk about when starting a device from scratch!

from anari-sdk.

jeffamstutz avatar jeffamstutz commented on June 14, 2024

FYI I just merged a README that explains the various aspects needed to get a device implementation going (viewable here)....I hope that helps! Let me know if anything is unclear, thanks!

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.