12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: opencv-onnx.proto
- #include "opencv-onnx.pb.h"
- #include <algorithm>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/extension_set.h>
- #include <google/protobuf/wire_format_lite.h>
- #include <google/protobuf/descriptor.h>
- #include <google/protobuf/generated_message_reflection.h>
- #include <google/protobuf/reflection_ops.h>
- #include <google/protobuf/wire_format.h>
- // @@protoc_insertion_point(includes)
- #include <google/protobuf/port_def.inc>
- PROTOBUF_PRAGMA_INIT_SEG
- namespace opencv_onnx {
- constexpr AttributeProto::AttributeProto(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : floats_()
- , ints_()
- , strings_()
- , tensors_()
- , graphs_()
- , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , s_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , ref_attr_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , t_(nullptr)
- , g_(nullptr)
- , i_(int64_t{0})
- , f_(0)
- , type_(0)
- {}
- struct AttributeProtoDefaultTypeInternal {
- constexpr AttributeProtoDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~AttributeProtoDefaultTypeInternal() {}
- union {
- AttributeProto _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AttributeProtoDefaultTypeInternal _AttributeProto_default_instance_;
- constexpr ValueInfoProto::ValueInfoProto(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , type_(nullptr){}
- struct ValueInfoProtoDefaultTypeInternal {
- constexpr ValueInfoProtoDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~ValueInfoProtoDefaultTypeInternal() {}
- union {
- ValueInfoProto _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ValueInfoProtoDefaultTypeInternal _ValueInfoProto_default_instance_;
- constexpr NodeProto::NodeProto(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : input_()
- , output_()
- , attribute_()
- , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , op_type_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
- struct NodeProtoDefaultTypeInternal {
- constexpr NodeProtoDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~NodeProtoDefaultTypeInternal() {}
- union {
- NodeProto _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeProtoDefaultTypeInternal _NodeProto_default_instance_;
- constexpr ModelProto::ModelProto(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : opset_import_()
- , metadata_props_()
- , producer_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , producer_version_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , graph_(nullptr)
- , ir_version_(int64_t{0})
- , model_version_(int64_t{0}){}
- struct ModelProtoDefaultTypeInternal {
- constexpr ModelProtoDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~ModelProtoDefaultTypeInternal() {}
- union {
- ModelProto _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ModelProtoDefaultTypeInternal _ModelProto_default_instance_;
- constexpr StringStringEntryProto::StringStringEntryProto(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , value_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
- struct StringStringEntryProtoDefaultTypeInternal {
- constexpr StringStringEntryProtoDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~StringStringEntryProtoDefaultTypeInternal() {}
- union {
- StringStringEntryProto _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT StringStringEntryProtoDefaultTypeInternal _StringStringEntryProto_default_instance_;
- constexpr GraphProto::GraphProto(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : node_()
- , initializer_()
- , input_()
- , output_()
- , value_info_()
- , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
- struct GraphProtoDefaultTypeInternal {
- constexpr GraphProtoDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~GraphProtoDefaultTypeInternal() {}
- union {
- GraphProto _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GraphProtoDefaultTypeInternal _GraphProto_default_instance_;
- constexpr TensorProto_Segment::TensorProto_Segment(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : begin_(int64_t{0})
- , end_(int64_t{0}){}
- struct TensorProto_SegmentDefaultTypeInternal {
- constexpr TensorProto_SegmentDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~TensorProto_SegmentDefaultTypeInternal() {}
- union {
- TensorProto_Segment _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorProto_SegmentDefaultTypeInternal _TensorProto_Segment_default_instance_;
- constexpr TensorProto::TensorProto(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : dims_()
- , float_data_()
- , int32_data_()
- , _int32_data_cached_byte_size_(0)
- , string_data_()
- , int64_data_()
- , _int64_data_cached_byte_size_(0)
- , double_data_()
- , uint64_data_()
- , _uint64_data_cached_byte_size_(0)
- , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , raw_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , segment_(nullptr)
- , data_type_(0)
- {}
- struct TensorProtoDefaultTypeInternal {
- constexpr TensorProtoDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~TensorProtoDefaultTypeInternal() {}
- union {
- TensorProto _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorProtoDefaultTypeInternal _TensorProto_default_instance_;
- constexpr TensorShapeProto_Dimension::TensorShapeProto_Dimension(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : denotation_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , _oneof_case_{}{}
- struct TensorShapeProto_DimensionDefaultTypeInternal {
- constexpr TensorShapeProto_DimensionDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~TensorShapeProto_DimensionDefaultTypeInternal() {}
- union {
- TensorShapeProto_Dimension _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProto_DimensionDefaultTypeInternal _TensorShapeProto_Dimension_default_instance_;
- constexpr TensorShapeProto::TensorShapeProto(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : dim_(){}
- struct TensorShapeProtoDefaultTypeInternal {
- constexpr TensorShapeProtoDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~TensorShapeProtoDefaultTypeInternal() {}
- union {
- TensorShapeProto _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_;
- constexpr TypeProto_Tensor::TypeProto_Tensor(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : shape_(nullptr)
- , elem_type_(0)
- {}
- struct TypeProto_TensorDefaultTypeInternal {
- constexpr TypeProto_TensorDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~TypeProto_TensorDefaultTypeInternal() {}
- union {
- TypeProto_Tensor _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_TensorDefaultTypeInternal _TypeProto_Tensor_default_instance_;
- constexpr TypeProto::TypeProto(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : denotation_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , _oneof_case_{}{}
- struct TypeProtoDefaultTypeInternal {
- constexpr TypeProtoDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~TypeProtoDefaultTypeInternal() {}
- union {
- TypeProto _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProtoDefaultTypeInternal _TypeProto_default_instance_;
- constexpr OperatorSetIdProto::OperatorSetIdProto(
- ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
- : domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
- , version_(int64_t{0}){}
- struct OperatorSetIdProtoDefaultTypeInternal {
- constexpr OperatorSetIdProtoDefaultTypeInternal()
- : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
- ~OperatorSetIdProtoDefaultTypeInternal() {}
- union {
- OperatorSetIdProto _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OperatorSetIdProtoDefaultTypeInternal _OperatorSetIdProto_default_instance_;
- } // namespace opencv_onnx
- static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_opencv_2donnx_2eproto[13];
- static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_opencv_2donnx_2eproto[3];
- static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_opencv_2donnx_2eproto = nullptr;
- const uint32_t TableStruct_opencv_2donnx_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, name_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, ref_attr_name_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, doc_string_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, type_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, f_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, i_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, s_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, t_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, g_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, floats_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, ints_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, strings_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, tensors_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, graphs_),
- 0,
- 3,
- 2,
- 8,
- 7,
- 6,
- 1,
- 4,
- 5,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, name_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, type_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, doc_string_),
- 0,
- 2,
- 1,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, input_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, output_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, name_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, op_type_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, domain_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, attribute_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, doc_string_),
- ~0u,
- ~0u,
- 0,
- 1,
- 3,
- ~0u,
- 2,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, ir_version_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, opset_import_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_name_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_version_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, domain_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, model_version_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, doc_string_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, graph_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, metadata_props_),
- 5,
- ~0u,
- 0,
- 1,
- 2,
- 6,
- 3,
- 4,
- ~0u,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, key_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, value_),
- 0,
- 1,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, node_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, name_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, initializer_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, doc_string_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, input_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, output_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, value_info_),
- ~0u,
- 0,
- ~0u,
- 1,
- ~0u,
- ~0u,
- ~0u,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, begin_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, end_),
- 0,
- 1,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, dims_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, data_type_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, segment_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, float_data_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, int32_data_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, string_data_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, int64_data_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, name_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, doc_string_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, raw_data_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, double_data_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, uint64_data_),
- ~0u,
- 4,
- 3,
- ~0u,
- ~0u,
- ~0u,
- ~0u,
- 0,
- 2,
- 1,
- ~0u,
- ~0u,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _internal_metadata_),
- ~0u, // no _extensions_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
- ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, denotation_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, value_),
- ~0u,
- ~0u,
- 0,
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, dim_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, elem_type_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, shape_),
- 1,
- 0,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _internal_metadata_),
- ~0u, // no _extensions_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, denotation_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, value_),
- ~0u,
- 0,
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _has_bits_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, domain_),
- PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, version_),
- 0,
- 1,
- };
- static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- { 0, 20, -1, sizeof(::opencv_onnx::AttributeProto)},
- { 34, 43, -1, sizeof(::opencv_onnx::ValueInfoProto)},
- { 46, 59, -1, sizeof(::opencv_onnx::NodeProto)},
- { 66, 81, -1, sizeof(::opencv_onnx::ModelProto)},
- { 90, 98, -1, sizeof(::opencv_onnx::StringStringEntryProto)},
- { 100, 113, -1, sizeof(::opencv_onnx::GraphProto)},
- { 120, 128, -1, sizeof(::opencv_onnx::TensorProto_Segment)},
- { 130, 148, -1, sizeof(::opencv_onnx::TensorProto)},
- { 160, 170, -1, sizeof(::opencv_onnx::TensorShapeProto_Dimension)},
- { 173, -1, -1, sizeof(::opencv_onnx::TensorShapeProto)},
- { 180, 188, -1, sizeof(::opencv_onnx::TypeProto_Tensor)},
- { 190, 199, -1, sizeof(::opencv_onnx::TypeProto)},
- { 201, 209, -1, sizeof(::opencv_onnx::OperatorSetIdProto)},
- };
- static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_AttributeProto_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_ValueInfoProto_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_NodeProto_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_ModelProto_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_StringStringEntryProto_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_GraphProto_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TensorProto_Segment_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TensorProto_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TensorShapeProto_Dimension_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TensorShapeProto_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TypeProto_Tensor_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TypeProto_default_instance_),
- reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_OperatorSetIdProto_default_instance_),
- };
- const char descriptor_table_protodef_opencv_2donnx_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
- "\n\021opencv-onnx.proto\022\013opencv_onnx\"\203\004\n\016Att"
- "ributeProto\022\014\n\004name\030\001 \001(\t\022\025\n\rref_attr_na"
- "me\030\025 \001(\t\022\022\n\ndoc_string\030\r \001(\t\0227\n\004type\030\024 \001"
- "(\0162).opencv_onnx.AttributeProto.Attribut"
- "eType\022\t\n\001f\030\002 \001(\002\022\t\n\001i\030\003 \001(\003\022\t\n\001s\030\004 \001(\014\022#"
- "\n\001t\030\005 \001(\0132\030.opencv_onnx.TensorProto\022\"\n\001g"
- "\030\006 \001(\0132\027.opencv_onnx.GraphProto\022\016\n\006float"
- "s\030\007 \003(\002\022\014\n\004ints\030\010 \003(\003\022\017\n\007strings\030\t \003(\014\022)"
- "\n\007tensors\030\n \003(\0132\030.opencv_onnx.TensorProt"
- "o\022\'\n\006graphs\030\013 \003(\0132\027.opencv_onnx.GraphPro"
- "to\"\221\001\n\rAttributeType\022\r\n\tUNDEFINED\020\000\022\t\n\005F"
- "LOAT\020\001\022\007\n\003INT\020\002\022\n\n\006STRING\020\003\022\n\n\006TENSOR\020\004\022"
- "\t\n\005GRAPH\020\005\022\n\n\006FLOATS\020\006\022\010\n\004INTS\020\007\022\013\n\007STRI"
- "NGS\020\010\022\013\n\007TENSORS\020\t\022\n\n\006GRAPHS\020\n\"X\n\016ValueI"
- "nfoProto\022\014\n\004name\030\001 \001(\t\022$\n\004type\030\002 \001(\0132\026.o"
- "pencv_onnx.TypeProto\022\022\n\ndoc_string\030\003 \001(\t"
- "\"\235\001\n\tNodeProto\022\r\n\005input\030\001 \003(\t\022\016\n\006output\030"
- "\002 \003(\t\022\014\n\004name\030\003 \001(\t\022\017\n\007op_type\030\004 \001(\t\022\016\n\006"
- "domain\030\007 \001(\t\022.\n\tattribute\030\005 \003(\0132\033.opencv"
- "_onnx.AttributeProto\022\022\n\ndoc_string\030\006 \001(\t"
- "\"\250\002\n\nModelProto\022\022\n\nir_version\030\001 \001(\003\0225\n\014o"
- "pset_import\030\010 \003(\0132\037.opencv_onnx.Operator"
- "SetIdProto\022\025\n\rproducer_name\030\002 \001(\t\022\030\n\020pro"
- "ducer_version\030\003 \001(\t\022\016\n\006domain\030\004 \001(\t\022\025\n\rm"
- "odel_version\030\005 \001(\003\022\022\n\ndoc_string\030\006 \001(\t\022&"
- "\n\005graph\030\007 \001(\0132\027.opencv_onnx.GraphProto\022;"
- "\n\016metadata_props\030\016 \003(\0132#.opencv_onnx.Str"
- "ingStringEntryProto\"4\n\026StringStringEntry"
- "Proto\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\215\002\n\nGr"
- "aphProto\022$\n\004node\030\001 \003(\0132\026.opencv_onnx.Nod"
- "eProto\022\014\n\004name\030\002 \001(\t\022-\n\013initializer\030\005 \003("
- "\0132\030.opencv_onnx.TensorProto\022\022\n\ndoc_strin"
- "g\030\n \001(\t\022*\n\005input\030\013 \003(\0132\033.opencv_onnx.Val"
- "ueInfoProto\022+\n\006output\030\014 \003(\0132\033.opencv_onn"
- "x.ValueInfoProto\022/\n\nvalue_info\030\r \003(\0132\033.o"
- "pencv_onnx.ValueInfoProto\"\275\004\n\013TensorProt"
- "o\022\014\n\004dims\030\001 \003(\003\0224\n\tdata_type\030\002 \001(\0162!.ope"
- "ncv_onnx.TensorProto.DataType\0221\n\007segment"
- "\030\003 \001(\0132 .opencv_onnx.TensorProto.Segment"
- "\022\026\n\nfloat_data\030\004 \003(\002B\002\020\001\022\026\n\nint32_data\030\005"
- " \003(\005B\002\020\001\022\023\n\013string_data\030\006 \003(\014\022\026\n\nint64_d"
- "ata\030\007 \003(\003B\002\020\001\022\014\n\004name\030\010 \001(\t\022\022\n\ndoc_strin"
- "g\030\014 \001(\t\022\020\n\010raw_data\030\t \001(\014\022\027\n\013double_data"
- "\030\n \003(\001B\002\020\001\022\027\n\013uint64_data\030\013 \003(\004B\002\020\001\032%\n\007S"
- "egment\022\r\n\005begin\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\"\314\001\n\010D"
- "ataType\022\r\n\tUNDEFINED\020\000\022\t\n\005FLOAT\020\001\022\t\n\005UIN"
- "T8\020\002\022\010\n\004INT8\020\003\022\n\n\006UINT16\020\004\022\t\n\005INT16\020\005\022\t\n"
- "\005INT32\020\006\022\t\n\005INT64\020\007\022\n\n\006STRING\020\010\022\010\n\004BOOL\020"
- "\t\022\013\n\007FLOAT16\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006UINT32\020\014\022\n"
- "\n\006UINT64\020\r\022\r\n\tCOMPLEX64\020\016\022\016\n\nCOMPLEX128\020"
- "\017\"\234\001\n\020TensorShapeProto\0224\n\003dim\030\001 \003(\0132\'.op"
- "encv_onnx.TensorShapeProto.Dimension\032R\n\t"
- "Dimension\022\023\n\tdim_value\030\001 \001(\003H\000\022\023\n\tdim_pa"
- "ram\030\002 \001(\tH\000\022\022\n\ndenotation\030\003 \001(\tB\007\n\005value"
- "\"\314\001\n\tTypeProto\0224\n\013tensor_type\030\001 \001(\0132\035.op"
- "encv_onnx.TypeProto.TensorH\000\022\022\n\ndenotati"
- "on\030\006 \001(\t\032l\n\006Tensor\0224\n\telem_type\030\001 \001(\0162!."
- "opencv_onnx.TensorProto.DataType\022,\n\005shap"
- "e\030\002 \001(\0132\035.opencv_onnx.TensorShapeProtoB\007"
- "\n\005value\"5\n\022OperatorSetIdProto\022\016\n\006domain\030"
- "\001 \001(\t\022\017\n\007version\030\002 \001(\003*c\n\007Version\022\022\n\016_ST"
- "ART_VERSION\020\000\022\031\n\025IR_VERSION_2017_10_10\020\001"
- "\022\031\n\025IR_VERSION_2017_10_30\020\002\022\016\n\nIR_VERSIO"
- "N\020\003"
- ;
- static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_opencv_2donnx_2eproto_once;
- const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_opencv_2donnx_2eproto = {
- false, false, 2523, descriptor_table_protodef_opencv_2donnx_2eproto, "opencv-onnx.proto",
- &descriptor_table_opencv_2donnx_2eproto_once, nullptr, 0, 13,
- schemas, file_default_instances, TableStruct_opencv_2donnx_2eproto::offsets,
- file_level_metadata_opencv_2donnx_2eproto, file_level_enum_descriptors_opencv_2donnx_2eproto, file_level_service_descriptors_opencv_2donnx_2eproto,
- };
- PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_opencv_2donnx_2eproto_getter() {
- return &descriptor_table_opencv_2donnx_2eproto;
- }
- // Force running AddDescriptors() at dynamic initialization time.
- PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_opencv_2donnx_2eproto(&descriptor_table_opencv_2donnx_2eproto);
- namespace opencv_onnx {
- const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AttributeProto_AttributeType_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto);
- return file_level_enum_descriptors_opencv_2donnx_2eproto[0];
- }
- bool AttributeProto_AttributeType_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- return true;
- default:
- return false;
- }
- }
- #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
- constexpr AttributeProto_AttributeType AttributeProto::UNDEFINED;
- constexpr AttributeProto_AttributeType AttributeProto::FLOAT;
- constexpr AttributeProto_AttributeType AttributeProto::INT;
- constexpr AttributeProto_AttributeType AttributeProto::STRING;
- constexpr AttributeProto_AttributeType AttributeProto::TENSOR;
- constexpr AttributeProto_AttributeType AttributeProto::GRAPH;
- constexpr AttributeProto_AttributeType AttributeProto::FLOATS;
- constexpr AttributeProto_AttributeType AttributeProto::INTS;
- constexpr AttributeProto_AttributeType AttributeProto::STRINGS;
- constexpr AttributeProto_AttributeType AttributeProto::TENSORS;
- constexpr AttributeProto_AttributeType AttributeProto::GRAPHS;
- constexpr AttributeProto_AttributeType AttributeProto::AttributeType_MIN;
- constexpr AttributeProto_AttributeType AttributeProto::AttributeType_MAX;
- constexpr int AttributeProto::AttributeType_ARRAYSIZE;
- #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
- const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TensorProto_DataType_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto);
- return file_level_enum_descriptors_opencv_2donnx_2eproto[1];
- }
- bool TensorProto_DataType_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- return true;
- default:
- return false;
- }
- }
- #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
- constexpr TensorProto_DataType TensorProto::UNDEFINED;
- constexpr TensorProto_DataType TensorProto::FLOAT;
- constexpr TensorProto_DataType TensorProto::UINT8;
- constexpr TensorProto_DataType TensorProto::INT8;
- constexpr TensorProto_DataType TensorProto::UINT16;
- constexpr TensorProto_DataType TensorProto::INT16;
- constexpr TensorProto_DataType TensorProto::INT32;
- constexpr TensorProto_DataType TensorProto::INT64;
- constexpr TensorProto_DataType TensorProto::STRING;
- constexpr TensorProto_DataType TensorProto::BOOL;
- constexpr TensorProto_DataType TensorProto::FLOAT16;
- constexpr TensorProto_DataType TensorProto::DOUBLE;
- constexpr TensorProto_DataType TensorProto::UINT32;
- constexpr TensorProto_DataType TensorProto::UINT64;
- constexpr TensorProto_DataType TensorProto::COMPLEX64;
- constexpr TensorProto_DataType TensorProto::COMPLEX128;
- constexpr TensorProto_DataType TensorProto::DataType_MIN;
- constexpr TensorProto_DataType TensorProto::DataType_MAX;
- constexpr int TensorProto::DataType_ARRAYSIZE;
- #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
- const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Version_descriptor() {
- ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto);
- return file_level_enum_descriptors_opencv_2donnx_2eproto[2];
- }
- bool Version_IsValid(int value) {
- switch (value) {
- case 0:
- case 1:
- case 2:
- case 3:
- return true;
- default:
- return false;
- }
- }
- // ===================================================================
- class AttributeProto::_Internal {
- public:
- using HasBits = decltype(std::declval<AttributeProto>()._has_bits_);
- static void set_has_name(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_ref_attr_name(HasBits* has_bits) {
- (*has_bits)[0] |= 8u;
- }
- static void set_has_doc_string(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- static void set_has_type(HasBits* has_bits) {
- (*has_bits)[0] |= 256u;
- }
- static void set_has_f(HasBits* has_bits) {
- (*has_bits)[0] |= 128u;
- }
- static void set_has_i(HasBits* has_bits) {
- (*has_bits)[0] |= 64u;
- }
- static void set_has_s(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- static const ::opencv_onnx::TensorProto& t(const AttributeProto* msg);
- static void set_has_t(HasBits* has_bits) {
- (*has_bits)[0] |= 16u;
- }
- static const ::opencv_onnx::GraphProto& g(const AttributeProto* msg);
- static void set_has_g(HasBits* has_bits) {
- (*has_bits)[0] |= 32u;
- }
- };
- const ::opencv_onnx::TensorProto&
- AttributeProto::_Internal::t(const AttributeProto* msg) {
- return *msg->t_;
- }
- const ::opencv_onnx::GraphProto&
- AttributeProto::_Internal::g(const AttributeProto* msg) {
- return *msg->g_;
- }
- AttributeProto::AttributeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- floats_(arena),
- ints_(arena),
- strings_(arena),
- tensors_(arena),
- graphs_(arena) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.AttributeProto)
- }
- AttributeProto::AttributeProto(const AttributeProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- floats_(from.floats_),
- ints_(from.ints_),
- strings_(from.strings_),
- tensors_(from.tensors_),
- graphs_(from.graphs_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_name()) {
- name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
- GetArenaForAllocation());
- }
- s_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- s_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_s()) {
- s_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_s(),
- GetArenaForAllocation());
- }
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_doc_string()) {
- doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
- GetArenaForAllocation());
- }
- ref_attr_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- ref_attr_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_ref_attr_name()) {
- ref_attr_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_ref_attr_name(),
- GetArenaForAllocation());
- }
- if (from._internal_has_t()) {
- t_ = new ::opencv_onnx::TensorProto(*from.t_);
- } else {
- t_ = nullptr;
- }
- if (from._internal_has_g()) {
- g_ = new ::opencv_onnx::GraphProto(*from.g_);
- } else {
- g_ = nullptr;
- }
- ::memcpy(&i_, &from.i_,
- static_cast<size_t>(reinterpret_cast<char*>(&type_) -
- reinterpret_cast<char*>(&i_)) + sizeof(type_));
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.AttributeProto)
- }
- inline void AttributeProto::SharedCtor() {
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- s_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- s_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- ref_attr_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- ref_attr_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&t_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&type_) -
- reinterpret_cast<char*>(&t_)) + sizeof(type_));
- }
- AttributeProto::~AttributeProto() {
- // @@protoc_insertion_point(destructor:opencv_onnx.AttributeProto)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void AttributeProto::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- s_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- ref_attr_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete t_;
- if (this != internal_default_instance()) delete g_;
- }
- void AttributeProto::ArenaDtor(void* object) {
- AttributeProto* _this = reinterpret_cast< AttributeProto* >(object);
- (void)_this;
- }
- void AttributeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void AttributeProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void AttributeProto::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.AttributeProto)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- floats_.Clear();
- ints_.Clear();
- strings_.Clear();
- tensors_.Clear();
- graphs_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000003fu) {
- if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000002u) {
- s_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000004u) {
- doc_string_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000008u) {
- ref_attr_name_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000010u) {
- GOOGLE_DCHECK(t_ != nullptr);
- t_->Clear();
- }
- if (cached_has_bits & 0x00000020u) {
- GOOGLE_DCHECK(g_ != nullptr);
- g_->Clear();
- }
- }
- if (cached_has_bits & 0x000000c0u) {
- ::memset(&i_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&f_) -
- reinterpret_cast<char*>(&i_)) + sizeof(f_));
- }
- type_ = 0;
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* AttributeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // optional string name = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
- auto str = _internal_mutable_name();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.AttributeProto.name");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional float f = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
- _Internal::set_has_f(&has_bits);
- f_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
- ptr += sizeof(float);
- } else
- goto handle_unusual;
- continue;
- // optional int64 i = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
- _Internal::set_has_i(&has_bits);
- i_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional bytes s = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
- auto str = _internal_mutable_s();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional .opencv_onnx.TensorProto t = 5;
- case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
- ptr = ctx->ParseMessage(_internal_mutable_t(), ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional .opencv_onnx.GraphProto g = 6;
- case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
- ptr = ctx->ParseMessage(_internal_mutable_g(), ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // repeated float floats = 7;
- case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
- ptr -= 1;
- do {
- ptr += 1;
- _internal_add_floats(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
- ptr += sizeof(float);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<61>(ptr));
- } else if (static_cast<uint8_t>(tag) == 58) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_floats(), ptr, ctx);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // repeated int64 ints = 8;
- case 8:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
- ptr -= 1;
- do {
- ptr += 1;
- _internal_add_ints(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<64>(ptr));
- } else if (static_cast<uint8_t>(tag) == 66) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_ints(), ptr, ctx);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // repeated bytes strings = 9;
- case 9:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
- ptr -= 1;
- do {
- ptr += 1;
- auto str = _internal_add_strings();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
- } else
- goto handle_unusual;
- continue;
- // repeated .opencv_onnx.TensorProto tensors = 10;
- case 10:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_tensors(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr));
- } else
- goto handle_unusual;
- continue;
- // repeated .opencv_onnx.GraphProto graphs = 11;
- case 11:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_graphs(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
- } else
- goto handle_unusual;
- continue;
- // optional string doc_string = 13;
- case 13:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
- auto str = _internal_mutable_doc_string();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.AttributeProto.doc_string");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional .opencv_onnx.AttributeProto.AttributeType type = 20;
- case 20:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
- uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::AttributeProto_AttributeType_IsValid(val))) {
- _internal_set_type(static_cast<::opencv_onnx::AttributeProto_AttributeType>(val));
- } else {
- ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(20, val, mutable_unknown_fields());
- }
- } else
- goto handle_unusual;
- continue;
- // optional string ref_attr_name = 21;
- case 21:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
- auto str = _internal_mutable_ref_attr_name();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.AttributeProto.ref_attr_name");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* AttributeProto::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.AttributeProto)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.AttributeProto.name");
- target = stream->WriteStringMaybeAliased(
- 1, this->_internal_name(), target);
- }
- // optional float f = 2;
- if (cached_has_bits & 0x00000080u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_f(), target);
- }
- // optional int64 i = 3;
- if (cached_has_bits & 0x00000040u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_i(), target);
- }
- // optional bytes s = 4;
- if (cached_has_bits & 0x00000002u) {
- target = stream->WriteBytesMaybeAliased(
- 4, this->_internal_s(), target);
- }
- // optional .opencv_onnx.TensorProto t = 5;
- if (cached_has_bits & 0x00000010u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(
- 5, _Internal::t(this), target, stream);
- }
- // optional .opencv_onnx.GraphProto g = 6;
- if (cached_has_bits & 0x00000020u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(
- 6, _Internal::g(this), target, stream);
- }
- // repeated float floats = 7;
- for (int i = 0, n = this->_internal_floats_size(); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_floats(i), target);
- }
- // repeated int64 ints = 8;
- for (int i = 0, n = this->_internal_ints_size(); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->_internal_ints(i), target);
- }
- // repeated bytes strings = 9;
- for (int i = 0, n = this->_internal_strings_size(); i < n; i++) {
- const auto& s = this->_internal_strings(i);
- target = stream->WriteBytes(9, s, target);
- }
- // repeated .opencv_onnx.TensorProto tensors = 10;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_tensors_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(10, this->_internal_tensors(i), target, stream);
- }
- // repeated .opencv_onnx.GraphProto graphs = 11;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_graphs_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(11, this->_internal_graphs(i), target, stream);
- }
- // optional string doc_string = 13;
- if (cached_has_bits & 0x00000004u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.AttributeProto.doc_string");
- target = stream->WriteStringMaybeAliased(
- 13, this->_internal_doc_string(), target);
- }
- // optional .opencv_onnx.AttributeProto.AttributeType type = 20;
- if (cached_has_bits & 0x00000100u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
- 20, this->_internal_type(), target);
- }
- // optional string ref_attr_name = 21;
- if (cached_has_bits & 0x00000008u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_ref_attr_name().data(), static_cast<int>(this->_internal_ref_attr_name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.AttributeProto.ref_attr_name");
- target = stream->WriteStringMaybeAliased(
- 21, this->_internal_ref_attr_name(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.AttributeProto)
- return target;
- }
- size_t AttributeProto::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.AttributeProto)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated float floats = 7;
- {
- unsigned int count = static_cast<unsigned int>(this->_internal_floats_size());
- size_t data_size = 4UL * count;
- total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_floats_size());
- total_size += data_size;
- }
- // repeated int64 ints = 8;
- {
- size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- Int64Size(this->ints_);
- total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_ints_size());
- total_size += data_size;
- }
- // repeated bytes strings = 9;
- total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(strings_.size());
- for (int i = 0, n = strings_.size(); i < n; i++) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
- strings_.Get(i));
- }
- // repeated .opencv_onnx.TensorProto tensors = 10;
- total_size += 1UL * this->_internal_tensors_size();
- for (const auto& msg : this->tensors_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- // repeated .opencv_onnx.GraphProto graphs = 11;
- total_size += 1UL * this->_internal_graphs_size();
- for (const auto& msg : this->graphs_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x000000ffu) {
- // optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_name());
- }
- // optional bytes s = 4;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
- this->_internal_s());
- }
- // optional string doc_string = 13;
- if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_doc_string());
- }
- // optional string ref_attr_name = 21;
- if (cached_has_bits & 0x00000008u) {
- total_size += 2 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_ref_attr_name());
- }
- // optional .opencv_onnx.TensorProto t = 5;
- if (cached_has_bits & 0x00000010u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *t_);
- }
- // optional .opencv_onnx.GraphProto g = 6;
- if (cached_has_bits & 0x00000020u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *g_);
- }
- // optional int64 i = 3;
- if (cached_has_bits & 0x00000040u) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_i());
- }
- // optional float f = 2;
- if (cached_has_bits & 0x00000080u) {
- total_size += 1 + 4;
- }
- }
- // optional .opencv_onnx.AttributeProto.AttributeType type = 20;
- if (cached_has_bits & 0x00000100u) {
- total_size += 2 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type());
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AttributeProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- AttributeProto::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AttributeProto::GetClassData() const { return &_class_data_; }
- void AttributeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<AttributeProto *>(to)->MergeFrom(
- static_cast<const AttributeProto &>(from));
- }
- void AttributeProto::MergeFrom(const AttributeProto& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.AttributeProto)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- floats_.MergeFrom(from.floats_);
- ints_.MergeFrom(from.ints_);
- strings_.MergeFrom(from.strings_);
- tensors_.MergeFrom(from.tensors_);
- graphs_.MergeFrom(from.graphs_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x000000ffu) {
- if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
- }
- if (cached_has_bits & 0x00000002u) {
- _internal_set_s(from._internal_s());
- }
- if (cached_has_bits & 0x00000004u) {
- _internal_set_doc_string(from._internal_doc_string());
- }
- if (cached_has_bits & 0x00000008u) {
- _internal_set_ref_attr_name(from._internal_ref_attr_name());
- }
- if (cached_has_bits & 0x00000010u) {
- _internal_mutable_t()->::opencv_onnx::TensorProto::MergeFrom(from._internal_t());
- }
- if (cached_has_bits & 0x00000020u) {
- _internal_mutable_g()->::opencv_onnx::GraphProto::MergeFrom(from._internal_g());
- }
- if (cached_has_bits & 0x00000040u) {
- i_ = from.i_;
- }
- if (cached_has_bits & 0x00000080u) {
- f_ = from.f_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- if (cached_has_bits & 0x00000100u) {
- _internal_set_type(from._internal_type());
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void AttributeProto::CopyFrom(const AttributeProto& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.AttributeProto)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool AttributeProto::IsInitialized() const {
- return true;
- }
- void AttributeProto::InternalSwap(AttributeProto* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- floats_.InternalSwap(&other->floats_);
- ints_.InternalSwap(&other->ints_);
- strings_.InternalSwap(&other->strings_);
- tensors_.InternalSwap(&other->tensors_);
- graphs_.InternalSwap(&other->graphs_);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &name_, lhs_arena,
- &other->name_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &s_, lhs_arena,
- &other->s_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &doc_string_, lhs_arena,
- &other->doc_string_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &ref_attr_name_, lhs_arena,
- &other->ref_attr_name_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(AttributeProto, type_)
- + sizeof(AttributeProto::type_)
- - PROTOBUF_FIELD_OFFSET(AttributeProto, t_)>(
- reinterpret_cast<char*>(&t_),
- reinterpret_cast<char*>(&other->t_));
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata AttributeProto::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[0]);
- }
- // ===================================================================
- class ValueInfoProto::_Internal {
- public:
- using HasBits = decltype(std::declval<ValueInfoProto>()._has_bits_);
- static void set_has_name(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static const ::opencv_onnx::TypeProto& type(const ValueInfoProto* msg);
- static void set_has_type(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- static void set_has_doc_string(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- };
- const ::opencv_onnx::TypeProto&
- ValueInfoProto::_Internal::type(const ValueInfoProto* msg) {
- return *msg->type_;
- }
- ValueInfoProto::ValueInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.ValueInfoProto)
- }
- ValueInfoProto::ValueInfoProto(const ValueInfoProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_name()) {
- name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
- GetArenaForAllocation());
- }
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_doc_string()) {
- doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
- GetArenaForAllocation());
- }
- if (from._internal_has_type()) {
- type_ = new ::opencv_onnx::TypeProto(*from.type_);
- } else {
- type_ = nullptr;
- }
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.ValueInfoProto)
- }
- inline void ValueInfoProto::SharedCtor() {
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- type_ = nullptr;
- }
- ValueInfoProto::~ValueInfoProto() {
- // @@protoc_insertion_point(destructor:opencv_onnx.ValueInfoProto)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void ValueInfoProto::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete type_;
- }
- void ValueInfoProto::ArenaDtor(void* object) {
- ValueInfoProto* _this = reinterpret_cast< ValueInfoProto* >(object);
- (void)_this;
- }
- void ValueInfoProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void ValueInfoProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void ValueInfoProto::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.ValueInfoProto)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000007u) {
- if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000002u) {
- doc_string_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000004u) {
- GOOGLE_DCHECK(type_ != nullptr);
- type_->Clear();
- }
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* ValueInfoProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // optional string name = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
- auto str = _internal_mutable_name();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ValueInfoProto.name");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional .opencv_onnx.TypeProto type = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
- ptr = ctx->ParseMessage(_internal_mutable_type(), ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string doc_string = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
- auto str = _internal_mutable_doc_string();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ValueInfoProto.doc_string");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* ValueInfoProto::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ValueInfoProto)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.ValueInfoProto.name");
- target = stream->WriteStringMaybeAliased(
- 1, this->_internal_name(), target);
- }
- // optional .opencv_onnx.TypeProto type = 2;
- if (cached_has_bits & 0x00000004u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(
- 2, _Internal::type(this), target, stream);
- }
- // optional string doc_string = 3;
- if (cached_has_bits & 0x00000002u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.ValueInfoProto.doc_string");
- target = stream->WriteStringMaybeAliased(
- 3, this->_internal_doc_string(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ValueInfoProto)
- return target;
- }
- size_t ValueInfoProto::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ValueInfoProto)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000007u) {
- // optional string name = 1;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_name());
- }
- // optional string doc_string = 3;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_doc_string());
- }
- // optional .opencv_onnx.TypeProto type = 2;
- if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *type_);
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ValueInfoProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- ValueInfoProto::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ValueInfoProto::GetClassData() const { return &_class_data_; }
- void ValueInfoProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<ValueInfoProto *>(to)->MergeFrom(
- static_cast<const ValueInfoProto &>(from));
- }
- void ValueInfoProto::MergeFrom(const ValueInfoProto& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ValueInfoProto)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x00000007u) {
- if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
- }
- if (cached_has_bits & 0x00000002u) {
- _internal_set_doc_string(from._internal_doc_string());
- }
- if (cached_has_bits & 0x00000004u) {
- _internal_mutable_type()->::opencv_onnx::TypeProto::MergeFrom(from._internal_type());
- }
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void ValueInfoProto::CopyFrom(const ValueInfoProto& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ValueInfoProto)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool ValueInfoProto::IsInitialized() const {
- return true;
- }
- void ValueInfoProto::InternalSwap(ValueInfoProto* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &name_, lhs_arena,
- &other->name_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &doc_string_, lhs_arena,
- &other->doc_string_, rhs_arena
- );
- swap(type_, other->type_);
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata ValueInfoProto::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[1]);
- }
- // ===================================================================
- class NodeProto::_Internal {
- public:
- using HasBits = decltype(std::declval<NodeProto>()._has_bits_);
- static void set_has_name(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_op_type(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- static void set_has_domain(HasBits* has_bits) {
- (*has_bits)[0] |= 8u;
- }
- static void set_has_doc_string(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- };
- NodeProto::NodeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- input_(arena),
- output_(arena),
- attribute_(arena) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.NodeProto)
- }
- NodeProto::NodeProto(const NodeProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- input_(from.input_),
- output_(from.output_),
- attribute_(from.attribute_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_name()) {
- name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
- GetArenaForAllocation());
- }
- op_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- op_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_op_type()) {
- op_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_op_type(),
- GetArenaForAllocation());
- }
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_doc_string()) {
- doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
- GetArenaForAllocation());
- }
- domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_domain()) {
- domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(),
- GetArenaForAllocation());
- }
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.NodeProto)
- }
- inline void NodeProto::SharedCtor() {
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- op_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- op_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- }
- NodeProto::~NodeProto() {
- // @@protoc_insertion_point(destructor:opencv_onnx.NodeProto)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void NodeProto::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- op_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- }
- void NodeProto::ArenaDtor(void* object) {
- NodeProto* _this = reinterpret_cast< NodeProto* >(object);
- (void)_this;
- }
- void NodeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void NodeProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void NodeProto::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.NodeProto)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- input_.Clear();
- output_.Clear();
- attribute_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000002u) {
- op_type_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000004u) {
- doc_string_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000008u) {
- domain_.ClearNonDefaultToEmpty();
- }
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // repeated string input = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
- ptr -= 1;
- do {
- ptr += 1;
- auto str = _internal_add_input();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.input");
- #endif // !NDEBUG
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
- } else
- goto handle_unusual;
- continue;
- // repeated string output = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
- ptr -= 1;
- do {
- ptr += 1;
- auto str = _internal_add_output();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.output");
- #endif // !NDEBUG
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
- } else
- goto handle_unusual;
- continue;
- // optional string name = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
- auto str = _internal_mutable_name();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.name");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string op_type = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
- auto str = _internal_mutable_op_type();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.op_type");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // repeated .opencv_onnx.AttributeProto attribute = 5;
- case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_attribute(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
- } else
- goto handle_unusual;
- continue;
- // optional string doc_string = 6;
- case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
- auto str = _internal_mutable_doc_string();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.doc_string");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string domain = 7;
- case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
- auto str = _internal_mutable_domain();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.domain");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* NodeProto::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.NodeProto)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated string input = 1;
- for (int i = 0, n = this->_internal_input_size(); i < n; i++) {
- const auto& s = this->_internal_input(i);
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- s.data(), static_cast<int>(s.length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.NodeProto.input");
- target = stream->WriteString(1, s, target);
- }
- // repeated string output = 2;
- for (int i = 0, n = this->_internal_output_size(); i < n; i++) {
- const auto& s = this->_internal_output(i);
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- s.data(), static_cast<int>(s.length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.NodeProto.output");
- target = stream->WriteString(2, s, target);
- }
- cached_has_bits = _has_bits_[0];
- // optional string name = 3;
- if (cached_has_bits & 0x00000001u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.NodeProto.name");
- target = stream->WriteStringMaybeAliased(
- 3, this->_internal_name(), target);
- }
- // optional string op_type = 4;
- if (cached_has_bits & 0x00000002u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_op_type().data(), static_cast<int>(this->_internal_op_type().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.NodeProto.op_type");
- target = stream->WriteStringMaybeAliased(
- 4, this->_internal_op_type(), target);
- }
- // repeated .opencv_onnx.AttributeProto attribute = 5;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_attribute_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(5, this->_internal_attribute(i), target, stream);
- }
- // optional string doc_string = 6;
- if (cached_has_bits & 0x00000004u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.NodeProto.doc_string");
- target = stream->WriteStringMaybeAliased(
- 6, this->_internal_doc_string(), target);
- }
- // optional string domain = 7;
- if (cached_has_bits & 0x00000008u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_domain().data(), static_cast<int>(this->_internal_domain().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.NodeProto.domain");
- target = stream->WriteStringMaybeAliased(
- 7, this->_internal_domain(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.NodeProto)
- return target;
- }
- size_t NodeProto::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.NodeProto)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated string input = 1;
- total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(input_.size());
- for (int i = 0, n = input_.size(); i < n; i++) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- input_.Get(i));
- }
- // repeated string output = 2;
- total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(output_.size());
- for (int i = 0, n = output_.size(); i < n; i++) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- output_.Get(i));
- }
- // repeated .opencv_onnx.AttributeProto attribute = 5;
- total_size += 1UL * this->_internal_attribute_size();
- for (const auto& msg : this->attribute_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- // optional string name = 3;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_name());
- }
- // optional string op_type = 4;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_op_type());
- }
- // optional string doc_string = 6;
- if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_doc_string());
- }
- // optional string domain = 7;
- if (cached_has_bits & 0x00000008u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_domain());
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NodeProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- NodeProto::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NodeProto::GetClassData() const { return &_class_data_; }
- void NodeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<NodeProto *>(to)->MergeFrom(
- static_cast<const NodeProto &>(from));
- }
- void NodeProto::MergeFrom(const NodeProto& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.NodeProto)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- input_.MergeFrom(from.input_);
- output_.MergeFrom(from.output_);
- attribute_.MergeFrom(from.attribute_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
- }
- if (cached_has_bits & 0x00000002u) {
- _internal_set_op_type(from._internal_op_type());
- }
- if (cached_has_bits & 0x00000004u) {
- _internal_set_doc_string(from._internal_doc_string());
- }
- if (cached_has_bits & 0x00000008u) {
- _internal_set_domain(from._internal_domain());
- }
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void NodeProto::CopyFrom(const NodeProto& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.NodeProto)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool NodeProto::IsInitialized() const {
- return true;
- }
- void NodeProto::InternalSwap(NodeProto* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- input_.InternalSwap(&other->input_);
- output_.InternalSwap(&other->output_);
- attribute_.InternalSwap(&other->attribute_);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &name_, lhs_arena,
- &other->name_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &op_type_, lhs_arena,
- &other->op_type_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &doc_string_, lhs_arena,
- &other->doc_string_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &domain_, lhs_arena,
- &other->domain_, rhs_arena
- );
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata NodeProto::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[2]);
- }
- // ===================================================================
- class ModelProto::_Internal {
- public:
- using HasBits = decltype(std::declval<ModelProto>()._has_bits_);
- static void set_has_ir_version(HasBits* has_bits) {
- (*has_bits)[0] |= 32u;
- }
- static void set_has_producer_name(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_producer_version(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- static void set_has_domain(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- static void set_has_model_version(HasBits* has_bits) {
- (*has_bits)[0] |= 64u;
- }
- static void set_has_doc_string(HasBits* has_bits) {
- (*has_bits)[0] |= 8u;
- }
- static const ::opencv_onnx::GraphProto& graph(const ModelProto* msg);
- static void set_has_graph(HasBits* has_bits) {
- (*has_bits)[0] |= 16u;
- }
- };
- const ::opencv_onnx::GraphProto&
- ModelProto::_Internal::graph(const ModelProto* msg) {
- return *msg->graph_;
- }
- ModelProto::ModelProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- opset_import_(arena),
- metadata_props_(arena) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.ModelProto)
- }
- ModelProto::ModelProto(const ModelProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- opset_import_(from.opset_import_),
- metadata_props_(from.metadata_props_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- producer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- producer_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_producer_name()) {
- producer_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_producer_name(),
- GetArenaForAllocation());
- }
- producer_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- producer_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_producer_version()) {
- producer_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_producer_version(),
- GetArenaForAllocation());
- }
- domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_domain()) {
- domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(),
- GetArenaForAllocation());
- }
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_doc_string()) {
- doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
- GetArenaForAllocation());
- }
- if (from._internal_has_graph()) {
- graph_ = new ::opencv_onnx::GraphProto(*from.graph_);
- } else {
- graph_ = nullptr;
- }
- ::memcpy(&ir_version_, &from.ir_version_,
- static_cast<size_t>(reinterpret_cast<char*>(&model_version_) -
- reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.ModelProto)
- }
- inline void ModelProto::SharedCtor() {
- producer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- producer_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- producer_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- producer_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&graph_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&model_version_) -
- reinterpret_cast<char*>(&graph_)) + sizeof(model_version_));
- }
- ModelProto::~ModelProto() {
- // @@protoc_insertion_point(destructor:opencv_onnx.ModelProto)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void ModelProto::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- producer_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- producer_version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete graph_;
- }
- void ModelProto::ArenaDtor(void* object) {
- ModelProto* _this = reinterpret_cast< ModelProto* >(object);
- (void)_this;
- }
- void ModelProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void ModelProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void ModelProto::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.ModelProto)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- opset_import_.Clear();
- metadata_props_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000001fu) {
- if (cached_has_bits & 0x00000001u) {
- producer_name_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000002u) {
- producer_version_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000004u) {
- domain_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000008u) {
- doc_string_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000010u) {
- GOOGLE_DCHECK(graph_ != nullptr);
- graph_->Clear();
- }
- }
- if (cached_has_bits & 0x00000060u) {
- ::memset(&ir_version_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&model_version_) -
- reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* ModelProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // optional int64 ir_version = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- _Internal::set_has_ir_version(&has_bits);
- ir_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string producer_name = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
- auto str = _internal_mutable_producer_name();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.producer_name");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string producer_version = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
- auto str = _internal_mutable_producer_version();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.producer_version");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string domain = 4;
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
- auto str = _internal_mutable_domain();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.domain");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional int64 model_version = 5;
- case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
- _Internal::set_has_model_version(&has_bits);
- model_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string doc_string = 6;
- case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
- auto str = _internal_mutable_doc_string();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.doc_string");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional .opencv_onnx.GraphProto graph = 7;
- case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
- ptr = ctx->ParseMessage(_internal_mutable_graph(), ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
- case 8:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_opset_import(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
- } else
- goto handle_unusual;
- continue;
- // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
- case 14:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_metadata_props(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* ModelProto::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ModelProto)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int64 ir_version = 1;
- if (cached_has_bits & 0x00000020u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_ir_version(), target);
- }
- // optional string producer_name = 2;
- if (cached_has_bits & 0x00000001u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_producer_name().data(), static_cast<int>(this->_internal_producer_name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.ModelProto.producer_name");
- target = stream->WriteStringMaybeAliased(
- 2, this->_internal_producer_name(), target);
- }
- // optional string producer_version = 3;
- if (cached_has_bits & 0x00000002u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_producer_version().data(), static_cast<int>(this->_internal_producer_version().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.ModelProto.producer_version");
- target = stream->WriteStringMaybeAliased(
- 3, this->_internal_producer_version(), target);
- }
- // optional string domain = 4;
- if (cached_has_bits & 0x00000004u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_domain().data(), static_cast<int>(this->_internal_domain().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.ModelProto.domain");
- target = stream->WriteStringMaybeAliased(
- 4, this->_internal_domain(), target);
- }
- // optional int64 model_version = 5;
- if (cached_has_bits & 0x00000040u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_model_version(), target);
- }
- // optional string doc_string = 6;
- if (cached_has_bits & 0x00000008u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.ModelProto.doc_string");
- target = stream->WriteStringMaybeAliased(
- 6, this->_internal_doc_string(), target);
- }
- // optional .opencv_onnx.GraphProto graph = 7;
- if (cached_has_bits & 0x00000010u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(
- 7, _Internal::graph(this), target, stream);
- }
- // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_opset_import_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(8, this->_internal_opset_import(i), target, stream);
- }
- // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_metadata_props_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(14, this->_internal_metadata_props(i), target, stream);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ModelProto)
- return target;
- }
- size_t ModelProto::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ModelProto)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
- total_size += 1UL * this->_internal_opset_import_size();
- for (const auto& msg : this->opset_import_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
- total_size += 1UL * this->_internal_metadata_props_size();
- for (const auto& msg : this->metadata_props_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000007fu) {
- // optional string producer_name = 2;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_producer_name());
- }
- // optional string producer_version = 3;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_producer_version());
- }
- // optional string domain = 4;
- if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_domain());
- }
- // optional string doc_string = 6;
- if (cached_has_bits & 0x00000008u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_doc_string());
- }
- // optional .opencv_onnx.GraphProto graph = 7;
- if (cached_has_bits & 0x00000010u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *graph_);
- }
- // optional int64 ir_version = 1;
- if (cached_has_bits & 0x00000020u) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_ir_version());
- }
- // optional int64 model_version = 5;
- if (cached_has_bits & 0x00000040u) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_model_version());
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ModelProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- ModelProto::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ModelProto::GetClassData() const { return &_class_data_; }
- void ModelProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<ModelProto *>(to)->MergeFrom(
- static_cast<const ModelProto &>(from));
- }
- void ModelProto::MergeFrom(const ModelProto& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ModelProto)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- opset_import_.MergeFrom(from.opset_import_);
- metadata_props_.MergeFrom(from.metadata_props_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x0000007fu) {
- if (cached_has_bits & 0x00000001u) {
- _internal_set_producer_name(from._internal_producer_name());
- }
- if (cached_has_bits & 0x00000002u) {
- _internal_set_producer_version(from._internal_producer_version());
- }
- if (cached_has_bits & 0x00000004u) {
- _internal_set_domain(from._internal_domain());
- }
- if (cached_has_bits & 0x00000008u) {
- _internal_set_doc_string(from._internal_doc_string());
- }
- if (cached_has_bits & 0x00000010u) {
- _internal_mutable_graph()->::opencv_onnx::GraphProto::MergeFrom(from._internal_graph());
- }
- if (cached_has_bits & 0x00000020u) {
- ir_version_ = from.ir_version_;
- }
- if (cached_has_bits & 0x00000040u) {
- model_version_ = from.model_version_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void ModelProto::CopyFrom(const ModelProto& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ModelProto)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool ModelProto::IsInitialized() const {
- return true;
- }
- void ModelProto::InternalSwap(ModelProto* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- opset_import_.InternalSwap(&other->opset_import_);
- metadata_props_.InternalSwap(&other->metadata_props_);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &producer_name_, lhs_arena,
- &other->producer_name_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &producer_version_, lhs_arena,
- &other->producer_version_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &domain_, lhs_arena,
- &other->domain_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &doc_string_, lhs_arena,
- &other->doc_string_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(ModelProto, model_version_)
- + sizeof(ModelProto::model_version_)
- - PROTOBUF_FIELD_OFFSET(ModelProto, graph_)>(
- reinterpret_cast<char*>(&graph_),
- reinterpret_cast<char*>(&other->graph_));
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata ModelProto::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[3]);
- }
- // ===================================================================
- class StringStringEntryProto::_Internal {
- public:
- using HasBits = decltype(std::declval<StringStringEntryProto>()._has_bits_);
- static void set_has_key(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_value(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- };
- StringStringEntryProto::StringStringEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.StringStringEntryProto)
- }
- StringStringEntryProto::StringStringEntryProto(const StringStringEntryProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_key()) {
- key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key(),
- GetArenaForAllocation());
- }
- value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_value()) {
- value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_value(),
- GetArenaForAllocation());
- }
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.StringStringEntryProto)
- }
- inline void StringStringEntryProto::SharedCtor() {
- key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- }
- StringStringEntryProto::~StringStringEntryProto() {
- // @@protoc_insertion_point(destructor:opencv_onnx.StringStringEntryProto)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void StringStringEntryProto::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- }
- void StringStringEntryProto::ArenaDtor(void* object) {
- StringStringEntryProto* _this = reinterpret_cast< StringStringEntryProto* >(object);
- (void)_this;
- }
- void StringStringEntryProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void StringStringEntryProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void StringStringEntryProto::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.StringStringEntryProto)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- key_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000002u) {
- value_.ClearNonDefaultToEmpty();
- }
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* StringStringEntryProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // optional string key = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
- auto str = _internal_mutable_key();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.StringStringEntryProto.key");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string value = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
- auto str = _internal_mutable_value();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.StringStringEntryProto.value");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* StringStringEntryProto::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.StringStringEntryProto)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional string key = 1;
- if (cached_has_bits & 0x00000001u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_key().data(), static_cast<int>(this->_internal_key().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.StringStringEntryProto.key");
- target = stream->WriteStringMaybeAliased(
- 1, this->_internal_key(), target);
- }
- // optional string value = 2;
- if (cached_has_bits & 0x00000002u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_value().data(), static_cast<int>(this->_internal_value().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.StringStringEntryProto.value");
- target = stream->WriteStringMaybeAliased(
- 2, this->_internal_value(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.StringStringEntryProto)
- return target;
- }
- size_t StringStringEntryProto::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.StringStringEntryProto)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- // optional string key = 1;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_key());
- }
- // optional string value = 2;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_value());
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StringStringEntryProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- StringStringEntryProto::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StringStringEntryProto::GetClassData() const { return &_class_data_; }
- void StringStringEntryProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<StringStringEntryProto *>(to)->MergeFrom(
- static_cast<const StringStringEntryProto &>(from));
- }
- void StringStringEntryProto::MergeFrom(const StringStringEntryProto& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.StringStringEntryProto)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- _internal_set_key(from._internal_key());
- }
- if (cached_has_bits & 0x00000002u) {
- _internal_set_value(from._internal_value());
- }
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void StringStringEntryProto::CopyFrom(const StringStringEntryProto& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.StringStringEntryProto)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool StringStringEntryProto::IsInitialized() const {
- return true;
- }
- void StringStringEntryProto::InternalSwap(StringStringEntryProto* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &key_, lhs_arena,
- &other->key_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &value_, lhs_arena,
- &other->value_, rhs_arena
- );
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata StringStringEntryProto::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[4]);
- }
- // ===================================================================
- class GraphProto::_Internal {
- public:
- using HasBits = decltype(std::declval<GraphProto>()._has_bits_);
- static void set_has_name(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_doc_string(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- };
- GraphProto::GraphProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- node_(arena),
- initializer_(arena),
- input_(arena),
- output_(arena),
- value_info_(arena) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.GraphProto)
- }
- GraphProto::GraphProto(const GraphProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- node_(from.node_),
- initializer_(from.initializer_),
- input_(from.input_),
- output_(from.output_),
- value_info_(from.value_info_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_name()) {
- name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
- GetArenaForAllocation());
- }
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_doc_string()) {
- doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
- GetArenaForAllocation());
- }
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.GraphProto)
- }
- inline void GraphProto::SharedCtor() {
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- }
- GraphProto::~GraphProto() {
- // @@protoc_insertion_point(destructor:opencv_onnx.GraphProto)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void GraphProto::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- }
- void GraphProto::ArenaDtor(void* object) {
- GraphProto* _this = reinterpret_cast< GraphProto* >(object);
- (void)_this;
- }
- void GraphProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void GraphProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void GraphProto::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.GraphProto)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- node_.Clear();
- initializer_.Clear();
- input_.Clear();
- output_.Clear();
- value_info_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000002u) {
- doc_string_.ClearNonDefaultToEmpty();
- }
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* GraphProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // repeated .opencv_onnx.NodeProto node = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_node(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
- } else
- goto handle_unusual;
- continue;
- // optional string name = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
- auto str = _internal_mutable_name();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.GraphProto.name");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // repeated .opencv_onnx.TensorProto initializer = 5;
- case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_initializer(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
- } else
- goto handle_unusual;
- continue;
- // optional string doc_string = 10;
- case 10:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
- auto str = _internal_mutable_doc_string();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.GraphProto.doc_string");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // repeated .opencv_onnx.ValueInfoProto input = 11;
- case 11:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_input(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
- } else
- goto handle_unusual;
- continue;
- // repeated .opencv_onnx.ValueInfoProto output = 12;
- case 12:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_output(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<98>(ptr));
- } else
- goto handle_unusual;
- continue;
- // repeated .opencv_onnx.ValueInfoProto value_info = 13;
- case 13:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_value_info(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<106>(ptr));
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* GraphProto::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.GraphProto)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated .opencv_onnx.NodeProto node = 1;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_node_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(1, this->_internal_node(i), target, stream);
- }
- cached_has_bits = _has_bits_[0];
- // optional string name = 2;
- if (cached_has_bits & 0x00000001u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.GraphProto.name");
- target = stream->WriteStringMaybeAliased(
- 2, this->_internal_name(), target);
- }
- // repeated .opencv_onnx.TensorProto initializer = 5;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_initializer_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(5, this->_internal_initializer(i), target, stream);
- }
- // optional string doc_string = 10;
- if (cached_has_bits & 0x00000002u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.GraphProto.doc_string");
- target = stream->WriteStringMaybeAliased(
- 10, this->_internal_doc_string(), target);
- }
- // repeated .opencv_onnx.ValueInfoProto input = 11;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_input_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(11, this->_internal_input(i), target, stream);
- }
- // repeated .opencv_onnx.ValueInfoProto output = 12;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_output_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(12, this->_internal_output(i), target, stream);
- }
- // repeated .opencv_onnx.ValueInfoProto value_info = 13;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_value_info_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(13, this->_internal_value_info(i), target, stream);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.GraphProto)
- return target;
- }
- size_t GraphProto::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.GraphProto)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated .opencv_onnx.NodeProto node = 1;
- total_size += 1UL * this->_internal_node_size();
- for (const auto& msg : this->node_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- // repeated .opencv_onnx.TensorProto initializer = 5;
- total_size += 1UL * this->_internal_initializer_size();
- for (const auto& msg : this->initializer_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- // repeated .opencv_onnx.ValueInfoProto input = 11;
- total_size += 1UL * this->_internal_input_size();
- for (const auto& msg : this->input_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- // repeated .opencv_onnx.ValueInfoProto output = 12;
- total_size += 1UL * this->_internal_output_size();
- for (const auto& msg : this->output_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- // repeated .opencv_onnx.ValueInfoProto value_info = 13;
- total_size += 1UL * this->_internal_value_info_size();
- for (const auto& msg : this->value_info_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- // optional string name = 2;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_name());
- }
- // optional string doc_string = 10;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_doc_string());
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- GraphProto::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphProto::GetClassData() const { return &_class_data_; }
- void GraphProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<GraphProto *>(to)->MergeFrom(
- static_cast<const GraphProto &>(from));
- }
- void GraphProto::MergeFrom(const GraphProto& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.GraphProto)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- node_.MergeFrom(from.node_);
- initializer_.MergeFrom(from.initializer_);
- input_.MergeFrom(from.input_);
- output_.MergeFrom(from.output_);
- value_info_.MergeFrom(from.value_info_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
- }
- if (cached_has_bits & 0x00000002u) {
- _internal_set_doc_string(from._internal_doc_string());
- }
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void GraphProto::CopyFrom(const GraphProto& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.GraphProto)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool GraphProto::IsInitialized() const {
- return true;
- }
- void GraphProto::InternalSwap(GraphProto* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- node_.InternalSwap(&other->node_);
- initializer_.InternalSwap(&other->initializer_);
- input_.InternalSwap(&other->input_);
- output_.InternalSwap(&other->output_);
- value_info_.InternalSwap(&other->value_info_);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &name_, lhs_arena,
- &other->name_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &doc_string_, lhs_arena,
- &other->doc_string_, rhs_arena
- );
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata GraphProto::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[5]);
- }
- // ===================================================================
- class TensorProto_Segment::_Internal {
- public:
- using HasBits = decltype(std::declval<TensorProto_Segment>()._has_bits_);
- static void set_has_begin(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_end(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- };
- TensorProto_Segment::TensorProto_Segment(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorProto.Segment)
- }
- TensorProto_Segment::TensorProto_Segment(const TensorProto_Segment& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- ::memcpy(&begin_, &from.begin_,
- static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&begin_)) + sizeof(end_));
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto.Segment)
- }
- inline void TensorProto_Segment::SharedCtor() {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&begin_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&begin_)) + sizeof(end_));
- }
- TensorProto_Segment::~TensorProto_Segment() {
- // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto.Segment)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void TensorProto_Segment::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- }
- void TensorProto_Segment::ArenaDtor(void* object) {
- TensorProto_Segment* _this = reinterpret_cast< TensorProto_Segment* >(object);
- (void)_this;
- }
- void TensorProto_Segment::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void TensorProto_Segment::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void TensorProto_Segment::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto.Segment)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- ::memset(&begin_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&end_) -
- reinterpret_cast<char*>(&begin_)) + sizeof(end_));
- }
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* TensorProto_Segment::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // optional int64 begin = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- _Internal::set_has_begin(&has_bits);
- begin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional int64 end = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
- _Internal::set_has_end(&has_bits);
- end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* TensorProto_Segment::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto.Segment)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional int64 begin = 1;
- if (cached_has_bits & 0x00000001u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_begin(), target);
- }
- // optional int64 end = 2;
- if (cached_has_bits & 0x00000002u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_end(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto.Segment)
- return target;
- }
- size_t TensorProto_Segment::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto.Segment)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- // optional int64 begin = 1;
- if (cached_has_bits & 0x00000001u) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_begin());
- }
- // optional int64 end = 2;
- if (cached_has_bits & 0x00000002u) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_end());
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorProto_Segment::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- TensorProto_Segment::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorProto_Segment::GetClassData() const { return &_class_data_; }
- void TensorProto_Segment::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<TensorProto_Segment *>(to)->MergeFrom(
- static_cast<const TensorProto_Segment &>(from));
- }
- void TensorProto_Segment::MergeFrom(const TensorProto_Segment& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto.Segment)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- begin_ = from.begin_;
- }
- if (cached_has_bits & 0x00000002u) {
- end_ = from.end_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void TensorProto_Segment::CopyFrom(const TensorProto_Segment& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto.Segment)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TensorProto_Segment::IsInitialized() const {
- return true;
- }
- void TensorProto_Segment::InternalSwap(TensorProto_Segment* other) {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(TensorProto_Segment, end_)
- + sizeof(TensorProto_Segment::end_)
- - PROTOBUF_FIELD_OFFSET(TensorProto_Segment, begin_)>(
- reinterpret_cast<char*>(&begin_),
- reinterpret_cast<char*>(&other->begin_));
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata TensorProto_Segment::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[6]);
- }
- // ===================================================================
- class TensorProto::_Internal {
- public:
- using HasBits = decltype(std::declval<TensorProto>()._has_bits_);
- static void set_has_data_type(HasBits* has_bits) {
- (*has_bits)[0] |= 16u;
- }
- static const ::opencv_onnx::TensorProto_Segment& segment(const TensorProto* msg);
- static void set_has_segment(HasBits* has_bits) {
- (*has_bits)[0] |= 8u;
- }
- static void set_has_name(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_doc_string(HasBits* has_bits) {
- (*has_bits)[0] |= 4u;
- }
- static void set_has_raw_data(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- };
- const ::opencv_onnx::TensorProto_Segment&
- TensorProto::_Internal::segment(const TensorProto* msg) {
- return *msg->segment_;
- }
- TensorProto::TensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- dims_(arena),
- float_data_(arena),
- int32_data_(arena),
- string_data_(arena),
- int64_data_(arena),
- double_data_(arena),
- uint64_data_(arena) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorProto)
- }
- TensorProto::TensorProto(const TensorProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_),
- dims_(from.dims_),
- float_data_(from.float_data_),
- int32_data_(from.int32_data_),
- string_data_(from.string_data_),
- int64_data_(from.int64_data_),
- double_data_(from.double_data_),
- uint64_data_(from.uint64_data_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_name()) {
- name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
- GetArenaForAllocation());
- }
- raw_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- raw_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_raw_data()) {
- raw_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_raw_data(),
- GetArenaForAllocation());
- }
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_doc_string()) {
- doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
- GetArenaForAllocation());
- }
- if (from._internal_has_segment()) {
- segment_ = new ::opencv_onnx::TensorProto_Segment(*from.segment_);
- } else {
- segment_ = nullptr;
- }
- data_type_ = from.data_type_;
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto)
- }
- inline void TensorProto::SharedCtor() {
- name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- raw_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- raw_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&segment_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&data_type_) -
- reinterpret_cast<char*>(&segment_)) + sizeof(data_type_));
- }
- TensorProto::~TensorProto() {
- // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void TensorProto::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- raw_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (this != internal_default_instance()) delete segment_;
- }
- void TensorProto::ArenaDtor(void* object) {
- TensorProto* _this = reinterpret_cast< TensorProto* >(object);
- (void)_this;
- }
- void TensorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void TensorProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void TensorProto::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- dims_.Clear();
- float_data_.Clear();
- int32_data_.Clear();
- string_data_.Clear();
- int64_data_.Clear();
- double_data_.Clear();
- uint64_data_.Clear();
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000000fu) {
- if (cached_has_bits & 0x00000001u) {
- name_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000002u) {
- raw_data_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000004u) {
- doc_string_.ClearNonDefaultToEmpty();
- }
- if (cached_has_bits & 0x00000008u) {
- GOOGLE_DCHECK(segment_ != nullptr);
- segment_->Clear();
- }
- }
- data_type_ = 0;
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* TensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // repeated int64 dims = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- ptr -= 1;
- do {
- ptr += 1;
- _internal_add_dims(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr));
- } else if (static_cast<uint8_t>(tag) == 10) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_dims(), ptr, ctx);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional .opencv_onnx.TensorProto.DataType data_type = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
- uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::TensorProto_DataType_IsValid(val))) {
- _internal_set_data_type(static_cast<::opencv_onnx::TensorProto_DataType>(val));
- } else {
- ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
- }
- } else
- goto handle_unusual;
- continue;
- // optional .opencv_onnx.TensorProto.Segment segment = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
- ptr = ctx->ParseMessage(_internal_mutable_segment(), ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // repeated float float_data = 4 [packed = true];
- case 4:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_float_data(), ptr, ctx);
- CHK_(ptr);
- } else if (static_cast<uint8_t>(tag) == 37) {
- _internal_add_float_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
- ptr += sizeof(float);
- } else
- goto handle_unusual;
- continue;
- // repeated int32 int32_data = 5 [packed = true];
- case 5:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_int32_data(), ptr, ctx);
- CHK_(ptr);
- } else if (static_cast<uint8_t>(tag) == 40) {
- _internal_add_int32_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // repeated bytes string_data = 6;
- case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
- ptr -= 1;
- do {
- ptr += 1;
- auto str = _internal_add_string_data();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
- } else
- goto handle_unusual;
- continue;
- // repeated int64 int64_data = 7 [packed = true];
- case 7:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_int64_data(), ptr, ctx);
- CHK_(ptr);
- } else if (static_cast<uint8_t>(tag) == 56) {
- _internal_add_int64_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string name = 8;
- case 8:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
- auto str = _internal_mutable_name();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorProto.name");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional bytes raw_data = 9;
- case 9:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
- auto str = _internal_mutable_raw_data();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // repeated double double_data = 10 [packed = true];
- case 10:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_double_data(), ptr, ctx);
- CHK_(ptr);
- } else if (static_cast<uint8_t>(tag) == 81) {
- _internal_add_double_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
- ptr += sizeof(double);
- } else
- goto handle_unusual;
- continue;
- // repeated uint64 uint64_data = 11 [packed = true];
- case 11:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_uint64_data(), ptr, ctx);
- CHK_(ptr);
- } else if (static_cast<uint8_t>(tag) == 88) {
- _internal_add_uint64_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string doc_string = 12;
- case 12:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
- auto str = _internal_mutable_doc_string();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorProto.doc_string");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* TensorProto::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated int64 dims = 1;
- for (int i = 0, n = this->_internal_dims_size(); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_dims(i), target);
- }
- cached_has_bits = _has_bits_[0];
- // optional .opencv_onnx.TensorProto.DataType data_type = 2;
- if (cached_has_bits & 0x00000010u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
- 2, this->_internal_data_type(), target);
- }
- // optional .opencv_onnx.TensorProto.Segment segment = 3;
- if (cached_has_bits & 0x00000008u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(
- 3, _Internal::segment(this), target, stream);
- }
- // repeated float float_data = 4 [packed = true];
- if (this->_internal_float_data_size() > 0) {
- target = stream->WriteFixedPacked(4, _internal_float_data(), target);
- }
- // repeated int32 int32_data = 5 [packed = true];
- {
- int byte_size = _int32_data_cached_byte_size_.load(std::memory_order_relaxed);
- if (byte_size > 0) {
- target = stream->WriteInt32Packed(
- 5, _internal_int32_data(), byte_size, target);
- }
- }
- // repeated bytes string_data = 6;
- for (int i = 0, n = this->_internal_string_data_size(); i < n; i++) {
- const auto& s = this->_internal_string_data(i);
- target = stream->WriteBytes(6, s, target);
- }
- // repeated int64 int64_data = 7 [packed = true];
- {
- int byte_size = _int64_data_cached_byte_size_.load(std::memory_order_relaxed);
- if (byte_size > 0) {
- target = stream->WriteInt64Packed(
- 7, _internal_int64_data(), byte_size, target);
- }
- }
- // optional string name = 8;
- if (cached_has_bits & 0x00000001u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.TensorProto.name");
- target = stream->WriteStringMaybeAliased(
- 8, this->_internal_name(), target);
- }
- // optional bytes raw_data = 9;
- if (cached_has_bits & 0x00000002u) {
- target = stream->WriteBytesMaybeAliased(
- 9, this->_internal_raw_data(), target);
- }
- // repeated double double_data = 10 [packed = true];
- if (this->_internal_double_data_size() > 0) {
- target = stream->WriteFixedPacked(10, _internal_double_data(), target);
- }
- // repeated uint64 uint64_data = 11 [packed = true];
- {
- int byte_size = _uint64_data_cached_byte_size_.load(std::memory_order_relaxed);
- if (byte_size > 0) {
- target = stream->WriteUInt64Packed(
- 11, _internal_uint64_data(), byte_size, target);
- }
- }
- // optional string doc_string = 12;
- if (cached_has_bits & 0x00000004u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.TensorProto.doc_string");
- target = stream->WriteStringMaybeAliased(
- 12, this->_internal_doc_string(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto)
- return target;
- }
- size_t TensorProto::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated int64 dims = 1;
- {
- size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- Int64Size(this->dims_);
- total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_dims_size());
- total_size += data_size;
- }
- // repeated float float_data = 4 [packed = true];
- {
- unsigned int count = static_cast<unsigned int>(this->_internal_float_data_size());
- size_t data_size = 4UL * count;
- if (data_size > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- static_cast<int32_t>(data_size));
- }
- total_size += data_size;
- }
- // repeated int32 int32_data = 5 [packed = true];
- {
- size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- Int32Size(this->int32_data_);
- if (data_size > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- static_cast<int32_t>(data_size));
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
- _int32_data_cached_byte_size_.store(cached_size,
- std::memory_order_relaxed);
- total_size += data_size;
- }
- // repeated bytes string_data = 6;
- total_size += 1 *
- ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(string_data_.size());
- for (int i = 0, n = string_data_.size(); i < n; i++) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
- string_data_.Get(i));
- }
- // repeated int64 int64_data = 7 [packed = true];
- {
- size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- Int64Size(this->int64_data_);
- if (data_size > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- static_cast<int32_t>(data_size));
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
- _int64_data_cached_byte_size_.store(cached_size,
- std::memory_order_relaxed);
- total_size += data_size;
- }
- // repeated double double_data = 10 [packed = true];
- {
- unsigned int count = static_cast<unsigned int>(this->_internal_double_data_size());
- size_t data_size = 8UL * count;
- if (data_size > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- static_cast<int32_t>(data_size));
- }
- total_size += data_size;
- }
- // repeated uint64 uint64_data = 11 [packed = true];
- {
- size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- UInt64Size(this->uint64_data_);
- if (data_size > 0) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
- static_cast<int32_t>(data_size));
- }
- int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
- _uint64_data_cached_byte_size_.store(cached_size,
- std::memory_order_relaxed);
- total_size += data_size;
- }
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x0000001fu) {
- // optional string name = 8;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_name());
- }
- // optional bytes raw_data = 9;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
- this->_internal_raw_data());
- }
- // optional string doc_string = 12;
- if (cached_has_bits & 0x00000004u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_doc_string());
- }
- // optional .opencv_onnx.TensorProto.Segment segment = 3;
- if (cached_has_bits & 0x00000008u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *segment_);
- }
- // optional .opencv_onnx.TensorProto.DataType data_type = 2;
- if (cached_has_bits & 0x00000010u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_data_type());
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- TensorProto::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorProto::GetClassData() const { return &_class_data_; }
- void TensorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<TensorProto *>(to)->MergeFrom(
- static_cast<const TensorProto &>(from));
- }
- void TensorProto::MergeFrom(const TensorProto& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- dims_.MergeFrom(from.dims_);
- float_data_.MergeFrom(from.float_data_);
- int32_data_.MergeFrom(from.int32_data_);
- string_data_.MergeFrom(from.string_data_);
- int64_data_.MergeFrom(from.int64_data_);
- double_data_.MergeFrom(from.double_data_);
- uint64_data_.MergeFrom(from.uint64_data_);
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x0000001fu) {
- if (cached_has_bits & 0x00000001u) {
- _internal_set_name(from._internal_name());
- }
- if (cached_has_bits & 0x00000002u) {
- _internal_set_raw_data(from._internal_raw_data());
- }
- if (cached_has_bits & 0x00000004u) {
- _internal_set_doc_string(from._internal_doc_string());
- }
- if (cached_has_bits & 0x00000008u) {
- _internal_mutable_segment()->::opencv_onnx::TensorProto_Segment::MergeFrom(from._internal_segment());
- }
- if (cached_has_bits & 0x00000010u) {
- data_type_ = from.data_type_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void TensorProto::CopyFrom(const TensorProto& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TensorProto::IsInitialized() const {
- return true;
- }
- void TensorProto::InternalSwap(TensorProto* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- dims_.InternalSwap(&other->dims_);
- float_data_.InternalSwap(&other->float_data_);
- int32_data_.InternalSwap(&other->int32_data_);
- string_data_.InternalSwap(&other->string_data_);
- int64_data_.InternalSwap(&other->int64_data_);
- double_data_.InternalSwap(&other->double_data_);
- uint64_data_.InternalSwap(&other->uint64_data_);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &name_, lhs_arena,
- &other->name_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &raw_data_, lhs_arena,
- &other->raw_data_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &doc_string_, lhs_arena,
- &other->doc_string_, rhs_arena
- );
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(TensorProto, data_type_)
- + sizeof(TensorProto::data_type_)
- - PROTOBUF_FIELD_OFFSET(TensorProto, segment_)>(
- reinterpret_cast<char*>(&segment_),
- reinterpret_cast<char*>(&other->segment_));
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata TensorProto::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[7]);
- }
- // ===================================================================
- class TensorShapeProto_Dimension::_Internal {
- public:
- using HasBits = decltype(std::declval<TensorShapeProto_Dimension>()._has_bits_);
- static void set_has_denotation(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- };
- TensorShapeProto_Dimension::TensorShapeProto_Dimension(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorShapeProto.Dimension)
- }
- TensorShapeProto_Dimension::TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_denotation()) {
- denotation_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_denotation(),
- GetArenaForAllocation());
- }
- clear_has_value();
- switch (from.value_case()) {
- case kDimValue: {
- _internal_set_dim_value(from._internal_dim_value());
- break;
- }
- case kDimParam: {
- _internal_set_dim_param(from._internal_dim_param());
- break;
- }
- case VALUE_NOT_SET: {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto.Dimension)
- }
- inline void TensorShapeProto_Dimension::SharedCtor() {
- denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- clear_has_value();
- }
- TensorShapeProto_Dimension::~TensorShapeProto_Dimension() {
- // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto.Dimension)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void TensorShapeProto_Dimension::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- denotation_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (has_value()) {
- clear_value();
- }
- }
- void TensorShapeProto_Dimension::ArenaDtor(void* object) {
- TensorShapeProto_Dimension* _this = reinterpret_cast< TensorShapeProto_Dimension* >(object);
- (void)_this;
- }
- void TensorShapeProto_Dimension::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void TensorShapeProto_Dimension::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void TensorShapeProto_Dimension::clear_value() {
- // @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TensorShapeProto.Dimension)
- switch (value_case()) {
- case kDimValue: {
- // No need to clear
- break;
- }
- case kDimParam: {
- value_.dim_param_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
- break;
- }
- case VALUE_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = VALUE_NOT_SET;
- }
- void TensorShapeProto_Dimension::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto.Dimension)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- denotation_.ClearNonDefaultToEmpty();
- }
- clear_value();
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* TensorShapeProto_Dimension::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // int64 dim_value = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- _internal_set_dim_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // string dim_param = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
- auto str = _internal_mutable_dim_param();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorShapeProto.Dimension.dim_param");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string denotation = 3;
- case 3:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
- auto str = _internal_mutable_denotation();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorShapeProto.Dimension.denotation");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* TensorShapeProto_Dimension::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto.Dimension)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- switch (value_case()) {
- case kDimValue: {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_dim_value(), target);
- break;
- }
- case kDimParam: {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_dim_param().data(), static_cast<int>(this->_internal_dim_param().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.TensorShapeProto.Dimension.dim_param");
- target = stream->WriteStringMaybeAliased(
- 2, this->_internal_dim_param(), target);
- break;
- }
- default: ;
- }
- cached_has_bits = _has_bits_[0];
- // optional string denotation = 3;
- if (cached_has_bits & 0x00000001u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_denotation().data(), static_cast<int>(this->_internal_denotation().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.TensorShapeProto.Dimension.denotation");
- target = stream->WriteStringMaybeAliased(
- 3, this->_internal_denotation(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto.Dimension)
- return target;
- }
- size_t TensorShapeProto_Dimension::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto.Dimension)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // optional string denotation = 3;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_denotation());
- }
- switch (value_case()) {
- // int64 dim_value = 1;
- case kDimValue: {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_dim_value());
- break;
- }
- // string dim_param = 2;
- case kDimParam: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_dim_param());
- break;
- }
- case VALUE_NOT_SET: {
- break;
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto_Dimension::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- TensorShapeProto_Dimension::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto_Dimension::GetClassData() const { return &_class_data_; }
- void TensorShapeProto_Dimension::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<TensorShapeProto_Dimension *>(to)->MergeFrom(
- static_cast<const TensorShapeProto_Dimension &>(from));
- }
- void TensorShapeProto_Dimension::MergeFrom(const TensorShapeProto_Dimension& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto.Dimension)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- if (from._internal_has_denotation()) {
- _internal_set_denotation(from._internal_denotation());
- }
- switch (from.value_case()) {
- case kDimValue: {
- _internal_set_dim_value(from._internal_dim_value());
- break;
- }
- case kDimParam: {
- _internal_set_dim_param(from._internal_dim_param());
- break;
- }
- case VALUE_NOT_SET: {
- break;
- }
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void TensorShapeProto_Dimension::CopyFrom(const TensorShapeProto_Dimension& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorShapeProto.Dimension)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TensorShapeProto_Dimension::IsInitialized() const {
- return true;
- }
- void TensorShapeProto_Dimension::InternalSwap(TensorShapeProto_Dimension* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &denotation_, lhs_arena,
- &other->denotation_, rhs_arena
- );
- swap(value_, other->value_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto_Dimension::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[8]);
- }
- // ===================================================================
- class TensorShapeProto::_Internal {
- public:
- };
- TensorShapeProto::TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
- dim_(arena) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorShapeProto)
- }
- TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- dim_(from.dim_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto)
- }
- inline void TensorShapeProto::SharedCtor() {
- }
- TensorShapeProto::~TensorShapeProto() {
- // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void TensorShapeProto::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- }
- void TensorShapeProto::ArenaDtor(void* object) {
- TensorShapeProto* _this = reinterpret_cast< TensorShapeProto* >(object);
- (void)_this;
- }
- void TensorShapeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void TensorShapeProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void TensorShapeProto::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- dim_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* TensorShapeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
- ptr -= 1;
- do {
- ptr += 1;
- ptr = ctx->ParseMessage(_internal_add_dim(), ptr);
- CHK_(ptr);
- if (!ctx->DataAvailable(ptr)) break;
- } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* TensorShapeProto::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->_internal_dim_size()); i < n; i++) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(1, this->_internal_dim(i), target, stream);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto)
- return target;
- }
- size_t TensorShapeProto::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
- total_size += 1UL * this->_internal_dim_size();
- for (const auto& msg : this->dim_) {
- total_size +=
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- TensorShapeProto::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto::GetClassData() const { return &_class_data_; }
- void TensorShapeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<TensorShapeProto *>(to)->MergeFrom(
- static_cast<const TensorShapeProto &>(from));
- }
- void TensorShapeProto::MergeFrom(const TensorShapeProto& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- dim_.MergeFrom(from.dim_);
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void TensorShapeProto::CopyFrom(const TensorShapeProto& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorShapeProto)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TensorShapeProto::IsInitialized() const {
- return true;
- }
- void TensorShapeProto::InternalSwap(TensorShapeProto* other) {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- dim_.InternalSwap(&other->dim_);
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[9]);
- }
- // ===================================================================
- class TypeProto_Tensor::_Internal {
- public:
- using HasBits = decltype(std::declval<TypeProto_Tensor>()._has_bits_);
- static void set_has_elem_type(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- static const ::opencv_onnx::TensorShapeProto& shape(const TypeProto_Tensor* msg);
- static void set_has_shape(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- };
- const ::opencv_onnx::TensorShapeProto&
- TypeProto_Tensor::_Internal::shape(const TypeProto_Tensor* msg) {
- return *msg->shape_;
- }
- TypeProto_Tensor::TypeProto_Tensor(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Tensor)
- }
- TypeProto_Tensor::TypeProto_Tensor(const TypeProto_Tensor& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- if (from._internal_has_shape()) {
- shape_ = new ::opencv_onnx::TensorShapeProto(*from.shape_);
- } else {
- shape_ = nullptr;
- }
- elem_type_ = from.elem_type_;
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Tensor)
- }
- inline void TypeProto_Tensor::SharedCtor() {
- ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
- reinterpret_cast<char*>(&shape_) - reinterpret_cast<char*>(this)),
- 0, static_cast<size_t>(reinterpret_cast<char*>(&elem_type_) -
- reinterpret_cast<char*>(&shape_)) + sizeof(elem_type_));
- }
- TypeProto_Tensor::~TypeProto_Tensor() {
- // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Tensor)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void TypeProto_Tensor::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- if (this != internal_default_instance()) delete shape_;
- }
- void TypeProto_Tensor::ArenaDtor(void* object) {
- TypeProto_Tensor* _this = reinterpret_cast< TypeProto_Tensor* >(object);
- (void)_this;
- }
- void TypeProto_Tensor::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void TypeProto_Tensor::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void TypeProto_Tensor::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto.Tensor)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- GOOGLE_DCHECK(shape_ != nullptr);
- shape_->Clear();
- }
- elem_type_ = 0;
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* TypeProto_Tensor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // optional .opencv_onnx.TensorProto.DataType elem_type = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
- uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::TensorProto_DataType_IsValid(val))) {
- _internal_set_elem_type(static_cast<::opencv_onnx::TensorProto_DataType>(val));
- } else {
- ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
- }
- } else
- goto handle_unusual;
- continue;
- // optional .opencv_onnx.TensorShapeProto shape = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
- ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* TypeProto_Tensor::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto.Tensor)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional .opencv_onnx.TensorProto.DataType elem_type = 1;
- if (cached_has_bits & 0x00000002u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
- 1, this->_internal_elem_type(), target);
- }
- // optional .opencv_onnx.TensorShapeProto shape = 2;
- if (cached_has_bits & 0x00000001u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(
- 2, _Internal::shape(this), target, stream);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Tensor)
- return target;
- }
- size_t TypeProto_Tensor::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Tensor)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- // optional .opencv_onnx.TensorShapeProto shape = 2;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *shape_);
- }
- // optional .opencv_onnx.TensorProto.DataType elem_type = 1;
- if (cached_has_bits & 0x00000002u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_elem_type());
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TypeProto_Tensor::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- TypeProto_Tensor::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TypeProto_Tensor::GetClassData() const { return &_class_data_; }
- void TypeProto_Tensor::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<TypeProto_Tensor *>(to)->MergeFrom(
- static_cast<const TypeProto_Tensor &>(from));
- }
- void TypeProto_Tensor::MergeFrom(const TypeProto_Tensor& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Tensor)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- _internal_mutable_shape()->::opencv_onnx::TensorShapeProto::MergeFrom(from._internal_shape());
- }
- if (cached_has_bits & 0x00000002u) {
- elem_type_ = from.elem_type_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void TypeProto_Tensor::CopyFrom(const TypeProto_Tensor& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto.Tensor)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TypeProto_Tensor::IsInitialized() const {
- return true;
- }
- void TypeProto_Tensor::InternalSwap(TypeProto_Tensor* other) {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::memswap<
- PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, elem_type_)
- + sizeof(TypeProto_Tensor::elem_type_)
- - PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, shape_)>(
- reinterpret_cast<char*>(&shape_),
- reinterpret_cast<char*>(&other->shape_));
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata TypeProto_Tensor::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[10]);
- }
- // ===================================================================
- class TypeProto::_Internal {
- public:
- using HasBits = decltype(std::declval<TypeProto>()._has_bits_);
- static const ::opencv_onnx::TypeProto_Tensor& tensor_type(const TypeProto* msg);
- static void set_has_denotation(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- };
- const ::opencv_onnx::TypeProto_Tensor&
- TypeProto::_Internal::tensor_type(const TypeProto* msg) {
- return *msg->value_.tensor_type_;
- }
- void TypeProto::set_allocated_tensor_type(::opencv_onnx::TypeProto_Tensor* tensor_type) {
- ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
- clear_value();
- if (tensor_type) {
- ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
- ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto_Tensor>::GetOwningArena(tensor_type);
- if (message_arena != submessage_arena) {
- tensor_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
- message_arena, tensor_type, submessage_arena);
- }
- set_has_tensor_type();
- value_.tensor_type_ = tensor_type;
- }
- // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.tensor_type)
- }
- TypeProto::TypeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto)
- }
- TypeProto::TypeProto(const TypeProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_denotation()) {
- denotation_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_denotation(),
- GetArenaForAllocation());
- }
- clear_has_value();
- switch (from.value_case()) {
- case kTensorType: {
- _internal_mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from._internal_tensor_type());
- break;
- }
- case VALUE_NOT_SET: {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto)
- }
- inline void TypeProto::SharedCtor() {
- denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- clear_has_value();
- }
- TypeProto::~TypeProto() {
- // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void TypeProto::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- denotation_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- if (has_value()) {
- clear_value();
- }
- }
- void TypeProto::ArenaDtor(void* object) {
- TypeProto* _this = reinterpret_cast< TypeProto* >(object);
- (void)_this;
- }
- void TypeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void TypeProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void TypeProto::clear_value() {
- // @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TypeProto)
- switch (value_case()) {
- case kTensorType: {
- if (GetArenaForAllocation() == nullptr) {
- delete value_.tensor_type_;
- }
- break;
- }
- case VALUE_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = VALUE_NOT_SET;
- }
- void TypeProto::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- denotation_.ClearNonDefaultToEmpty();
- }
- clear_value();
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* TypeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // .opencv_onnx.TypeProto.Tensor tensor_type = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
- ptr = ctx->ParseMessage(_internal_mutable_tensor_type(), ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional string denotation = 6;
- case 6:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
- auto str = _internal_mutable_denotation();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TypeProto.denotation");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* TypeProto::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- // .opencv_onnx.TypeProto.Tensor tensor_type = 1;
- if (_internal_has_tensor_type()) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
- InternalWriteMessage(
- 1, _Internal::tensor_type(this), target, stream);
- }
- cached_has_bits = _has_bits_[0];
- // optional string denotation = 6;
- if (cached_has_bits & 0x00000001u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_denotation().data(), static_cast<int>(this->_internal_denotation().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.TypeProto.denotation");
- target = stream->WriteStringMaybeAliased(
- 6, this->_internal_denotation(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto)
- return target;
- }
- size_t TypeProto::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // optional string denotation = 6;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_denotation());
- }
- switch (value_case()) {
- // .opencv_onnx.TypeProto.Tensor tensor_type = 1;
- case kTensorType: {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
- *value_.tensor_type_);
- break;
- }
- case VALUE_NOT_SET: {
- break;
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TypeProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- TypeProto::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TypeProto::GetClassData() const { return &_class_data_; }
- void TypeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<TypeProto *>(to)->MergeFrom(
- static_cast<const TypeProto &>(from));
- }
- void TypeProto::MergeFrom(const TypeProto& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- if (from._internal_has_denotation()) {
- _internal_set_denotation(from._internal_denotation());
- }
- switch (from.value_case()) {
- case kTensorType: {
- _internal_mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from._internal_tensor_type());
- break;
- }
- case VALUE_NOT_SET: {
- break;
- }
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void TypeProto::CopyFrom(const TypeProto& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool TypeProto::IsInitialized() const {
- return true;
- }
- void TypeProto::InternalSwap(TypeProto* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &denotation_, lhs_arena,
- &other->denotation_, rhs_arena
- );
- swap(value_, other->value_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata TypeProto::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[11]);
- }
- // ===================================================================
- class OperatorSetIdProto::_Internal {
- public:
- using HasBits = decltype(std::declval<OperatorSetIdProto>()._has_bits_);
- static void set_has_domain(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- static void set_has_version(HasBits* has_bits) {
- (*has_bits)[0] |= 2u;
- }
- };
- OperatorSetIdProto::OperatorSetIdProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
- bool is_message_owned)
- : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
- SharedCtor();
- if (!is_message_owned) {
- RegisterArenaDtor(arena);
- }
- // @@protoc_insertion_point(arena_constructor:opencv_onnx.OperatorSetIdProto)
- }
- OperatorSetIdProto::OperatorSetIdProto(const OperatorSetIdProto& from)
- : ::PROTOBUF_NAMESPACE_ID::Message(),
- _has_bits_(from._has_bits_) {
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (from._internal_has_domain()) {
- domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(),
- GetArenaForAllocation());
- }
- version_ = from.version_;
- // @@protoc_insertion_point(copy_constructor:opencv_onnx.OperatorSetIdProto)
- }
- inline void OperatorSetIdProto::SharedCtor() {
- domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- version_ = int64_t{0};
- }
- OperatorSetIdProto::~OperatorSetIdProto() {
- // @@protoc_insertion_point(destructor:opencv_onnx.OperatorSetIdProto)
- if (GetArenaForAllocation() != nullptr) return;
- SharedDtor();
- _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- inline void OperatorSetIdProto::SharedDtor() {
- GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
- domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
- }
- void OperatorSetIdProto::ArenaDtor(void* object) {
- OperatorSetIdProto* _this = reinterpret_cast< OperatorSetIdProto* >(object);
- (void)_this;
- }
- void OperatorSetIdProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
- }
- void OperatorSetIdProto::SetCachedSize(int size) const {
- _cached_size_.Set(size);
- }
- void OperatorSetIdProto::Clear() {
- // @@protoc_insertion_point(message_clear_start:opencv_onnx.OperatorSetIdProto)
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- domain_.ClearNonDefaultToEmpty();
- }
- version_ = int64_t{0};
- _has_bits_.Clear();
- _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
- }
- const char* OperatorSetIdProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
- #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
- _Internal::HasBits has_bits{};
- while (!ctx->Done(&ptr)) {
- uint32_t tag;
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
- switch (tag >> 3) {
- // optional string domain = 1;
- case 1:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
- auto str = _internal_mutable_domain();
- ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
- #ifndef NDEBUG
- ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.OperatorSetIdProto.domain");
- #endif // !NDEBUG
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- // optional int64 version = 2;
- case 2:
- if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
- _Internal::set_has_version(&has_bits);
- version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
- CHK_(ptr);
- } else
- goto handle_unusual;
- continue;
- default:
- goto handle_unusual;
- } // switch
- handle_unusual:
- if ((tag == 0) || ((tag & 7) == 4)) {
- CHK_(ptr);
- ctx->SetLastTag(tag);
- goto message_done;
- }
- ptr = UnknownFieldParse(
- tag,
- _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
- ptr, ctx);
- CHK_(ptr != nullptr);
- } // while
- message_done:
- _has_bits_.Or(has_bits);
- return ptr;
- failure:
- ptr = nullptr;
- goto message_done;
- #undef CHK_
- }
- uint8_t* OperatorSetIdProto::_InternalSerialize(
- uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.OperatorSetIdProto)
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- // optional string domain = 1;
- if (cached_has_bits & 0x00000001u) {
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
- this->_internal_domain().data(), static_cast<int>(this->_internal_domain().length()),
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
- "opencv_onnx.OperatorSetIdProto.domain");
- target = stream->WriteStringMaybeAliased(
- 1, this->_internal_domain(), target);
- }
- // optional int64 version = 2;
- if (cached_has_bits & 0x00000002u) {
- target = stream->EnsureSpace(target);
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_version(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.OperatorSetIdProto)
- return target;
- }
- size_t OperatorSetIdProto::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.OperatorSetIdProto)
- size_t total_size = 0;
- uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- cached_has_bits = _has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- // optional string domain = 1;
- if (cached_has_bits & 0x00000001u) {
- total_size += 1 +
- ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
- this->_internal_domain());
- }
- // optional int64 version = 2;
- if (cached_has_bits & 0x00000002u) {
- total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_version());
- }
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
- }
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData OperatorSetIdProto::_class_data_ = {
- ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
- OperatorSetIdProto::MergeImpl
- };
- const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*OperatorSetIdProto::GetClassData() const { return &_class_data_; }
- void OperatorSetIdProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
- const ::PROTOBUF_NAMESPACE_ID::Message& from) {
- static_cast<OperatorSetIdProto *>(to)->MergeFrom(
- static_cast<const OperatorSetIdProto &>(from));
- }
- void OperatorSetIdProto::MergeFrom(const OperatorSetIdProto& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.OperatorSetIdProto)
- GOOGLE_DCHECK_NE(&from, this);
- uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- cached_has_bits = from._has_bits_[0];
- if (cached_has_bits & 0x00000003u) {
- if (cached_has_bits & 0x00000001u) {
- _internal_set_domain(from._internal_domain());
- }
- if (cached_has_bits & 0x00000002u) {
- version_ = from.version_;
- }
- _has_bits_[0] |= cached_has_bits;
- }
- _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
- }
- void OperatorSetIdProto::CopyFrom(const OperatorSetIdProto& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.OperatorSetIdProto)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool OperatorSetIdProto::IsInitialized() const {
- return true;
- }
- void OperatorSetIdProto::InternalSwap(OperatorSetIdProto* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_has_bits_[0], other->_has_bits_[0]);
- ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
- &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
- &domain_, lhs_arena,
- &other->domain_, rhs_arena
- );
- swap(version_, other->version_);
- }
- ::PROTOBUF_NAMESPACE_ID::Metadata OperatorSetIdProto::GetMetadata() const {
- return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
- &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
- file_level_metadata_opencv_2donnx_2eproto[12]);
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace opencv_onnx
- PROTOBUF_NAMESPACE_OPEN
- template<> PROTOBUF_NOINLINE ::opencv_onnx::AttributeProto* Arena::CreateMaybeMessage< ::opencv_onnx::AttributeProto >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::AttributeProto >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::ValueInfoProto* Arena::CreateMaybeMessage< ::opencv_onnx::ValueInfoProto >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::ValueInfoProto >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::NodeProto* Arena::CreateMaybeMessage< ::opencv_onnx::NodeProto >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::NodeProto >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::ModelProto* Arena::CreateMaybeMessage< ::opencv_onnx::ModelProto >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::ModelProto >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::StringStringEntryProto* Arena::CreateMaybeMessage< ::opencv_onnx::StringStringEntryProto >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::StringStringEntryProto >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::GraphProto* Arena::CreateMaybeMessage< ::opencv_onnx::GraphProto >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::GraphProto >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorProto_Segment* Arena::CreateMaybeMessage< ::opencv_onnx::TensorProto_Segment >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::TensorProto_Segment >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorProto* Arena::CreateMaybeMessage< ::opencv_onnx::TensorProto >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::TensorProto >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorShapeProto_Dimension* Arena::CreateMaybeMessage< ::opencv_onnx::TensorShapeProto_Dimension >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::TensorShapeProto_Dimension >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorShapeProto* Arena::CreateMaybeMessage< ::opencv_onnx::TensorShapeProto >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::TensorShapeProto >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_Tensor* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_Tensor >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_Tensor >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto >(arena);
- }
- template<> PROTOBUF_NOINLINE ::opencv_onnx::OperatorSetIdProto* Arena::CreateMaybeMessage< ::opencv_onnx::OperatorSetIdProto >(Arena* arena) {
- return Arena::CreateMessageInternal< ::opencv_onnx::OperatorSetIdProto >(arena);
- }
- PROTOBUF_NAMESPACE_CLOSE
- // @@protoc_insertion_point(global_scope)
- #include <google/protobuf/port_undef.inc>
|