Lines Matching +full:language +full:- +full:cpp

1 /* ----------------------------------------------------------------------
3 * Title: Semihosting.cpp
12 * Target Processor: Cortex-M cores
13 * -------------------------------------------------------------------- */
15 * Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
17 * SPDX-License-Identifier: Apache-2.0
23 * www.apache.org/licenses/LICENSE-2.0
28 * See the License for the specific language governing permissions and
59 this->infile=fopen(path.c_str(), "r"); in Semihosting()
60 this->path=new std::vector<std::string>(); in Semihosting()
61 this->patternRootPath=patternRootPath; in Semihosting()
62 this->outputRootPath=outputRootPath; in Semihosting()
63 this->parameterRootPath=parameterRootPath; in Semihosting()
64 this->patternFilenames=new std::vector<std::string>(); in Semihosting()
65 this->outputNames=new std::vector<std::string>(); in Semihosting()
66 this->parameterNames=new std::vector<struct pathOrGen>(); in Semihosting()
67 this->m_hasParam = false; in Semihosting()
72 …std::vector<struct pathOrGen>::iterator it = this->parameterNames->begin() ; it != this->parameter… in DeleteParams()
74 if (it->kind==1) in DeleteParams()
76 if (it->data) in DeleteParams()
78 free(it->data); in DeleteParams()
79 it->data = NULL; in DeleteParams()
87 fclose(this->infile); in ~Semihosting()
88 delete(this->path); in ~Semihosting()
89 delete(this->patternFilenames); in ~Semihosting()
90 delete(this->outputNames); in ~Semihosting()
91 this->DeleteParams(); in ~Semihosting()
92 delete(this->parameterNames); in ~Semihosting()
105 fscanf(this->infile,"%d\n",&nbPatterns); in ReadPatternList()
107 this->patternFilenames->clear(); in ReadPatternList()
112 fgets(tmp,256,this->infile); in ReadPatternList()
114 if (tmp[strlen(tmp)-1] == '\n') in ReadPatternList()
116 tmp[strlen(tmp)-1]=0; in ReadPatternList()
119 this->patternFilenames->push_back(tmpstr); in ReadPatternList()
138 fscanf(this->infile,"%d\n",&nbValues); in ReadParameterList()
141 this->DeleteParams(); in ReadParameterList()
142 this->parameterNames->clear(); in ReadParameterList()
146 fscanf(this->infile,"%c\n",&paramKind); in ReadParameterList()
151 fgets(tmp,256,this->infile); in ReadParameterList()
153 if (tmp[strlen(tmp)-1] == '\n') in ReadParameterList()
155 tmp[strlen(tmp)-1]=0; in ReadParameterList()
160 tmp += this->parameterRootPath; in ReadParameterList()
161 tmp += this->testDir; in ReadParameterList()
169 gen.nbInputSamples = this->GetFileSize(tmp); in ReadParameterList()
186 fscanf(this->infile,"%d\n",&kind); in ReadParameterList()
188 fscanf(this->infile,"%d\n",&nbInputSamples); in ReadParameterList()
192 fscanf(this->infile,"%d\n",&nbOutputSamples); in ReadParameterList()
193 fscanf(this->infile,"%d\n",&dimensions); in ReadParameterList()
200 fscanf(this->infile,"%d\n",&sample); in ReadParameterList()
210 this->parameterNames->push_back(gen); in ReadParameterList()
225 fscanf(this->infile,"%d\n",&nbOutputs); in ReadOutputList()
227 this->outputNames->clear(); in ReadOutputList()
232 fgets(tmp,256,this->infile); in ReadOutputList()
234 if (tmp[strlen(tmp)-1] == '\n') in ReadOutputList()
236 tmp[strlen(tmp)-1]=0; in ReadOutputList()
239 this->outputNames->push_back(tmpstr); in ReadOutputList()
256 fscanf(this->infile,"%ld\n",&nb); in ReadNbParameters()
263 this->testDir = "."; in recomputeTestDir()
266 for (iter = this->path->begin(); iter != this->path->end(); ++iter) in recomputeTestDir()
270 this->testDir = *iter; in recomputeTestDir()
277 this->testDir += "/" + *iter; in recomputeTestDir()
295 fscanf(this->infile,"%d %ld\n",&kind,&theId); in ReadTestIdentification()
297 fscanf(this->infile,"%c\n",&hasParamID); in ReadTestIdentification()
298 this->m_hasParam=false; in ReadTestIdentification()
301 this->m_hasParam=true; in ReadTestIdentification()
302 fscanf(this->infile,"%ld\n",&paramID); in ReadTestIdentification()
303 this->currentParam=paramID; in ReadTestIdentification()
306 fscanf(this->infile,"%c\n",&hasPath); in ReadTestIdentification()
309 fgets(tmp,256,this->infile); in ReadTestIdentification()
311 if (tmp[strlen(tmp)-1] == '\n') in ReadTestIdentification()
313 tmp[strlen(tmp)-1]=0; in ReadTestIdentification()
318 this->currentKind=kind; in ReadTestIdentification()
319 this->currentId=theId; in ReadTestIdentification()
326 printf("s %ld\n",this->currentId); in ReadTestIdentification()
329 printf("g %ld\n",this->currentId); in ReadTestIdentification()
339 return(this->currentId); in CurrentTestID()
351 this->ReadTestIdentification(); in ReadIdentification()
352 this->path->push_back(currentPath); in ReadIdentification()
353 this->recomputeTestDir(); in ReadIdentification()
367 printf("%ld %ld %ld 0 N\n",this->currentId,error,lineNb); in DispStatus()
372 printf("%ld 0 0 t Y\n",this->currentId); in DispStatus()
374 printf("%ld 0 0 %u Y\n",this->currentId,cycles); in DispStatus()
392 this->path->pop_back(); in EndGroup()
403 tmp += this->patternRootPath; in getPatternPath()
404 tmp += this->testDir; in getPatternPath()
406 tmp += (*this->patternFilenames)[id]; in getPatternPath()
421 return((*this->parameterNames)[id]); in getParameterDesc()
435 tmp += this->outputRootPath; in getOutputPath()
436 tmp += this->testDir; in getOutputPath()
437 sprintf(fmt,"/%s_%ld.txt",(*this->outputNames)[id].c_str(),this->currentId); in getOutputPath()
448 std::string fileName = this->getPatternPath(id); in GetPatternSize()
517 struct pathOrGen gen = this->getParameterDesc(id); in ImportParams()
585 return(this->m_hasParam); in hasParam()
590 return(this->currentParam); in getParamID()
602 std::string fileName = this->getPatternPath(id); in ImportPattern_f64()
641 std::string fileName = this->getPatternPath(id); in ImportPattern_f32()
683 std::string fileName = this->getPatternPath(id); in ImportPattern_f16()
725 std::string fileName = this->getPatternPath(id); in ImportPattern_q63()
763 std::string fileName = this->getPatternPath(id); in ImportPattern_q31()
801 std::string fileName = this->getPatternPath(id); in ImportPattern_q15()
839 std::string fileName = this->getPatternPath(id); in ImportPattern_q7()
877 std::string fileName = this->getPatternPath(id); in ImportPattern_u64()
915 std::string fileName = this->getPatternPath(id); in ImportPattern_u32()
953 std::string fileName = this->getPatternPath(id); in ImportPattern_u16()
991 std::string fileName = this->getPatternPath(id); in ImportPattern_u8()
1022 std::string fileName = this->getOutputPath(id); in DumpPattern_f64()
1041 std::string fileName = this->getOutputPath(id); in DumpPattern_f32()
1061 std::string fileName = this->getOutputPath(id); in DumpPattern_f16()
1081 std::string fileName = this->getOutputPath(id); in DumpPattern_q63()
1098 std::string fileName = this->getOutputPath(id); in DumpPattern_q31()
1114 std::string fileName = this->getOutputPath(id); in DumpPattern_q15()
1130 std::string fileName = this->getOutputPath(id); in DumpPattern_q7()
1147 std::string fileName = this->getOutputPath(id); in DumpPattern_u64()
1164 std::string fileName = this->getOutputPath(id); in DumpPattern_u32()
1180 std::string fileName = this->getOutputPath(id); in DumpPattern_u16()
1196 std::string fileName = this->getOutputPath(id); in DumpPattern_u8()