Example #1
0
void print_simplex_flags(FILE *f, simplex_solver_t *solver) {
  fprintf(f, "base level:     %"PRIu32"\n", solver->base_level);
  fprintf(f, "decision level: %"PRIu32"\n", solver->decision_level);
  fprintf(f, "matrix ready:   %s\n", bool2string(solver->matrix_ready));
  fprintf(f, "tableau ready:  %s\n", bool2string(solver->tableau_ready));
  fprintf(f, "save rows:      %s\n", bool2string(solver->save_rows));
}
Example #2
0
/* Display a value  */
void cpPrintVal(INTERP_VAL value)
{
	if (value.type & VAL_REF)
	{
		value.type = (INTERP_TYPE)(value.type & ~VAL_REF);
		debug( LOG_NEVER, "type: %5s, value: %i (ref)",
			scriptTypeToString(value.type), value.v.ival );
		return;
	}

	switch(value.type)
	{
		case VAL_BOOL:
			debug( LOG_NEVER, "type: %5s, value: %s",
				scriptTypeToString(value.type),
				bool2string(value.v.bval) );
			break;
		case VAL_INT:
			debug( LOG_NEVER, "type: %5s, value: %d",
				scriptTypeToString(value.type),
				value.v.ival );
			break;
		case VAL_FLOAT:
			debug( LOG_NEVER, "type: %5s, value: %f",
				scriptTypeToString(value.type),
				value.v.fval );
			break;
		case VAL_STRING:
			debug( LOG_NEVER, "type: %5s, value: %s",
				scriptTypeToString(value.type),
				value.v.sval );
			break;
		case VAL_TRIGGER:
		case VAL_EVENT:
		default:
			debug( LOG_NEVER, "type: %5s, value: %d",
				scriptTypeToString(value.type),
				value.v.ival );
			break;
	}
}
Example #3
0
/*
 * Print a configuration descriptor
 */
