double
ullong_to_double (unsigned long long x)


{
  return (x & 0x7fffffffffffffffULL);
}


  if (OutData_image_height != out_length)
    {
      main_result++;


unsigned int Show_Bits _ANSI_ARGS_ ((int n));


uint1 regTemp[3] = {reg[0], reg[1], reg[2], reg[3]};


    for (int i = 0; i < size; i++) {
        std::cout << array[i] << " ";
    }


    for (int i = 0; i < num_commands; i++) {
        commandStream.write(commands[i]);
        dataStream.write(data[i]);
    }


      fscanf(myfile,"%f", &weights[i]);
      printf("%d: %f \n", i, weights[i]);
  }


char const * SIMPLE_RNN_RECURRENT_KERNEL_FILE =
    "../../model/simple_rnn_1_recurrent_kernel.txt";


char const * SIMPLE_RNN_KERNEL_FILE = "../../model/simple_rnn_1_kernel.txt";


template <typename DT>
void fc(DT* input_feature_map, DT* bias, DT* kernel, DT* output_feature_map);


void rnn(DT* last_state, DT* input_state, DT* bias, DT* kernel, DT* recurrent_kernel, DT* output_state);


template <typename DT, typename LT>
void print_data(DT* input, LT length);


  for (LDATA_T i = 0; i < FC_OUTPUT_SIZE; i++) {
#pragma HLS PIPELINE
    bias_reg[i] = bias[i];
  }


for (LDATA_T batch_index = 0; batch_index < FC_BATCH_SIZE; batch_index++) {


for (LDATA_T find_max_index = 0; find_max_index < SM_CLASS_SIZE; find_max_index++) {


float find_latency_before_inst(Instruction *inst, std::map<Instruction*, unsigned> &instr_index_loop, std::vector<std::pair<int,float> > *dependence_loop);


						latency=std::max(latency,latency_tmp);
					}
				}


		{
			int counter_tmp=0;
			Loop* sub_loop=subLoops.at(j);
			counter_tmp = nested_loop_depth_for_loop(sub_loop);
			counter=std::max(counter,counter_tmp);


					 inst_reschedule_considered[iti]=1;
				 }
			 }


std::vector< std::pair<int,int> >::iterator it = array_partition[array_index].begin();


        if(set_subFn==false){
        	errs()<<"Pipelining of subFun is not set correctly.\n";
        }


template<typename T>
class scoped_ptr {
public:


WINGDIAPI void APIENTRY glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);


extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
                                                void *userdata);


extern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);


extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);


extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);


extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState();


int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s);


extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);


#pragma nopackwarning
#endif
#pragma pack(pop)
#endif /* Compiler needs structure packing set */


unsigned resolve_address(enum MAPPING mapping, unsigned addr);


void ntt2x2_fwdntt(bram *ram, enum OPERATION mode, enum MAPPING mapping);


    // Load data into BRAM, 4 coefficients per line
    reshape(&ram, r_gold);


void _ssdm_op_SpecLoopName() __attribute__ ((nothrow));


  extern
    __attribute__((__format__ (gnu_printf, 1, 2))) __attribute__ ((__nonnull__ (1)))
    int __cdecl __mingw_printf(const char * __restrict__ , ... ) __attribute__ ((__nothrow__));


extern void AESL_WRAP_fir (
short* y,
short x);


sc_lv<1> esl_icmp_ugt(const sc_lv<W0>& i0, const sc_lv<W1>& i1) {
    if (!i0.is_01() || !i1.is_01()) return sc_lv<1>();
    return (sc_biguint<W0>(i0) > sc_biguint<W1>(i1));
}


int __cdecl strcoll(const char *_Str1,const char *_Str2);


inline int IsATTY(int /* fd */) { return 0; }


namespace Frontend
{
class WrappedLLVMContext;
}


