Giter Club home page Giter Club logo

Comments (5)

soraros avatar soraros commented on July 3, 2024

Related to #2860. Duplicate of #3045.

from mojo.

JoeLoser avatar JoeLoser commented on July 3, 2024

FYI @laszlokindrat @ConnorGray @bethebunny

from mojo.

soraros avatar soraros commented on July 3, 2024

This is not just confusing but actively harmful.

Much code in math uses the following pattern:

fn f(a: SIMD, ...) -> SIMD[res_type, ...]:
  ...
  fn _float32_dispatch(): ...
  fn _float64_dispatch(): ...

  if type is DType.float32:
    return _simd_apply[_float32_dispatch](a, ...).cast[res_type]()
  ...

With the implicit conversion to Bool, the compiler no longer able to warn us if the final cast is missing, which is dangerous and not at all obvious to see (it's no longer a matter of avoiding direct constructors call like Int64(n)).

from mojo.

ematejska avatar ematejska commented on July 3, 2024

@joe Do you want to keep this around for for the math module issue or dup out to #3045?

from mojo.

JoeLoser avatar JoeLoser commented on July 3, 2024

Closing as duplicate of #3045 is fine by me.

from mojo.

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.