Giter Club home page Giter Club logo

Comments (2)

DTolm avatar DTolm commented on September 26, 2024

Hello,

This can be done, but to have backward compatibility, I would rather do something simple, like

#define VKFFT_PREC_FP32 0
#define VKFFT_PREC_FP64 1

As for the rework of inputPrecision and so on, it is better to wait until the callback functionality is formalized and added.

Best regards,
Dmitrii

from vkfft.

DejvBayer avatar DejvBayer commented on September 26, 2024

Hi,

so as I understand it, you suggest that the structure of the VkFFTConfiguration structure could look like:

typedef struct {
  // ...

  pfUINT doublePrecision;
  pfUINT quadDoubleDoublePrecision;
  pfUINT quadDoubleDoublePrecisionDoubleMemory;
  pfUINT halfPrecision;
  pfUINT halfPrecisionMemoryOnly;
  pfUINT doublePrecisionFloatMemory;

  VkFFTPrecision precision;
  VkFFTPrecision execPrecision;

  // ...
} VkFFTConfiguration;

where

  • precision would setup the memory precision and default precision for execution and
  • execPrecision if set would set up the execution precision.

The behaviour then would be:

  • if none of the precision variables is set, float precision is used as today
  • if any of the old precision variables (doublePrecision, halfPrecision, ...) was specified, they would have the highest preference and everything would work as today
  • if precision is specified, the memory and execution precision is set to the value
  • if execPrecision is specified, the execution precision set by precision is overrided to the given value

Do I get it right?

And I do not understand why it would be better to define the precision values as macros instead of an enum. What is the motivation?

Thank you.

Best regards
David

from vkfft.

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.