void SetPeekRateExpression(Expression* expr) { m_peek_rate_expr = expr; }


  std::string ToString() const { return m_ss.str(); }

  void BeginBlock(const char* fmt, ...);
  void Write(const char* fmt, ...);


bool HasNameInLocalScope(const NameType& name) const { return m_map.find(name) != m_map.end(); }


const char* const stack_trace = strstr(message, internal::kStackTraceMarker);


bool BuildPush(llvm::IRBuilder<>& builder, llvm::Value* value) override final { return false; }


  public:
    SparseConcat(circt::OpBuilder& opb, const mlir::Location& location, const size_t width);
    void Insert(const size_t offset, const mlir::Value value);


void GenerateCallTrace(std::ostream& str, const FunctionInstance& srcInst);


void WriteResourceUsage(const char* const fileName, const Program& program);


void SerializeIRToJson(const Program& program, const std::string& fileName);


                            }

                            ReportBuilderT::Tuple tuple = {};
                            tuple[static_cast<size_t>(PathLengthTupleElement::OperationLength)] = opLength;


const size_t PathElementCount = static_cast<size_t>(ClockGatingPathElement::Count);


     closely related to copyright including, without limitation,
     performance, broadcast, sound recording, and Sui Generis Database
     Rights, without regard to how the rights are labeled or


void f2_fft_man(int log2n, const complex_t *pIn, complex_t *pOut)
{
    man_fft(log2n, pIn, pOut);
}


