Example #1
0
File: sink-1.c Project: 0day-ci/gcc
int
main()
{
#pragma omp parallel for ordered(2)
  for (i=0; i < 100; ++i)
    for (j=0; j < 100; ++j)
      {
/* OUT variant does not apply to ORDERED construct.  */
#pragma omp ordered depend(out:i) /* { dg-error "invalid depend kind" } */

/* depend(sink...) is allowed without an offset.  */
#pragma omp ordered depend(sink:i,j-1)

#pragma omp ordered depend(sink:i-1,j+2)
      bark ();
      }

/* depend(sink...) does not apply to `omp task'.  */
#pragma omp task depend(sink:i+3) /* { dg-error "only allowed in 'omp ordered'" } */
  bark();

#pragma omp ordered depend(source) /* { dg-error "'depend' clause must be closely nested" } */

#pragma omp parallel for ordered(2)
  for (i=0; i < 100; ++i)
    for (j=0; j < 100; ++j)
      {
/* Multiple depend(source) allowed.  */
#pragma omp ordered depend(source)
#pragma omp ordered depend(source)
      }

#pragma omp parallel for ordered(2)
  for (i=0; i < 100; ++i)
    for (j=0; j < 100; ++j)
      {
#pragma omp ordered depend(sink:i-2,j-2,k+2) /* { dg-error "does not match number of iteration var" } */
	bark();
      }

#pragma omp parallel for ordered(2)
  for (i=0; i < 100; ++i)
    for (j=0; j < 100; ++j)
      {
#pragma omp ordered depend(sink:i-2) /* { dg-error "does not match number of iteration variables" } */
	bark();
      }

#pragma omp parallel for ordered(2)
  for (i=0; i < 100; ++i)
    for (j=0; j < 100; ++j)
      {
#pragma omp ordered depend(sink:k,i) /* { dg-error "is not an iteration" } */
	bark();
      }
}
	Dog(std::string name) : m_name(std::move(name))
	{
		std::cout << m_name << " is born!" << std::endl ;
		bark(); // this will call the base class Dog version of bark always, cause the child classes are not constructor yet.

		// constructors must be used just to put the class in a usable state.
	
	}
