예제 #1
0
int main()
{
	
	{
		SGE_ProfileFn(&g_profiler);
		bla();W
	}

	bla();

	std::thread t(foo);
	std::thread t2(bla);
	t.join();
	t2.join();

	for(auto& perThread : g_profiler.m_perThreadProfiling)
	{
		printf("Thread\n\n");
		for(int t = 0; t < perThread.second.m_rootScopes.size(); ++t)
		{
			drawPrintProfiling(&perThread.second, perThread.second.m_rootScopes[t], 0);
		}
	}

	return 0;
}
예제 #2
0
void MainFrame::OnOpen(wxCommandEvent& event)
{
	wxString caption = wxT("Choose a file");
	wxString wildcard = wxT("BMP files (*.bmp)|*.bmp");
	wxString defaultDir = wxT("D:\\Buhler\\VisualStudioProjects\\FlourAnalyzer\\media");
	wxString defaultFilename = wxEmptyString;

	wxFileDialog dialog(this, caption, defaultDir, defaultFilename, wildcard);
	if( dialog.ShowModal() == wxID_OK)
	{
		wxString path = dialog.GetPath();
		int filterIndex = dialog.GetFilterIndex();

		// Load image
		wxBitmap bitmap(path, wxBITMAP_TYPE_BMP);
		if(bitmap.Ok())
		{
			//wxMemoryDC memDC;
			//memDC.SelectObject(bitmap);
			//memDC.DrawBitmap(bitmap,0,0,true);


			wxClientDC bla(this);
			this->SetSize(bitmap.GetSize());
			bla.DrawBitmap(bitmap,0,0,true);
			
		}
		else
		{
			wxMessageBox(wxT("Error loading file."));
		}
	}
}
예제 #3
0
파일: pr22630.c 프로젝트: 0day-ci/gcc
int main (void)
{
  bla (0);
  if (!j)
    abort ();
  return 0;
}
예제 #4
0
파일: loop-32.c 프로젝트: 0day-ci/gcc
void test2(void)
{
  unsigned i;

  /* But not here.  */
  for (x = 0; x < 100; x++)
    bla ();
}
예제 #5
0
int main(void)
{
    struct test2 pom;

    if (bla (&pom.sub, &pom) != 8)
        abort ();

    return 0;
}
예제 #6
0
파일: main.cpp 프로젝트: BumblingCoder/qbs
int main()
{
    printf(DEFINE"\n");
    printf(DEFINEWITHSPACE"\n");
    printf(DEFINEWITHTAB"\n");
    printf(DEFINEWITHBACKSLASH"\n");

    return bla();
}
void foo(int i)
{
  char *s = "abcde";

  if (i)
    {
      s = "defgh";
      goto middle;
    }

start:

  bla ();

middle:

  if (bla ())
    goto start;

  bar (strlen (s));
}
예제 #8
0
static int test(int a, int b, int c)
{
	int res;

	if (a < b)
		res = 1;
	else
		res = 2;
	if (b < c)
		res += 1;

	bla(&c);
	return res;
}
예제 #9
0
void thread_latch_through_header (void)
{
  int i = 0;
  int first = 1;

  do
    {
      if (first)
	foo ();

      first = 0;
      bla ();
    } while (i++ < 100);
}
예제 #10
0
void dont_thread_2 (int first)
{
  int i = 0;

  do
    {
      if (first)
	foo ();
      else
	bar ();

      first = 0;
      bla ();
    } while (i++ < 100);
}
예제 #11
0
파일: loop-23.c 프로젝트: Lao16/gcc
int foo(void)
{
  int i;
  int sum;

  /* This loop used to appear to be too large for unrolling.  */
  for (i = 0; i < 4; i++)
    {
      sum += bla (i);
      sum += bla (2*i);
      sum += bla (3*i);
      sum += bla (4*i);
      sum += bla (5*i);
      sum += bla (6*i);
      sum += bla (7*i);
      sum += bla (8*i);
    }
  return sum;
}
예제 #12
0
파일: 20030820-2.c 프로젝트: 0day-ci/gcc
void foo(void)
{
  int k;

  goto forward;
back:
  bla (k);
  return;

forward:
    {
      int i = bar ();

      k = i;

      goto back;
    }
}
void test1 (void)
{
  unsigned i;

  /* Only one loop should be found here.  */
  i = 0;
  while (1)
    {
      i++;
      if (i == 100)
	break;

      if (foo ())
	bla ();
      else
	bar ();
    }
}
예제 #14
0
void dont_thread_4 (int a, int nfirst)
{
  int i = 0;
  int first;

  if (a)
    first = 0;
  else
    first = 1;

  do
    {
      if (first)
	foo ();
      else
	bar ();

      first = nfirst;
      bla ();
    } while (i++ < 100);
}
void test5 (void)
{
  unsigned i, j;

  /* Both subloop and non-subloop back edges.  */
  i = j = 0;
  while (1)
    {
      j++;
      foo ();
      if (j < 100)
	continue;
      j = 0;

      i++;
      if (i == 100)
	break;

      if (foo ())
	bla ();
      else
	bar ();
    }
}
예제 #16
0
 definition()
 {
   bla(coperator_stack::push3<helper>); // { dg-error "" }
 }