{
    return harness_strassen_indexed_v2(strassen_indexed_v2);
}


			}
		}else{
			const traits_t Traits = (traits_t)(InheritedTrait_SequenceEnd|InheritedTrait_ReturnPosition);

            s=body.template step<0,Traits,call_stack_t>(s, call_stack);


uint32_t vhls_ackerman(uint32_t m, uint32_t n)
{
    return f2_ackerman(m,n);
}


{
    return test_sudoku(vhls_sudoku);
};


    if(!test_sort_indexed(man_sort_indexed)){
        fprintf(stderr, "SORT_INDEXED/manual failed.\n");
    }


    if(!test_sort(man_sort)){
        fprintf(stderr, "SORT/manual failed.\n");
    }


void covariance(inout_float_t data[1024], inout_float_t cov[1024]);


void gramSchmidt(inout_float_t a[1024], inout_float_t r[1024],
                 inout_float_t q[1024]);


         out_int_t results_2[1024], out_int_t results_3[1024],
         out_int_t results_4[1024], out_int_t results_5[1024],


void levmarq(in_int_t ny, in_float_t dysq[N], in_float_t y[N], in_int_t npar,
             inout_float_t g[M], inout_float_t d[M], inout_float_t h[M][M]);


  else {
    std::cout << res << "\n";
    return 1;
  }


for (int stage = 1; stage <= 8; stage++) {


    for(i = 0; i < N; i++)
      for(j = 0; j < N; j++)
#pragma HLS PIPELINE
	path[i][j] = path[i][j] < path[i][k] + path[k][j] ? path[i][j] : path[i][k] + path[k][j];


    for ( ky=1 ; ky<n ; ky++ ) {
      #pragma HLS PIPELINE
      du1[ky] = u1[nl1][ky+1][kx] - u1[nl1][ky-1][kx];


void kernel_pivot(int k,
		  int n,
		  float A[2*N][2*N])


    {
      printf("Error opening file!\n");
      exit(1);
    }


Connection_Id id = new_connection(sock);


		if (retsig != 0)
			MSG(1, "Can't set signal set (%d), expect problems when terminating!\n", retsig);


	if (festival_check_info(info, "festival_speak_command") == -1) {
		return NULL;
	}


Boolean ECIFNDECLARE eciCopyVoice(ECIHand hEngine, int iVoiceFrom, int iVoiceTo) {
	assert(0);
}


		MSG(3, "Warning:  Speaking sound icon name, %s, as a fallback, since audio file can not be found.", icon_name);
		cxxpiper_handle_text(icon_name);
	    }
	}


static void kali_set_punctuation_mode(SPDPunctuation punct);


short GetHauteurMaxKaliStd(void) {
	assert(0);
}


      auto e = elems[i];
      bool gt_all = true;
      for (unsigned j = 0; j < elems.size(); j++) {
	auto a = elems[j];
	if (i != j && !f(a, e)) {


  void emitCoreIR(const std::string& name,
                  MicroArchitecture& arch,


    virtual void print(std::ostream& out) const override {
      out << "label_type";


void printActiveBlocks(MicroArchitecture& arch, VerilogDebugInfo& info);


  for (int i = 0; i < 5; i++) {
    int val = ram->read(a + i) + 34;
    ram->write(b + i, val);
  }


int32_t _361 = _conv2_stencil.get(0, 0);


  complex a = ram->read(0);
  complex b = ram->read(1);


    const float* w_data,
    const float* k_data,
    const float* h_data,
    const float* data_i,
    Word* data_o,


const DigitType testing_data[NUM_TEST * DIGIT_WIDTH] = {
  #include "../../196data/test_set.dat"
};


void DigitRec(WholeDigitType global_training_set[NUM_TRAINING / 2], WholeDigitType global_test_set[NUM_TEST], LabelType global_results[NUM_TEST], int run);


void SgdLR( VectorDataType    data[NUM_FEATURES * NUM_TRAINING / D_VECTOR_SIZE],
            VectorLabelType   label[NUM_TRAINING / L_VECTOR_SIZE],
            VectorFeatureType theta[NUM_FEATURES / F_VECTOR_SIZE],
            bool readLabels,
            bool writeOutput);


const ap_uint<2> width_mode = width >> 4;


                        ptr[3] = 255;   // full alpha;
                }


                else
                    delete (double *) m_ptr->m_memory;
            }


  static void CheckChannelDecl(vm::Insn *insn);
  static void CheckMailboxDecl(vm::Insn *insn);
  static void CheckVarDecl(vm::Insn *insn);
};


  void CopyDependingInsns(MethodContext *method,
                          map<IInsn *, IInsn *> &insn_map);


class TlsWrapper {
 public:
  static bool IsTls(Object *obj);
  static bool IsTlsValue(Value *value);
  static void InjectTlsWrapper(VM *vm, Value *value);


void DumpStream::push_indent() { indent_++; }


ObjectSynth *osynth = new ObjectSynth(obj, this, is_root, name);


      sw->state_->insns_.push_back(a);
      (*args)[i] = lhs;
    }


    case OP_IF: {
      bool v = ExecIf();
      // do not increment pc.
      return v;
    }


void Profile::SetEnable(bool enable) { enabled_ = enable; }


DFVariable subst = tablePermut(value(127, 120), inv);


  Graph graph;
  KernelStorage storage;
  TypeBuilder typeBuilder;
  VarBuilder varBuilder;


  enum TypeKind : uint8_t {
    INT = 0,
    UINT,
    FLOAT
  };


OptKuznechikEncoder *kernel = new OptKuznechikEncoder();


std::vector<std::string> flags = split_names(str);


template <class T> struct identity_tag {};


std::vector<CharType> bjdx = {'[', '{', 'S', 'H', 'T', 'F', 'N', 'Z'}; // excluded markers in bjdata optimized type


auto [buffers, latency] = schedule(graph);


  while (foundConnect != connectionMap.end()) {
    curVal = foundConnect->second.getSrc();
  }


    },
    {}
  );
  EXPECT_EQ(kernel.compile(config, nullDevicePath, dfcxx::ASAP), true);


    HI_FunctionInstantiation(const char *FuncInitiationLog_Name, const std::string _topFunctionName)
        : ModulePass(ID)
    {
        topFunctionName = _topFunctionName;


for (int i = 0; i < real_MulI->getNumOperands(); i++)


    if (argc < 4)
    {
        errs() << "Usage: " << argv[0] << " <C/C++ file> <Top_Function_Name> <Config_File_Path>\n";
        return 1;
    }


    print_info("Enable IndVarSimplify Pass");
    auto loopsimplifypass = createLoopSimplifyPass();
    PM.add(createLoopSimplifyPass());


float64 propagateFloat64NaN(float64 a, float64 b);


void bfs(
    node_t nodes[N_NODES],
    edge_t edges[N_EDGES],


void fft(
    double real[FFT_SIZE],
    double img[FFT_SIZE],
    double real_twid[FFT_SIZE / 2],
    double img_twid[FFT_SIZE / 2]);


void md(
    int32_t n_points[blockSide][blockSide][blockSide],
    dvector_t force[blockSide][blockSide][blockSide][densityFactor],
    dvector_t position[blockSide][blockSide][blockSide][densityFactor]);


void kernel_jacobi_2d(double A[30][30], double B[30][30]);


bit1 pixel_in_triangle(bit8 x, bit8 y, Triangle_2D triangle_2d);


    for (a_idx = 0; a_idx < (ALEN + 1); a_idx++) {
        M[a_idx] = a_idx * GAP_SCORE;
    }


        for (j = 1; j < col_size - 1; j++) {
            sol[INDX(row_size, col_size, 0, j, i)] =
                orig[INDX(row_size, col_size, 0, j, i)];
            sol[INDX(row_size, col_size, row_size - 1, j, i)] =


inline X pair_first(std::pair<X, Y> P) { return P.first; }


MachineInstr *DefMI = MRI.getVRegDef(MO.getReg());


unsigned int uselength = (bitwidth/4) + (((bitwidth&0x3) == 0) ? 0 : 1);


  for(i = 0; i < 16; ++i)
    printf("result:%d\n", op_lsr(rand(), rand()));


    SC_CTOR(svm_classifier_mul_14s_13s_27_1):  ACMP_smul_ss_U ("ACMP_smul_ss_U") {
        ACMP_smul_ss_U.din0(din0);
        ACMP_smul_ss_U.din1(din1);
        ACMP_smul_ss_U.dout(dout);


__attribute__((weak)) s32 _open(const char8 *buf, s32 flags, s32 mode);


    	    	  	  printf("Core 1 HW: \n");
    	    	  	  printf("Core 1 time test start: %llu \n", start_time);
    	    	  	  printf("Core 1 time test end : %llu \n", end_time);
    	    	  	  */
    	    	  	  t = end_time-start_time-dt;


		{ volatile register u32 Reg __asm(XREG_CP15_INST_FAULT_STATUS);
	  FaultStatus = Reg; }


            finish = PS7_INIT_CORRUPT;
            break;
        }
    }
    return finish;


void Xil_SetTlbAttributes(INTPTR Addr, u32 attrib);


	for (i = 0; i < XPAR_XDMAPS_NUM_INSTANCES; i++) {
		if (XDmaPs_ConfigTable[i].DeviceId == DeviceId) {
			CfgPtr = &XDmaPs_ConfigTable[i];
			break;
		}


template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, signed char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); ret <<= 8; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (signed char op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 8; ret >>= 8; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, signed char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); ret <<= 8; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (signed char op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<8 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, signed char op2) { ap_int_base<8 + 1, false> val(op2); val[8] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<8 + 1, false > operator, (signed char op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<8 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 8, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, signed char op2) { ap_int_base<8 + _AP_W + _AP_W2, true> val(op2); ap_int_base<8 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 8; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 8, false > operator, (signed char op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<8 + _AP_W + _AP_W2, true> val(op1); ap_int_base<8 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, signed char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 8; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (signed char op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 8, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, signed char op2) { ap_int_base<8 + 1, true> val(op2); val[8] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 8, false> operator, (signed char op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<8 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; }