Example #3
0
void testApp::setup() {
	ofSetVerticalSync(true);
	
    gui = new ofxUICanvas(0,(ofGetHeight()-220),(ofGetWidth()-10),60);
    vslide = gui->addBiLabelSlider("fpsTresh", "fpsTreshold", "1", 1.0, 1000, &fpsTresh);
    vslide->setColorBack(ofColor(50,0,0,20));
    vslide->setColorFill(ofColor(52,175,195,100));
    vslide->setColorFillHighlight(ofColor(52,175,195,100));
    vlabel = vslide->getRightLabel();
    
    ofAddListener(gui->newGUIEvent,this,&testApp::guiEvent);
    
	plotHeight = 128;
    tBl = 256;
	bufferSize = 512;

	//fft = ofxFft::create(bufferSize, OF_FFT_WINDOW_HAMMING);
	// To use FFTW, try:
	fft = ofxFft::create(bufferSize, OF_FFT_WINDOW_HANN, OF_FFT_FFTW);
 
    drawBins.resize(fft->getBinSize());
    middleBins.resize(fft->getBinSize());
    audioBins.resize(fft->getBinSize());
    tBuffer1.resize(tBl,0.0);
    tBuffer2.resize(tBl,0.0);
    tBuffer3.resize(tBl,0.0);
    tBuffer4.resize(tBl,0.0);
    tBeat.resize(tBl,false);
    
    
	
	// 0 output channels,
	// 1 input channel
	// 44100 samples per second
	// [bins] samples per buffer
	// 4 num buffers (latency)
	
	ofSoundStreamSetup(0, 1, this, 44100, bufferSize, 10);
	
	ofBackground(0, 0, 0);
    
    fftSmoothed = new float[8192];
    memset(fftSmoothed, 0x00, sizeof(float) * 8192 );
    float freq_spc = 44100 / (float)bufferSize;

	for (int i = 0; i < bufferSize; i++) {
        int bidx = bark(i * freq_spc);
        barkmap[i] = bidx;
    }
    
    tBuffer1B.resize(tBl,0.0);
    tBuffer2B.resize(tBl,0.0);
    tBuffer3B.resize(tBl,0.0);
    tBuffer4B.resize(tBl,0.0);
}
Example #4
0
int f()
{
  int i = readint();
  struct large lala = bark();
  __transaction_atomic {
    lala.x[55] = 666;
    if (test())
      __transaction_cancel;
  }
  return lala.x[i];
}
Example #5
0
FUNCTION void Q5VC(obj attacker)
{
  obj n = createGlobalNPCAtSpecificLoc(0x0232, getLocation(this));
  setHue(n, getHue(this));
  int Q4XB = getCurHP(this);
  Q4XB = Q4XB / 0x02;
  setCurHP(n, Q4XB);
  setCurHP(this, Q4XB);
  attack(n, attacker);
  sfx(getLocation(this), random(0x01C8, 0x01CC), 0x00);
  bark(n, "*The slime splits when struck!*");
  return;
}
Example #6
0
TRIGGER( use )(obj user)
{
  int Q5A2 = getObjType(this);
  loc Q4VS = loc( getLocation(user) );
  loc there = loc( getLocation(this) );
  int Q4IL = getDistanceInTiles(Q4VS, there);
  if(Q4IL > 0x02)
  {
    bark(user, "I am too far away to do that.");
    return(0x00);
  }
  int Q4Q1;
  switch(Q5A2)
  {
  case 0x0A53:
    setType(this, 0x0A52);
    callback(this, 0x0A, 0x26);
    break;
  case 0x0A4F:
    setType(this, 0x0A4E);
    callback(this, 0x0A, 0x26);
    break;
  case 0x0A51:
    setType(this, 0x0A50);
    callback(this, 0x0A, 0x26);
    break;
  case 0x0A4D:
    setType(this, 0x0A4C);
    callback(this, 0x0A, 0x26);
    break;
  case 0x0A52:
    setType(this, 0x0A53);
    Q4Q1 = teleport(this, getLocation(this));
    break;
  case 0x0A4E:
    setType(this, 0x0A4F);
    Q4Q1 = teleport(this, getLocation(this));
    break;
  case 0x0A50:
    setType(this, 0x0A51);
    Q4Q1 = teleport(this, getLocation(this));
    break;
  case 0x0A4C:
    setType(this, 0x0A4D);
    Q4Q1 = teleport(this, getLocation(this));
    break;
  default:
    break;
  }
  return(0x01);
}
Example #7
0
FUNCTION int Q4MJ(obj user)
{
  int Q5NC = 0x00;
  int Q4NC;
  loc Q4VS = loc( getLocation(user) );
  loc there = loc( Q5I9(user) );
  if(!isInMap(there))
  {
    Q4RD(user);
    systemMessage(user, "There is no room to summon that here.");
  }
  else
  {
    faceHere(user, getDirectionInternal(Q4VS, there));
    if(hasObjVar(this, "magicItemModifier"))
    {
      int Q52W = getObjVar(this, "magicItemModifier");
      Q4NC = 0x06 * Q52W;
    }
    else
    {
      if(getSkillLevel(user, 0x19) < 0x0A)
      {
        Q4NC = 0x14;
      }
      else
      {
        Q4NC = 0x14 * getSkillLevel(user, 0x19) / 0x05;
      }
    }
    obj Q4PE = createGlobalNPCAt(0x0259, there, 0x00);
    if(Q4PE != NULL())
    {
      doLocAnimation(there, 0x3728, 0x0A, 0x0A, 0x00, 0x00);
      sfx(there, 0x0217, 0x00);
      setType(Q4PE, 0x0F);
      animateMobile(Q4PE, 0x0C, 0x0F, 0x01, 0x00, 0x00);
      attachScript(Q4PE, "destcrea");
      setObjVar(Q4PE, "summonDifficulty", 0x02EE);
      int Q5ND = Q558(Q4PE, user, 0x64, 0x01);
      callback(Q4PE, Q4NC, 0x08);
      Q5NC = 0x01;
    }
    else
    {
      bark(user, "Whoops...something got in the way.");
    }
  }
  Q5UQ(this);
  return(Q5NC);
}
Example #8
0
TRIGGER( use )(obj user)
{
  loc Q53E = loc( 0x1433, 0x0267, 0x00 );
  if(!hasObjVar(this, "beenUsed"))
  {
    int Q53F = Q492[random(0x00, numInList(Q492) - 0x01)];
    obj Q5BQ = requestCreateNPCAt(Q53F, Q53E, 0x04);
    if(Q5BQ != NULL())
    {
      doLocAnimation(Q53E, 0x3709, 0x02, 0x38, 0x00, 0x00);
    }
    else
    {
      bark(this, "The brazier fizzes and pops, but nothing seems to happen.");
    }
    setObjVar(this, "beenUsed", 0x00);
  }
  else
  {
    bark(this, "The brazier fizzes and pops, but nothing seems to happen.");
  }
  return(0x00);
}
Example #9
0
TRIGGER( use )(obj user)
{
  int x = getHue(this);
  if(x < 0x0960)
  {
    x = 0x0960;
  }
  x = x + 0x01;
  if(x > 0x097D)
  {
    x = 0x0961;
  }
  setHue(this, x);
  string Q4XU = x;
  bark(this, Q4XU);
  return(0x01);
}
Example #10
0
TRIGGER( use )(obj user)
{
  int Q4FS = getX(getLocation(this));
  int Q4FT = getY(getLocation(this));
  int Q4FU = getZ(getLocation(this));
  int Q5CG = Q4FU + 0x01;
  loc Q5C0 = loc( Q4FS, Q4FT, Q5CG );
  loc trapLocation = loc( 0x14CB, 0x023C, 0x00 );
  list Q5DQ;
  if(!hasObjVar(this, "working"))
  {
    bark(this, "SOUND EFFECT");
    callback(this, 0x05, 0x01);
    int Q64U = teleport(this, Q5C0);
    messageToRange(trapLocation, 0x0A, "disarm", Q5DQ);
    setObjVar(this, "working", 0x01);
  }
  return(0x01);
}
Example #11
0
VFile* Value::as_vfile(String::Language /*lang*/, const Request_charsets* /*charsets*/) { 
	bark("is '%s', it does not have file value"); return 0;
}
Example #12
0
Value* Value::get_element(const String& /*aname*/) {
	return bark("is '%s', it has no elements");
}
Example #13
0
FUNCTION int Q4WT(obj user, obj Q5AO, obj Q5AB, obj Q5AP, int bank)
{
  loc Q575 = loc( getLocation(user) );
  loc Q4VS = loc( getLocation(Q5AB) );
  moveDir(Q4VS, 0x04);
  list Q51X = list( 0x100E, 0x100F, 0x1010, 0x1013 );
  int num = random(0x00, (numInList(Q51X) - 0x01));
  int Q51W = Q51X[num];
  obj key = NULL();
  obj Q47G = NULL();
  if(bank)
  {
    fixBank(user);
    Q47G = getItemAtSlot(user, 0x1D);
    if(Q47G == NULL())
    {
      Q47G = getBackpack(user);
      bank = 0x00;
    }
  }
  else
  {
    Q47G = getBackpack(user);
  }
  if(Q47G == NULL())
  {
    key = createGlobalObjectAt(Q51W, Q575);
    barkTo(user, user, "A house key is now at my feet.");
  }
  else
  {
    key = createGlobalObjectIn(Q51W, Q47G);
    if(bank)
    {
      barkTo(user, user, "A house key is now in my safety deposit box.");
    }
    else
    {
      barkTo(user, user, "A house key is now in my backpack.");
    }
  }
  if(key == NULL())
  {
    bark(user, "Ack, a key could not be created!");
    deleteObject(Q5AO);
    return(0x00);
  }
  attachScript(key, "key");
  list Q5Z5;
  if(hasObjVar(Q5AO, "myhousedoors"))
  {
    getObjListVar(Q5Z5, Q5AO, "myhousedoors");
  }
  int Q55T = numInList(Q5Z5);
  for(int Q4EJ = 0x00; Q4EJ < Q55T; Q4EJ ++)
  {
    Q5AB = Q5Z5[Q4EJ];
    Q45B(Q5AB, key);
  }
  if(Q5AP != NULL())
  {
    Q45B(Q5AP, key);
  }
  attachScript(key, "housekey");
  return(0x01);
}
Example #14
0
FUNCTION void Q47U(obj Q4XN, int Q65M)
{
  list Q5N0;
  int Q63R;
  int count;
  string Q5WG;
  string Q5WH;
  string Q5WI;
  string Q5WJ;
  string Q5WK;
  int Q5MV;
  string Q56O = "Type ";
  string Q65S = Q65M;
  Q56O = Q56O + Q65S;
  Q56O = Q56O + ":";
  bark(Q4XN, Q56O);
  int Q5NL = getResourcesOnObj(Q4XN, Q65M, Q5N0);
  if(Q5NL == 0x00)
  {
    bark(Q4XN, "error");
    return;
  }
  Q63R = numInList(Q5N0);
  for(count = 0x00; count < Q63R; count ++)
  {
    Q5WG = Q5N0[count];
    Q5NL = getResource(Q5MV, Q4XN, Q5WG, Q65M, 0x00);
    if(Q5NL == 0x00)
    {
      Q5WH = "error";
    }
    else
    {
      Q5WH = Q5MV;
    }
    Q5NL = getResource(Q5MV, Q4XN, Q5WG, Q65M, 0x01);
    if(Q5NL == 0x00)
    {
      Q5WI = "error";
    }
    else
    {
      Q5WI = Q5MV;
    }
    Q5NL = getResource(Q5MV, Q4XN, Q5WG, Q65M, 0x02);
    if(Q5NL == 0x00)
    {
      Q5WJ = "error";
    }
    else
    {
      Q5WJ = Q5MV;
    }
    Q5NL = getResource(Q5MV, Q4XN, Q5WG, Q65M, 0x03);
    if(Q5NL == 0x00)
    {
      Q5WK = "error";
    }
    else
    {
      Q5WK = Q5MV;
    }
    Q56O = Q5WG;
    Q56O = Q56O + " ";
    Q56O = Q56O + Q5WH;
    Q56O = Q56O + " ";
    Q56O = Q56O + Q5WI;
    Q56O = Q56O + " ";
    Q56O = Q56O + Q5WJ;
    Q56O = Q56O + " ";
    Q56O = Q56O + Q5WK;
    bark(Q4XN, Q56O);
  }
  return;
}
Example #15
0
int foo()
{
      bark();
}
Example #16
0
 void do_bark(char const * pf, char const * f)
 {
   std::printf("%s%s%s", geordi::parsep, bark(pf, f).c_str(), geordi::parsep);
   std::fflush(stdout);
 }
	~Dog()
	{
		std::cout << m_name << " (Dog) is destroyed" << std::endl;

		bark(); // this will also call always the base class version of bark, cause normally the child classes are destroyed before the base class.
	}
	void seeCat()
	{
		bark();
	}
