Announcement

Collapse
No announcement yet.

The Khronos Group's Vulkan, SPIR-V & OpenCL 2.1 Presentations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #41
    Originally posted by cbxbiker61 View Post
    One of the gripes that C# and Java fans have about C++, is that the developer has to manage memory.
    Usually that means that the last time they had a look at C++ was decades ago or the training material they looked at was that old.
    I.e. living under the impression that because developers can manually free memory they have to.

    Cheers,
    _

    Comment


    • #42
      Originally posted by cbxbiker61 View Post
      There is truth to that. In a nutshell you take advantage of the language extended features in performance non-critical code, and you focus your attention on performance where it counts.

      Any one who has used a profiler knows that less than 10% of the code is affecting greater than 90% of the performance. It's almost always located in a few select functions.

      Since good programmers can write C++ faster and more robustly than C code, that gives them more time to focus on that impact of that 10% of the code, and you may even have time even write it in assembly.

      Once you go down the rabbit hole of thinking speed is always the ultimate goal you start writing everything in assembly.
      you were the one that started all this talk about language performance, not me

      for one, i don't view the use of C in C++ as an argument that they are the same performance wise

      C++ is an OO language
      meaning that everything is an "object"
      meaning that everything has to be encapsulated with metadata (edit: "should" be encapsulated, since it's not OO if it isn't)
      the compiler could compile that abstraction layer away, but only if it gets the whole program at once (no linking at all, linking means function input evaluation)
      (think function overloading in C)

      Comment


      • #43
        Originally posted by gens View Post
        you were the one that started all this talk about language performance, not me

        for one, i don't view the use of C in C++ as an argument that they are the same performance wise

        C++ is an OO language
        meaning that everything is an "object"
        meaning that everything has to be encapsulated with metadata (edit: "should" be encapsulated, since it's not OO if it isn't)
        the compiler could compile that abstraction layer away, but only if it gets the whole program at once (no linking at all, linking means function input evaluation)
        (think function overloading in C)
        Wrong, a straight class with no virtual functions has no "meta" to it, the only time you start using virtual functions is when they make sense, i.e. the benefit ratio is high, meaning....that it would be difficult to implement the same kind of functionality in C.

        Anyway, I get tired of people repeating things they may have heard 20 years ago as if they're gospel.

        Comment


        • #44
          Originally posted by cbxbiker61 View Post
          Wrong, a straight class with no virtual functions has no "meta" to it, the only time you start using virtual functions is when they make sense, i.e. the benefit ratio is high, meaning....that it would be difficult to implement the same kind of functionality in C.

          Anyway, I get tired of people repeating things they may have heard 20 years ago as if they're gospel.
          not "meta", "metadata"
          description of what it is, what it does
          without describing data (and code) as an "object" it is not "object oriented"

          how many people code cpp by using just a "straight class with no virtual functions" ?
          and how is that different then just writing c ?


          can't find the actual paper on cpp performance (that i did say concludes that cpp can more or less reach c performance, at readability cost)
          so i'l leave you with a though
          an average, how much bigger are cpp programs compared to c programs ?


          edit: this is what i am talking about

          Comment


          • #45
            Originally posted by gens View Post
            not "meta", "metadata"
            description of what it is, what it does
            without describing data (and code) as an "object" it is not "object oriented"

            how many people code cpp by using just a "straight class with no virtual functions" ?
            and how is that different then just writing c ?


            can't find the actual paper on cpp performance (that i did say concludes that cpp can more or less reach c performance, at readability cost)
            so i'l leave you with a though
            an average, how much bigger are cpp programs compared to c programs ?

            edit: this is what i am talking about
            People use a "straight class with no virtual functions" to take advantage of RAII designs. Virtual classes are only useful for interface-like functionality (and it fails in my opinion).
            C, C++, Java, etc. have no concept of speed.

            EDIT: This has nothing to do with the topic. Why the fuck is this in my mailbox on a discussion about Vulkan?
            Last edited by computerquip; 07 March 2015, 08:36 PM.

            Comment


            • #46
              Apple and Google should be interviewed about their position to Vulkan. As Metal is IOS only, Apple should be interested for OSX and Google for Android.

              Simply join Khronos to get a insight view and do nothing is...

              Michael, that would make another thread.

              Comment


              • #47
                Originally posted by gens View Post
                not "meta", "metadata"
                description of what it is, what it does
                without describing data (and code) as an "object" it is not "object oriented"
                What kind of metadata would that be?

                A class of objects is defined by the properties of these objects and the functions operating on these.

                In C++, every instance of a class has the same memory layout as a struct
                In fact class and struct are equivalent on everything as far as runtime is concerned.
                The only difference at compile time is the default access modifier (public fo struct, private for class).

                Cheers,
                _

                Comment


                • #48
                  Is there already enough info to say how close SPIR-V is to NIR ? Maybe the recent IR work to replace TGSI could be converted to SPIR-V.

                  Comment


                  • #49
                    Originally posted by Bitiquinho View Post
                    Is there already enough info to say how close SPIR-V is to NIR ? Maybe the recent IR work to replace TGSI could be converted to SPIR-V.
                    They are completely unrelated and serve different purposes. SPIR-V is a serialization format whereas NIR is an in-memory representation designed to facilitate optimization passes.

                    Comment


                    • #50
                      Originally posted by AnonymousCoward View Post
                      yea make C++ wrapper for C API is much easier than making C wrapper for C++ API.
                      c++ wrapper for c can't be as good, as real c++
                      Originally posted by AnonymousCoward View Post
                      You can make OO API with C just fine. See g_object used in GNOME.
                      c++ is not about oo
                      Originally posted by AnonymousCoward View Post
                      Also there is no standart ABI for C++ so it would be absolutly mess to link against vulkan lib.
                      there is no standard abi for c either

                      Comment

                      Working...
                      X