Nicolas Winkler 5 jaren geleden
bovenliggende
commit
05e38c7910
4 gewijzigde bestanden met toevoegingen van 33 en 10 verwijderingen
  1. 5 5
      libmandel/include/CpuGenerators.h
  2. 5 0
      libmandel/include/Generators.h
  3. 3 3
      libmandel/include/OpenClCode.h
  4. 20 2
      libmandel/src/Generators.cpp

+ 5 - 5
libmandel/include/CpuGenerators.h

@@ -48,7 +48,7 @@ class mnd::CpuGenerator<float, mnd::X86_SSE2, parallel> : public Generator
 {
 public:
     inline CpuGenerator(void) :
-        Generator{ mnd::getPrecision<T>() }
+        Generator{ mnd::getPrecision<float>() }
     {
     }
     virtual void generate(const MandelInfo& info, float* data);
@@ -59,7 +59,7 @@ class mnd::CpuGenerator<double, mnd::X86_SSE2, parallel> : public Generator
 {
 public:
     inline CpuGenerator(void) :
-        Generator{ mnd::getPrecision<T>() }
+        Generator{ mnd::getPrecision<double>() }
     {
     }
     virtual void generate(const MandelInfo& info, float* data);
@@ -71,7 +71,7 @@ class mnd::CpuGenerator<float, mnd::X86_AVX, parallel> : public Generator
 {
 public:
     inline CpuGenerator(void) :
-        Generator{ mnd::getPrecision<T>() }
+        Generator{ mnd::getPrecision<float>() }
     {
     }
     virtual void generate(const MandelInfo& info, float* data);
@@ -82,7 +82,7 @@ class mnd::CpuGenerator<double, mnd::X86_AVX, parallel> : public Generator
 {
 public:
     inline CpuGenerator(void) :
-        Generator{ mnd::getPrecision<T>() }
+        Generator{ mnd::getPrecision<double>() }
     {
     }
     virtual void generate(const MandelInfo& info, float* data);
@@ -93,7 +93,7 @@ class mnd::CpuGenerator<mnd::DoubleDouble, mnd::X86_AVX, parallel> : public Gene
 {
 public:
     inline CpuGenerator(void) :
-        Generator{ mnd::getPrecision<T>() }
+        Generator{ mnd::getPrecision<DoubleDouble>() }
     {
     }
     virtual void generate(const MandelInfo& info, float* data);

+ 5 - 0
libmandel/include/Generators.h

@@ -38,7 +38,12 @@ namespace mnd
     template<> Real getPrecision<double>();
     template<> Real getPrecision<DoubleDouble>();
     template<> Real getPrecision<QuadDouble>();
+    template<> Real getPrecision<Fixed64>();
     template<> Real getPrecision<Fixed128>();
+    template<> Real getPrecision<Fixed512>();
+    template<> Real getPrecision<Float128>();
+    template<> Real getPrecision<Float256>();
+    template<> Real getPrecision<Float512>();
 }
 
 

+ 3 - 3
libmandel/include/OpenClCode.h

@@ -3,9 +3,9 @@
 
 namespace mnd
 {
-    unsigned char fixed64_cl[];
-    unsigned char fixed128_cl[];
-    unsigned char fixed512_cl[];
+    unsigned char* fixed64_cl;
+    unsigned char* fixed128_cl;
+    unsigned char* fixed512_cl;
 }
 
 #endif // MANDEL_OPENCLCODE_H

+ 20 - 2
libmandel/src/Generators.cpp

@@ -125,11 +125,29 @@ namespace mnd
         return Real("1.0e-56");
     }
     template<>
+    Real getPrecision<Fixed64>() {
+        return Real("1.0e-12");
+    }
+    template<>
     Real getPrecision<Fixed128>() {
         return Real("1.5e-29");
     }
-
-
+    template<>
+    Real getPrecision<Fixed512>() {
+        return Real("1.5e-29");
+    }
+    template<>
+    Real getPrecision<Float128>() {
+        return Real("1.5e-29");
+    }
+    template<>
+    Real getPrecision<Float256>() {
+        return Real("1.5e-29");
+    }
+    template<>
+    Real getPrecision<Float512>() {
+        return Real("1.5e-29");
+    }
 
 }