当前位置: 首页>>代码示例>>C++>>正文


C++ To::get方法代码示例

本文整理汇总了C++中reference::To::get方法的典型用法代码示例。如果您正苦于以下问题:C++ To::get方法的具体用法?C++ To::get怎么用?C++ To::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在reference::To的用法示例。


在下文中一共展示了To::get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: if

void dsp::LoadToFold::construct () try
{
  SingleThread::construct ();

#if HAVE_CUDA
  bool run_on_gpu = thread_id < config->get_cuda_ndevice();
  cudaStream_t stream = reinterpret_cast<cudaStream_t>( gpu_stream );
#endif

  if (manager->get_info()->get_detected())
  {
    Unpacker* unpacker = manager->get_unpacker();

    // detected data is handled much more efficiently in TFP order
    if ( config->optimal_order
	&& unpacker->get_order_supported (TimeSeries::OrderTFP) )
    {
      unpacker->set_output_order (TimeSeries::OrderTFP);
    }

#if HAVE_CFITSIO
#if HAVE_fits
    // Use callback to handle scales/offsets for read-in
    if (manager->get_info()->get_machine() == "FITS")
    {
      if (Operation::verbose)
        cerr << "Using callback to read PSRFITS file." << endl;
      // connect a callback
      bool success = false;
      FITSUnpacker* funp = dynamic_cast<FITSUnpacker*> (
          manager->get_unpacker());
      FITSFile* ffile = dynamic_cast<FITSFile*> (manager->get_input());
      if (funp && ffile)
      {
        ffile->update.connect ( funp, &FITSUnpacker::set_parameters );
        success = true;
      }
      else 
      {
        MultiFile* mfile = dynamic_cast<MultiFile*> (manager->get_input());
        if (mfile)
        {
          for (unsigned i=0; i < mfile->nfiles(); ++i)
          {
            ffile = dynamic_cast<FITSFile*> (mfile->get_files()[i].get());
            if (funp && ffile) {
              ffile->update.connect (
                  funp, &FITSUnpacker::set_parameters );
              success = true;
            }
          }
        }
      }
      if (not success)
        cerr << "dspsr: WARNING: FITS input input but unable to apply scales and offsets." << endl;
    }
#endif
#endif

    config->coherent_dedispersion = false;
    prepare_interchan (unpacked);
    build_fold (unpacked);
    return;
  }

  // record the number of operations in signal path
  unsigned noperations = operations.size();

  bool report_vitals = thread_id==0 && config->report_vitals;

  if (manager->get_info()->get_type() != Signal::Pulsar)
  {
    // the kernel gets messed up by DM=0 sources, like PolnCal
    if (report_vitals)
      cerr << "Disabling coherent dedispersion of non-pulsar signal" << endl;
    config->coherent_dedispersion = false;
  }

  // the data are not detected, so set up phase coherent reduction path
  // NB that this does not necessarily mean coherent dedispersion.
  unsigned frequency_resolution = config->filterbank.get_freq_res ();

  if (config->coherent_dedispersion)
  {
    if (!kernel)
      kernel = new Dedispersion;

    if (frequency_resolution)
    {
      if (report_vitals)
	cerr << "dspsr: setting filter length to " << frequency_resolution << endl;
      kernel->set_frequency_resolution (frequency_resolution);
    }

    if (config->times_minimum_nfft)
    {
      if (report_vitals)
        cerr << "dspsr: setting filter length to minimum times " 
             << config->times_minimum_nfft << endl;
      kernel->set_times_minimum_nfft (config->times_minimum_nfft);
//.........这里部分代码省略.........
开发者ID:UCBerkeleySETI,项目名称:dspsr,代码行数:101,代码来源:LoadToFold1.C


注:本文中的reference::To::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。