4 Replies Latest reply on Apr 17, 2008 10:43 PM by michael.chu

    doubles in brook+

    qbproger
      Doubles don't seem to be supported by the current
      version of Brook+.

      To test this, you can put this kernel code in any br file.

      kernel void conv_double ( double A<>, out double result<>)
      {
      result = A;
      }

      You can just put it towards the top of any file, it doesn't even need
      to be used.

      The compiler will crash, and if you look at the cpp file generated,
      you see this on the last line:
      ERROR the following data type can't be stream element type: double

      I was under the impression there was double support in brook+. Am i doing something wrong?

      Thanks
        • doubles in brook+
          michael.chu
          doubles support will be available in v1.obeta which will be coming out in the next few days. We will be emailing those who registered for the SDK when v1.0beta is available.

          Sorry for the inconvenience!

          Michael.
          • doubles in brook+
            Ceq
            I'm testing doubles using the new version v1.00.0_b, which is supposed to support double types, but when trying to compile:

            kernel void ker_test(double input1<>, double input2<>, out double output<> ) {
            output = input1 + input2;
            }

            I get the following error message:

            error C2676: binary '+' : 'const __BrtDouble1' does not define this operator or a conversion to a type acceptable to the predefined operator

            However if you modify it this way it works ok:

            kernel void ker_test(double input1<>, double input2<>, out double output<> ) {
            output = input1;
            output += input2;
            }

            Am I doing something wrong or is it really a bug?

            Thanks
            • doubles in brook+
              Ceq
              Sorry, my fault, it only happens with VS 2008. There is no problem in VS 2005.