Example #19
0
//--------------------------------------------------------------
void testApp::setup(){
    
    ofBackground(0);
    ofSetFrameRate(30);
    ofEnableAlphaBlending();
    //    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    //    glEnable(GL_DEPTH_TEST);
    glPointSize(1.0);
    drawFBO = false;
    autoRotate = true;
    drawEQ = false;
    
    //not really needed
    //    glEnable(GL_ALPHA_TEST);
    //    glAlphaFunc(GL_GREATER, 0.10f);
    
    //generate the mesh points
    buildSphereMesh(rad, res, vm);
    cout << "nverts: " << vm.getNumVertices() << endl;
    cout << "arb: " << ofGetUsingArbTex() << ", norm: " << ofGetUsingNormalizedTexCoords() << endl;
    
    //load the texture shader
    shader.load("tex.vert", "tex.frag");
    
    //fft init
    fftSmoothed = new float[8192];
    memset(fftSmoothed, 0x00, sizeof(float) * 8192);
    
    //map the frequencies to bark bands
    float freq_spc = FREQ_MAX / (float)SPECTRAL_BANDS;
    
	for (int i = 0; i < SPECTRAL_BANDS; i++) {
        int bidx = bark(i * freq_spc);
        barkmap[i] = bidx;
    }
    
    //load the position updating frag shader
    pos_shader.load("", "position.frag");
    
    //for the sphere we set this to the resolution which = #of verts along each axis
    fbo_res = res;
    
    //init the fbo's with blank data
    vector<ofVec3f> fbo_init_data;
    fbo_init_data.assign(fbo_res * fbo_res, ofVec3f(0.0, 0.0, 0.0));
    
    posbuf.allocate(fbo_res, fbo_res, GL_RGB32F);
    posbuf.src->getTextureReference().loadData((float *)&fbo_init_data[0], fbo_res, fbo_res, GL_RGB);
    posbuf.dst->getTextureReference().loadData((float *)&fbo_init_data[0], fbo_res, fbo_res, GL_RGB);
    
    //reuse fbo_init_data for no real reason, it just needs to be blank
    eq_tex.allocate(fbo_res, 1, GL_RGB32F_ARB);
    eq_tex.loadData((float *)&fbo_init_data[0], fbo_res, 1, GL_RGB);
    
    axis_loc = fbo_res;
    angincr = 180.0/(float)fbo_res;

    player.loadSound("jhfd.mp3");
    
    player.play(); //go
}