6 Replies Latest reply on Oct 22, 2009 7:08 AM by omkaranathan

    How to query a device that it has double precision?

    riza.guntur

      For short, could anybody give me an example of how to use clGetDeviceInfo?

      I don't understand how to use parameters of that function, and what do I get as the returning value?

        • How to query a device that it has double precision?
          omkaranathan

          Hi riza.guntur,

          Most of the samples in the SDK contains usage of clGetDeviceInfo. You can refer to any of them to get an idea on how to use the API call.

            • How to query a device that it has double precision?
              riza.guntur

              Ok I found one

              I get this after modifiying one sample:

              Adding:

              if(!strstr(deviceExtensions, "cl_khr_fp64"))
                  {
                      sampleCommon->error("Device does not support double precision!");
                  }

              C:\Documents and Settings\R\My Documents\ATI Stream\samples\opencl\bin\release\x86>Histogram.exe --device cpu
              For test only: Expires on Sun Feb 28 00:00:00 2010
              Error: Device does not support double precision!

              deviceBin
              4096 4115 4106 4115 4040 4105 4141 4103 4048 4143 4100 4092 4015 4192 4093 4102 4154 4115 4038 3984 4100 4210 4181 4041 4189 4072 3973 4143 4108 4074 4108 4052 4030 4156 4022 4104 4066 4200 4186 4132 4184 4089 4123 4030 4160 4317 4168 4129 4189 4059 4057 4081 4136 4106 4070 4178 4062 4063 4117 4032 4128 4152 4037 4054 4130 4116 4108 4045 4140 3977 4021 4093 4024 4135 4239 4138 4112 4149 4163 4029 4224 4056 4049 4093 4002 4075 4084 4015 4069 4029 4180 4130 4044 3989 3972 4112 4051 4175 4197 4132 4108 4031 4083 4023 4125 4057 4013 4189 4036 4129 4165 4107 4091 4071 4120 4114 4080 4056 4108 4077 4174 4251 4037 4069 3990 4029 4167 4143 4090 4085 4111 4063 4130 4162 4080 4209 4042 4051 4132 4147 4087 4046 4058 4056 4050 4159 4093 4145 4165 4035 4077 4089 4248 4103 4128 4051 4134 4009 4078 4129 4070 4022 4050 4051 4047 3999 4140 4189 4051 4085 4089 4093 4109 4033 4130 4163 4059 4069 4128 4213 4235 4043 4051 4077 4069 4156 4005 4077 4090 4088 3998 4177 4020 4101 4176 4083 4120 4132 4028 4099 4044 4037 4073 4048 4151 4056 4100 3995 4066 4167 4022 4111 4032 4131 4076 4084 4072 4080 4149 4163 4138 4011 4121 4216 4120 4059 4132 4099 4080 4189 4149 4077 4055 4147 4140 4080 4149 4190 4133 3967 4096 4011 4127 4103 4055 4085 4061 4050 4080 4038 4038 4054 4085 4072 4045 4105


              C:\Documents and Settings\R\My Documents\ATI Stream\samples\opencl\bin\release\x86>Histogram.exe --device gpu
              For test only: Expires on Sun Feb 28 00:00:00 2010
              Error: Device does not support double precision!
              Error: Device does not support sub 32bit writes!

              Either CPU or GPU don't support double?