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

  • #51
    Originally posted by mr_tawan View Post
    Some thing like :-

    Code:
    #ifndef VULKAN_HPP
    #define VULKAN_HPP
    namespace vk {
      extern "C"{
        #include <vulkan.h>
      }
    }
    #endif
    it will not compile in general. header can detect c++ and use c++ constructs, which are not allowed inside extern "C" block.
    Last edited by pal666; 16 March 2015, 01:14 PM.

    Comment


    • #52
      what part of 'modern' should i translate to you ?
      Originally posted by gens View Post
      cpp does not give you absolute control over memory management
      it does, you are just uneducated

      Comment


      • #53
        Originally posted by gens View Post
        granted i don't know much cpp, so i may be wrong and there could be such a directive
        but how would you go about aligning your memory to 4k (or 16bytes) by using just cpp ?
        in reality you can't do that by 'using just c' prior to c11 (posix or ms extensions are not part of c standard). in c++ you can use any of c facilities or std::align

        Comment


        • #54
          Originally posted by gens View Post
          it doesn't count, if you ask me
          C and C++ are very very different
          more then that, some say that building cpp as a superset of C was its biggest mistake
          nobody is asking you, you are not familiar enough with topic

          Comment


          • #55
            Originally posted by gens View Post
            C++ is an OO language
            bullshit
            c++ is multiparadigm language

            Comment


            • #56
              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)
              Absolutely not.
              C++ is a general purpose language that has OO features, meaning everything can be an "object".
              C++ is a multi paradigm language, where the programmer much choose the language features that are fit for a given problem. This can be a problem as well as a solution, but what is certain is that there is no single "true" way to write c++, and if it's best to locally go to a C-like features level, so be it.

              C++ can do C performance, and can use higher level designs (but not always at the same time, obviously). That doesn't mean you must.

              Comment

              Working...
              X