Skip to content
Snippets Groups Projects
Select Git revision
  • d7ecf3a2b3d4fb58dac59e4f38dde51a2515cb61
  • master default protected
  • add-clFFT_GetSize
  • add-dylib-target
  • counting-mallocs
  • remove-CPU-constraint
  • Add-PKGBUILD
  • HSA
  • clmathfft
  • longer_dft_support
  • current_fgrp_apps
  • current_brp_apps
12 results

test.single.2

Blame
  • Forked from einsteinathome / libclfft
    Source project has a limited visibility.
    • Heinz-Bernd Eggenstein's avatar
      20314512
      Bug #1608: clFFT use of native_sin , native_cos can cause validation problems · 20314512
      Heinz-Bernd Eggenstein authored
      experimental: -added alternative method for twiddle factor calc, using a smaller LUT (256 * float2 )
                     via Taylor series to 3rd order, seems to be almost as accurate as method with 2 bigger LUTs, but faster.
                    -improved method w/ 2 bigger LUTs to use LUTs of float2
                    -improved method using slow sin/cos functions (now uses sincos combined function), still slow
                    - preparaed plan struct to have method switchable at plan creation time.
      
                    TODO: load smaller LUT for Taylor series approx into shared mem.
      20314512
      History
      Bug #1608: clFFT use of native_sin , native_cos can cause validation problems
      Heinz-Bernd Eggenstein authored
      experimental: -added alternative method for twiddle factor calc, using a smaller LUT (256 * float2 )
                     via Taylor series to 3rd order, seems to be almost as accurate as method with 2 bigger LUTs, but faster.
                    -improved method w/ 2 bigger LUTs to use LUTs of float2
                    -improved method using slow sin/cos functions (now uses sincos combined function), still slow
                    - preparaed plan struct to have method switchable at plan creation time.
      
                    TODO: load smaller LUT for Taylor series approx into shared mem.
    EinsteinS5R3Adapter.cpp 1.38 KiB
    #include "EinsteinS5R3Adapter.h"
    
    EinsteinS5R3Adapter::EinsteinS5R3Adapter(BOINCClientAdapter *boincClient)
    {
    	this->boincClient = boincClient;
    	
    	m_WUSkyPosRightAscension = 0.0;
    	m_WUSkyPosDeclination = 0.0;
    	m_WUFractionDone = 0.0;
    	m_WUCPUTime = 0.0;
    }
    
    EinsteinS5R3Adapter::~EinsteinS5R3Adapter()
    {
    }
    
    void EinsteinS5R3Adapter::refresh()
    {
    	boincClient->refresh();
    	parseApplicationInformation();
    }
    
    void EinsteinS5R3Adapter::parseApplicationInformation()
    {
    	// get updated application information
    	string info = boincClient->applicationInformation();
    	
    	// do we have any data?
    	if(info.length() > 0) {
    		
    		// parse data into members
    		if(4 != sscanf(info.c_str(),
    			  		"<graphics_info>\n"
    			  		"  <skypos_rac>%lf</skypos_rac>\n"
    			  		"  <skypos_dec>%lf</skypos_dec>\n"
    			  		"  <fraction_done>%lf</fraction_done>\n"
    			  		"  <cpu_time>%lf</cpu_time>\n",
    			  		&m_WUSkyPosRightAscension,
    			  		&m_WUSkyPosDeclination,
    			  		&m_WUFractionDone,
    			  		&m_WUCPUTime))
    		{		 
    			cerr << "Incompatible shared memory data encountered!" << endl;
    		}
    	}
    }
    
    double EinsteinS5R3Adapter::wuSkyPosRightAscension() const
    {
    	return m_WUSkyPosRightAscension;
    }
    
    double EinsteinS5R3Adapter::wuSkyPosDeclination() const
    {
    	return m_WUSkyPosDeclination;
    }
    
    double EinsteinS5R3Adapter::wuFractionDone() const
    {
    	return m_WUFractionDone;
    }
    
    double EinsteinS5R3Adapter::wuCPUTime() const
    {
    	return m_WUCPUTime;
    }