예제 #17
0
파일: foo.c 프로젝트: malaterre/PublicRep
int foo() { return bla();}
예제 #18
0
파일: test.c 프로젝트: cdcs/bbb-tools
rtems_task Init( rtems_task_argument ignored ) {

	//printk( "*** HELLO WORLD TEST PRINTK ***\n" );
	//debug( "*** HELLO WORLD TEST DEBUG ***\n" );
	printf( "reg (addr = %p) = %X\n", (void*)0x00000018, readl( 0x00000018 ) );
	int j = 0;
	for( j = 17; j < 96; j++ ) {
		timer_interrupt_handler_install( j );
	}

	bla();
	print_gptimer();
	print_intc();

	writel( 0xFFFFFFDF, &intc_base->bla[ 1 ].INTCPS_MIR );

	enable_gptimer();
	rtems_interrupt_level level;
	rtems_interrupt_disable( level );

	print_gptimer();
	print_intc();

/*  disable_wdts();

  WDTIMER2_WCLR = ENABLE_WDT_PRESCALER | SET_WDT_PRESCALER( 1 );
  WDTIMER3_WCLR = ENABLE_WDT_PRESCALER | SET_WDT_PRESCALER( 1 );

  WDTIMER2_WLDR = 0xFFFFFFF0;
  WDTIMER3_WLDR = 0xFFFFFFF0;

  WDTIMER2_WTGR = 0x00000001;
  WDTIMER3_WTGR = 0x00000001;

  check_reg( 0x48314024 );
  check_reg( 0x49030024 );
  check_reg( 0x48314030 );
  check_reg( 0x49030030 );
  check_reg( 0x4831402C );
  check_reg( 0x4903002C );
  check_reg( 0x48314018 );
  check_reg( 0x49030018 );

  enable_wdts();

  printf( "WDTIMER2_WCRR = %X\n", WDTIMER2_WCRR );
  printf( "WDTIMER3_WCRR = %X\n", WDTIMER2_WCRR );*/

  /*i2c_init( CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE );

  imw( 0x4B, 0x29, 0x00 );

  imw( 0x4B, 0x1C, 0x36 );
  imw( 0x4B, 0x1D, 0x54 );
  imw( 0x4B, 0x1E, 0x20 );
  imw( 0x4B, 0x1F, 0x07 );
  imw( 0x4B, 0x20, 0x08 );
  imw( 0x4B, 0x21, 0x12 );

  imw( 0x4B, 0x29, 0x01 );

  imd( 0x4B, 0x2A, 1 );*/


	int i;
	for( i = 0; i < 10; i++ ) {
		//udelay( 500000 );
		//imd( 0x4B, 0x1C, 10 );
		//printf( "WDTIMER2_WCRR = %X\n", WDTIMER2_WCRR );
		//printf( "WDTIMER3_WCRR = %X\n", WDTIMER2_WCRR );
		//check_reg( 0x48314018 );
		//check_reg( 0x49030018 );
		print_gptimer();
		print_intc();
	}
	rtems_interrupt_enable( level );
	print_gptimer();
	print_intc();

/*
  imw 0x4A 0x0D 0x00
  imw 0x4A 0x00 0x36
  imw 0x4A 0x01 0x54
  imw 0x4A 0x02 0x90
  imw 0x4A 0x03 0x05
  imw 0x4A 0x04 0x09
  imw 0x4A 0x05 0x97
  imw 0x4A 0x0D 0x01
  imd 0x4A 0x00 10
*/

  //printf( "*** HELLO WORLD TEST PRINTF ***\n" );
  exit( 0 );
}
예제 #19
0
rw::math::Q pathPlanning::invKin(double dx, double dy , double dz)
{

    rw::kinematics::State state =  this->state;
    rw::math::Transform3D<> t_tool_base =  this->device.get()->baseTframe(this->toolFrame,state);


    Eigen::MatrixXd jq(this->device.get()->baseJframe(this->toolFrame,state).e().cols(), this->device.get()->baseJframe(this->toolFrame,state).e().rows());
    jq =  this->device.get()->baseJframe(this->toolFrame,state).e();

    //cout << "Determinant: " <<rw::math::LinearAlgebra::det(jq) << endl;

    //Least square solver - dq = [j(q)]T (j(q)[j(q)]T)⁻1 du  <=> dq = A*du
    Eigen::MatrixXd A (6,6);
    //A = jq.transpose()*(jq*jq.transpose()).inverse();
    A = (jq*jq.transpose()).inverse()*jq.transpose();

    std::vector<rw::math::Transform3D<> > out = sphere(dx,dy,dz);

    std::ofstream outfile;
    outfile.open("q_conf.txt", std::ios_base::app);
    cout << "invKin" << endl;
    for(unsigned int i = 0; i <= out.size() ; ++i )
    {
        cout << "\r"+to_string(i);

        rw::math::Vector3D<> dif_p = out[i].P()-t_tool_base.P();

        Eigen::Matrix3d dif = out[i].R().e()- t_tool_base.R().e();
        rw::math::Rotation3D<> dif_r(dif);
        rw::math::RPY<> dif_rot(dif_r);

        Eigen::VectorXd du(6);
        du(0) = dif_p[0];
        du(1) = dif_p[1];
        du(2) = dif_p[2];

        du(3) = dif_rot[0];
        du(4) = dif_rot[1];
        du(5) = dif_rot[2];

        Eigen::VectorXd q(6);
        q = A*du;

        rw::math::Q q_current;
        q_current = this->device->getQ(this->state);
        rw::math::Q dq(q);
        rw::math::Q q_new = q_current+ dq;
        if(!collision(q_new) && !within_bound(q_new))
        {
            std::string text = "setQ{"  + to_string(q_new[0])  + ", " + to_string(q_new[1]) + ", " + to_string(q_new[2]) + ", " + to_string(q_new[3]) + ", " + to_string(q_new[4]) + ", " + to_string(q_new[5]) + "}";
            //cout << text << endl;
            outfile << text << endl;
        }
        else
        {
            cout << endl;
            //cout << "\rfalse";
            //cout << "collision" << endl;
        }

    }

    rw::math::Q bla(6); //Just used the text file for debugging purposes,  Which why I just return a random Q config.
    return bla;
}