static void show_params(param_t *params) {
  printf("param record: %p\n", params);
  printf("--- restart ---\n");
  printf("  fast-restart = %s\n", bool2string(params->fast_restart));
  printf("  c-threshold  = %"PRIu32"\n", params->c_threshold);
  printf("  d-threshold  = %"PRIu32"\n", params->d_threshold);
  printf("  c-factor     = %.4f\n", params->c_factor);
  printf("  d-factor     = %.4f\n", params->d_factor);
  printf("--- clause deletion ---\n");
  printf("  r-threshold  = %"PRIu32"\n", params->r_threshold);
  printf("  r-fraction   = %.4f\n", params->r_fraction);
  printf("  r-factor     = %.4f\n", params->r_factor);
  printf("--- core ---\n");
  printf("  var-decay     = %.4f\n", params->var_decay);
  printf("  randomness    = %.4f\n", (double) params->randomness);
  printf("  random_seed   = %"PRIu32"\n", params->random_seed);
  printf("  branching     = %s\n", branching2string[params->branching]);
  printf("  clause-decay  = %.4f\n", (double) params->clause_decay);
  printf("  cache-tclause = %s\n", bool2string(params->cache_tclauses));
  printf("  tclause-size  = %"PRIu32"\n", params->tclause_size);
  printf("--- egraph ---\n");
  printf("  use_dyn_ack            = %s\n", bool2string(params->use_dyn_ack));
  printf("  use_bool_dyn_ack       = %s\n", bool2string(params->use_bool_dyn_ack));
  printf("  max_ackermann          = %"PRIu32"\n", params->max_ackermann);
  printf("  max_boolackermann      = %"PRIu32"\n", params->max_boolackermann);
  printf("  aux_eq_quota           = %"PRIu32"\n", params->aux_eq_quota);
  printf("  aux_eq_ratio           = %.4f\n", params->aux_eq_ratio);
  printf("  dyn_ack_threshold      = %"PRIu32"\n", (uint32_t) params->dyn_ack_threshold);
  printf("  dyn_bool_ack_threshold = %"PRIu32"\n", (uint32_t) params->dyn_bool_ack_threshold);
  printf("  max_interface_eqs      = %"PRIu32"\n", params->max_interface_eqs);
  printf("--- simplex ---\n");
  printf("  use_simplex_prop       = %s\n", bool2string(params->use_simplex_prop));
  printf("  adjust_simplex_model   = %s\n", bool2string(params->adjust_simplex_model));
  printf("  integer_check          = %s\n", bool2string(params->integer_check));
  printf("  max_prop_row_size      = %"PRIu32"\n", params->max_prop_row_size);
  printf("  bland_threshold        = %"PRIu32"\n", params->bland_threshold);
  printf("  integer_check_period   = %"PRIu32"\n", params->integer_check_period);
  printf("--- array solver ---\n");
  printf("  max_update_conflicts   = %"PRIu32"\n", params->max_update_conflicts);
  printf("  max_extensionality     = %"PRIu32"\n", params->max_extensionality);
  printf("\n");
  fflush(stdout);
}
void CCetoneSynth::getParameterDisplay(VstInt32 index, char* text)
{
	SynthProgram* p = &Programs[this->CurrentProgram];

	switch (index)
	{
	default:			vst_strncpy(text, "Unknown", kVstMaxParamStrLen); break;
	case pVolume:		myfloat2string(p->Volume, text);	break;
	case pPanning:		myfloat2string(p->Panning, text); break;

	case pCoarse:		int2string(p->Coarse, text, kVstMaxParamStrLen); break;
	case pFine:			int2string(p->Fine, text, kVstMaxParamStrLen); break;

	case pFilterType:	ftype2str(p->FilterType, text); break;
	case pFilterMode:	fmode2str(p->FilterMode, text); break;

	case pCutoff:		myfloat2string(p->Cutoff, text); break;
	case pResonance:	myfloat2string(p->Resonance, text); break;

	case pPortaMode:	bool2string(p->PortaMode, text); break;
	case pPortaSpeed:	myfloat2string(p->PortaSpeed, text); break;

	case pArpMode:		arp2str(p->ArpMode, text); break;
	case pArpSpeed:		int2string(p->ArpSpeed, text, kVstMaxParamStrLen); break;

	case pOsc1Coarse:	int2string(p->Voice[0].Coarse, text, kVstMaxParamStrLen); break;
	case pOsc2Coarse:	int2string(p->Voice[1].Coarse, text, kVstMaxParamStrLen); break;
	case pOsc3Coarse:	int2string(p->Voice[2].Coarse, text, kVstMaxParamStrLen); break;

	case pOsc1Fine:		int2string(p->Voice[0].Fine, text, kVstMaxParamStrLen); break;
	case pOsc2Fine:		int2string(p->Voice[1].Fine, text, kVstMaxParamStrLen); break;
	case pOsc3Fine:		int2string(p->Voice[2].Fine, text, kVstMaxParamStrLen); break;

	case pOsc1Wave:		owave2str(p->Voice[0].Wave, text); break;
	case pOsc2Wave:		owave2str(p->Voice[1].Wave, text); break;
	case pOsc3Wave:		owave2str(p->Voice[2].Wave, text); break;

	case pOsc1Pw:		int2string(p->Voice[0].Pw, text, kVstMaxParamStrLen); break;
	case pOsc2Pw:		int2string(p->Voice[1].Pw, text, kVstMaxParamStrLen); break;
	case pOsc3Pw:		int2string(p->Voice[2].Pw, text, kVstMaxParamStrLen); break;

	case pOsc1Volume:	myfloat2string(p->Voice[0].Volume, text); break;
	case pOsc2Volume:	myfloat2string(p->Voice[1].Volume, text); break;
	case pOsc3Volume:	myfloat2string(p->Voice[2].Volume, text); break;

	case pOsc1Sync:		bool2string(p->Voice[0].Sync, text); break;
	case pOsc2Sync:		bool2string(p->Voice[1].Sync, text); break;
	case pOsc3Sync:		bool2string(p->Voice[2].Sync, text); break;

	case pOsc1Ring:		bool2string(p->Voice[0].Ring, text); break;
	case pOsc2Ring:		bool2string(p->Voice[1].Ring, text); break;
	case pOsc3Ring:		bool2string(p->Voice[2].Ring, text); break;

	case pEnv1A:		myfloat2string(this->Envs[0]->TimeValue(p->Attack[0]), text); break;
	case pEnv2A:		myfloat2string(this->Envs[0]->TimeValue(p->Attack[1]), text); break;

	case pEnv1H:		myfloat2string(this->Envs[0]->TimeValue(p->Hold[0]), text); break;
	case pEnv2H:		myfloat2string(this->Envs[0]->TimeValue(p->Hold[1]), text); break;

	case pEnv1D:		myfloat2string(this->Envs[0]->TimeValue(p->Decay[0]), text); break;
	case pEnv2D:		myfloat2string(this->Envs[0]->TimeValue(p->Decay[1]), text); break;

	case pEnv1S:		myfloat2string(p->Sustain[0], text); break;
	case pEnv2S:		myfloat2string(p->Sustain[1], text); break;

	case pEnv1R:		myfloat2string(this->Envs[0]->TimeValue(p->Release[0]), text); break;
	case pEnv2R:		myfloat2string(this->Envs[0]->TimeValue(p->Release[1]), text); break;

	case pLfo1Speed:	myfloat2string(p->LfoSpeed, text); break;

	case pLfo1Wave:		wave2str(p->LfoWave, text); break;

	case pLfo1Pw:		int2string(p->LfoPw, text, kVstMaxParamStrLen); break;

	case pLfo1Trig:		bool2string(p->LfoTrigger, text); break;

	case pMod1Src:		msrc2str(p->Modulations[0].Source, text); break;
	case pMod2Src:		msrc2str(p->Modulations[1].Source, text); break;
	case pMod3Src:		msrc2str(p->Modulations[2].Source, text); break;
	case pMod4Src:		msrc2str(p->Modulations[3].Source, text); break;

	case pMod1Dest:		mdest2str(p->Modulations[0].Destination, text); break;
	case pMod2Dest:		mdest2str(p->Modulations[1].Destination, text); break;
	case pMod3Dest:		mdest2str(p->Modulations[2].Destination, text); break;
	case pMod4Dest:		mdest2str(p->Modulations[3].Destination, text); break;

	case pMod1Amount:	int2string((int)p->Modulations[0].Amount, text, kVstMaxParamStrLen); break;
	case pMod2Amount:	int2string((int)p->Modulations[1].Amount, text, kVstMaxParamStrLen); break;
	case pMod3Amount:	int2string((int)p->Modulations[2].Amount, text, kVstMaxParamStrLen); break;
	case pMod4Amount:	int2string((int)p->Modulations[3].Amount, text, kVstMaxParamStrLen); break;

	case pMod1Mul:		int2string((int)p->Modulations[0].Multiplicator, text, kVstMaxParamStrLen); break;
	case pMod2Mul:		int2string((int)p->Modulations[1].Multiplicator, text, kVstMaxParamStrLen); break;
	case pMod3Mul:		int2string((int)p->Modulations[2].Multiplicator, text, kVstMaxParamStrLen); break;
	case pMod4Mul:		int2string((int)p->Modulations[3].Multiplicator, text, kVstMaxParamStrLen); break;

	case pFilterMod:	myfloat2string(p->EnvMod, text); break;
	}
}
Example #5
0
rtems_task Init(
  rtems_task_argument argument
)
{
  rtems_status_code status;

  printf("\n\n*** OSMONWEB TEST ***\n\r" );
  printf("GoAhead HTTPD Enabled: %s\n", bool2string(GoAhead_HTTPD_enabled) );
  printf("Simple HTTPD Enabled: %s\n", bool2string(Simple_HTTPD_enabled) );
  printf("FTPD Enabled: %s\n", bool2string(FTPD_enabled) );
  printf("\n");

  /*
   * Load Base Filesystem Image
   */
  printf("Loading filesystem image\n");
  status = Untar_FromMemory( (char *)FilesystemImage, FilesystemImage_size );
   
  printf("Initializing Network");
  rtems_bsdnet_initialize_network ();

  #if defined(START_DEBUG_STUB)
    rtems_gdb_start( 10, NULL );
  #endif

  #if defined(USE_FTPD)
    printf( "Initializing FTPD\n" );
    rtems_initialize_ftpd();
  #endif

  #if defined(USE_GOAHEAD_HTTPD)
    printf( "Initializing GoAhead HTTPD\n" );
    status = rtems_initialize_webserver();
    if ( status )
      printf( "ERROR -- failed to initialize webserver\n" );

    traceSetHandler( quietTraceHandler );
  #endif

  #if defined(USE_SIMPLE_HTTPD)
    printf( "Initializing Simple HTTPD\n" );
    status = rtems_initialize_webserver(
      100,                             /* initial priority */
      48 * 1024,                       /* stack size */
      RTEMS_DEFAULT_MODES,             /* initial modes */
      RTEMS_DEFAULT_ATTRIBUTES,        /* attributes */
      NULL,                            /* init_callback */
      my_shttpd_addpages,              /* addpages_callback */
      "/",                             /* initial priority */
      80                               /* port to listen on */
    );
    if ( status )
      printf( "ERROR -- failed to initialize webserver\n" );

  #endif

  
  osmonweb_init( "/", 1 );
  osmonweb_init( "/", 2 );

  status = rtems_task_delete( RTEMS_SELF );
}