opencv-onnx.pb.cc 223 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: opencv-onnx.proto
  3. #include "opencv-onnx.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/io/coded_stream.h>
  6. #include <google/protobuf/extension_set.h>
  7. #include <google/protobuf/wire_format_lite.h>
  8. #include <google/protobuf/descriptor.h>
  9. #include <google/protobuf/generated_message_reflection.h>
  10. #include <google/protobuf/reflection_ops.h>
  11. #include <google/protobuf/wire_format.h>
  12. // @@protoc_insertion_point(includes)
  13. #include <google/protobuf/port_def.inc>
  14. PROTOBUF_PRAGMA_INIT_SEG
  15. namespace opencv_onnx {
  16. constexpr AttributeProto::AttributeProto(
  17. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  18. : floats_()
  19. , ints_()
  20. , strings_()
  21. , tensors_()
  22. , graphs_()
  23. , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  24. , s_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  25. , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  26. , ref_attr_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  27. , t_(nullptr)
  28. , g_(nullptr)
  29. , i_(int64_t{0})
  30. , f_(0)
  31. , type_(0)
  32. {}
  33. struct AttributeProtoDefaultTypeInternal {
  34. constexpr AttributeProtoDefaultTypeInternal()
  35. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  36. ~AttributeProtoDefaultTypeInternal() {}
  37. union {
  38. AttributeProto _instance;
  39. };
  40. };
  41. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AttributeProtoDefaultTypeInternal _AttributeProto_default_instance_;
  42. constexpr ValueInfoProto::ValueInfoProto(
  43. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  44. : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  45. , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  46. , type_(nullptr){}
  47. struct ValueInfoProtoDefaultTypeInternal {
  48. constexpr ValueInfoProtoDefaultTypeInternal()
  49. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  50. ~ValueInfoProtoDefaultTypeInternal() {}
  51. union {
  52. ValueInfoProto _instance;
  53. };
  54. };
  55. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ValueInfoProtoDefaultTypeInternal _ValueInfoProto_default_instance_;
  56. constexpr NodeProto::NodeProto(
  57. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  58. : input_()
  59. , output_()
  60. , attribute_()
  61. , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  62. , op_type_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  63. , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  64. , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
  65. struct NodeProtoDefaultTypeInternal {
  66. constexpr NodeProtoDefaultTypeInternal()
  67. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  68. ~NodeProtoDefaultTypeInternal() {}
  69. union {
  70. NodeProto _instance;
  71. };
  72. };
  73. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeProtoDefaultTypeInternal _NodeProto_default_instance_;
  74. constexpr ModelProto::ModelProto(
  75. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  76. : opset_import_()
  77. , metadata_props_()
  78. , producer_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  79. , producer_version_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  80. , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  81. , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  82. , graph_(nullptr)
  83. , ir_version_(int64_t{0})
  84. , model_version_(int64_t{0}){}
  85. struct ModelProtoDefaultTypeInternal {
  86. constexpr ModelProtoDefaultTypeInternal()
  87. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  88. ~ModelProtoDefaultTypeInternal() {}
  89. union {
  90. ModelProto _instance;
  91. };
  92. };
  93. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ModelProtoDefaultTypeInternal _ModelProto_default_instance_;
  94. constexpr StringStringEntryProto::StringStringEntryProto(
  95. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  96. : key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  97. , value_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
  98. struct StringStringEntryProtoDefaultTypeInternal {
  99. constexpr StringStringEntryProtoDefaultTypeInternal()
  100. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  101. ~StringStringEntryProtoDefaultTypeInternal() {}
  102. union {
  103. StringStringEntryProto _instance;
  104. };
  105. };
  106. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT StringStringEntryProtoDefaultTypeInternal _StringStringEntryProto_default_instance_;
  107. constexpr GraphProto::GraphProto(
  108. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  109. : node_()
  110. , initializer_()
  111. , input_()
  112. , output_()
  113. , value_info_()
  114. , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  115. , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
  116. struct GraphProtoDefaultTypeInternal {
  117. constexpr GraphProtoDefaultTypeInternal()
  118. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  119. ~GraphProtoDefaultTypeInternal() {}
  120. union {
  121. GraphProto _instance;
  122. };
  123. };
  124. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GraphProtoDefaultTypeInternal _GraphProto_default_instance_;
  125. constexpr TensorProto_Segment::TensorProto_Segment(
  126. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  127. : begin_(int64_t{0})
  128. , end_(int64_t{0}){}
  129. struct TensorProto_SegmentDefaultTypeInternal {
  130. constexpr TensorProto_SegmentDefaultTypeInternal()
  131. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  132. ~TensorProto_SegmentDefaultTypeInternal() {}
  133. union {
  134. TensorProto_Segment _instance;
  135. };
  136. };
  137. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorProto_SegmentDefaultTypeInternal _TensorProto_Segment_default_instance_;
  138. constexpr TensorProto::TensorProto(
  139. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  140. : dims_()
  141. , float_data_()
  142. , int32_data_()
  143. , _int32_data_cached_byte_size_(0)
  144. , string_data_()
  145. , int64_data_()
  146. , _int64_data_cached_byte_size_(0)
  147. , double_data_()
  148. , uint64_data_()
  149. , _uint64_data_cached_byte_size_(0)
  150. , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  151. , raw_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  152. , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  153. , segment_(nullptr)
  154. , data_type_(0)
  155. {}
  156. struct TensorProtoDefaultTypeInternal {
  157. constexpr TensorProtoDefaultTypeInternal()
  158. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  159. ~TensorProtoDefaultTypeInternal() {}
  160. union {
  161. TensorProto _instance;
  162. };
  163. };
  164. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorProtoDefaultTypeInternal _TensorProto_default_instance_;
  165. constexpr TensorShapeProto_Dimension::TensorShapeProto_Dimension(
  166. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  167. : denotation_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  168. , _oneof_case_{}{}
  169. struct TensorShapeProto_DimensionDefaultTypeInternal {
  170. constexpr TensorShapeProto_DimensionDefaultTypeInternal()
  171. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  172. ~TensorShapeProto_DimensionDefaultTypeInternal() {}
  173. union {
  174. TensorShapeProto_Dimension _instance;
  175. };
  176. };
  177. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProto_DimensionDefaultTypeInternal _TensorShapeProto_Dimension_default_instance_;
  178. constexpr TensorShapeProto::TensorShapeProto(
  179. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  180. : dim_(){}
  181. struct TensorShapeProtoDefaultTypeInternal {
  182. constexpr TensorShapeProtoDefaultTypeInternal()
  183. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  184. ~TensorShapeProtoDefaultTypeInternal() {}
  185. union {
  186. TensorShapeProto _instance;
  187. };
  188. };
  189. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_;
  190. constexpr TypeProto_Tensor::TypeProto_Tensor(
  191. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  192. : shape_(nullptr)
  193. , elem_type_(0)
  194. {}
  195. struct TypeProto_TensorDefaultTypeInternal {
  196. constexpr TypeProto_TensorDefaultTypeInternal()
  197. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  198. ~TypeProto_TensorDefaultTypeInternal() {}
  199. union {
  200. TypeProto_Tensor _instance;
  201. };
  202. };
  203. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_TensorDefaultTypeInternal _TypeProto_Tensor_default_instance_;
  204. constexpr TypeProto::TypeProto(
  205. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  206. : denotation_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  207. , _oneof_case_{}{}
  208. struct TypeProtoDefaultTypeInternal {
  209. constexpr TypeProtoDefaultTypeInternal()
  210. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  211. ~TypeProtoDefaultTypeInternal() {}
  212. union {
  213. TypeProto _instance;
  214. };
  215. };
  216. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProtoDefaultTypeInternal _TypeProto_default_instance_;
  217. constexpr OperatorSetIdProto::OperatorSetIdProto(
  218. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  219. : domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  220. , version_(int64_t{0}){}
  221. struct OperatorSetIdProtoDefaultTypeInternal {
  222. constexpr OperatorSetIdProtoDefaultTypeInternal()
  223. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  224. ~OperatorSetIdProtoDefaultTypeInternal() {}
  225. union {
  226. OperatorSetIdProto _instance;
  227. };
  228. };
  229. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OperatorSetIdProtoDefaultTypeInternal _OperatorSetIdProto_default_instance_;
  230. } // namespace opencv_onnx
  231. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_opencv_2donnx_2eproto[13];
  232. static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_opencv_2donnx_2eproto[3];
  233. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_opencv_2donnx_2eproto = nullptr;
  234. const uint32_t TableStruct_opencv_2donnx_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  235. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _has_bits_),
  236. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _internal_metadata_),
  237. ~0u, // no _extensions_
  238. ~0u, // no _oneof_case_
  239. ~0u, // no _weak_field_map_
  240. ~0u, // no _inlined_string_donated_
  241. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, name_),
  242. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, ref_attr_name_),
  243. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, doc_string_),
  244. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, type_),
  245. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, f_),
  246. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, i_),
  247. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, s_),
  248. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, t_),
  249. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, g_),
  250. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, floats_),
  251. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, ints_),
  252. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, strings_),
  253. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, tensors_),
  254. PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, graphs_),
  255. 0,
  256. 3,
  257. 2,
  258. 8,
  259. 7,
  260. 6,
  261. 1,
  262. 4,
  263. 5,
  264. ~0u,
  265. ~0u,
  266. ~0u,
  267. ~0u,
  268. ~0u,
  269. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _has_bits_),
  270. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _internal_metadata_),
  271. ~0u, // no _extensions_
  272. ~0u, // no _oneof_case_
  273. ~0u, // no _weak_field_map_
  274. ~0u, // no _inlined_string_donated_
  275. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, name_),
  276. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, type_),
  277. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, doc_string_),
  278. 0,
  279. 2,
  280. 1,
  281. PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _has_bits_),
  282. PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _internal_metadata_),
  283. ~0u, // no _extensions_
  284. ~0u, // no _oneof_case_
  285. ~0u, // no _weak_field_map_
  286. ~0u, // no _inlined_string_donated_
  287. PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, input_),
  288. PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, output_),
  289. PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, name_),
  290. PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, op_type_),
  291. PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, domain_),
  292. PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, attribute_),
  293. PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, doc_string_),
  294. ~0u,
  295. ~0u,
  296. 0,
  297. 1,
  298. 3,
  299. ~0u,
  300. 2,
  301. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _has_bits_),
  302. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _internal_metadata_),
  303. ~0u, // no _extensions_
  304. ~0u, // no _oneof_case_
  305. ~0u, // no _weak_field_map_
  306. ~0u, // no _inlined_string_donated_
  307. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, ir_version_),
  308. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, opset_import_),
  309. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_name_),
  310. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_version_),
  311. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, domain_),
  312. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, model_version_),
  313. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, doc_string_),
  314. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, graph_),
  315. PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, metadata_props_),
  316. 5,
  317. ~0u,
  318. 0,
  319. 1,
  320. 2,
  321. 6,
  322. 3,
  323. 4,
  324. ~0u,
  325. PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _has_bits_),
  326. PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _internal_metadata_),
  327. ~0u, // no _extensions_
  328. ~0u, // no _oneof_case_
  329. ~0u, // no _weak_field_map_
  330. ~0u, // no _inlined_string_donated_
  331. PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, key_),
  332. PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, value_),
  333. 0,
  334. 1,
  335. PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _has_bits_),
  336. PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _internal_metadata_),
  337. ~0u, // no _extensions_
  338. ~0u, // no _oneof_case_
  339. ~0u, // no _weak_field_map_
  340. ~0u, // no _inlined_string_donated_
  341. PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, node_),
  342. PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, name_),
  343. PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, initializer_),
  344. PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, doc_string_),
  345. PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, input_),
  346. PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, output_),
  347. PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, value_info_),
  348. ~0u,
  349. 0,
  350. ~0u,
  351. 1,
  352. ~0u,
  353. ~0u,
  354. ~0u,
  355. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _has_bits_),
  356. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _internal_metadata_),
  357. ~0u, // no _extensions_
  358. ~0u, // no _oneof_case_
  359. ~0u, // no _weak_field_map_
  360. ~0u, // no _inlined_string_donated_
  361. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, begin_),
  362. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, end_),
  363. 0,
  364. 1,
  365. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _has_bits_),
  366. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _internal_metadata_),
  367. ~0u, // no _extensions_
  368. ~0u, // no _oneof_case_
  369. ~0u, // no _weak_field_map_
  370. ~0u, // no _inlined_string_donated_
  371. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, dims_),
  372. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, data_type_),
  373. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, segment_),
  374. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, float_data_),
  375. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, int32_data_),
  376. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, string_data_),
  377. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, int64_data_),
  378. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, name_),
  379. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, doc_string_),
  380. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, raw_data_),
  381. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, double_data_),
  382. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, uint64_data_),
  383. ~0u,
  384. 4,
  385. 3,
  386. ~0u,
  387. ~0u,
  388. ~0u,
  389. ~0u,
  390. 0,
  391. 2,
  392. 1,
  393. ~0u,
  394. ~0u,
  395. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _has_bits_),
  396. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _internal_metadata_),
  397. ~0u, // no _extensions_
  398. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _oneof_case_[0]),
  399. ~0u, // no _weak_field_map_
  400. ~0u, // no _inlined_string_donated_
  401. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  402. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  403. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, denotation_),
  404. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, value_),
  405. ~0u,
  406. ~0u,
  407. 0,
  408. ~0u, // no _has_bits_
  409. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _internal_metadata_),
  410. ~0u, // no _extensions_
  411. ~0u, // no _oneof_case_
  412. ~0u, // no _weak_field_map_
  413. ~0u, // no _inlined_string_donated_
  414. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, dim_),
  415. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _has_bits_),
  416. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _internal_metadata_),
  417. ~0u, // no _extensions_
  418. ~0u, // no _oneof_case_
  419. ~0u, // no _weak_field_map_
  420. ~0u, // no _inlined_string_donated_
  421. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, elem_type_),
  422. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, shape_),
  423. 1,
  424. 0,
  425. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _has_bits_),
  426. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _internal_metadata_),
  427. ~0u, // no _extensions_
  428. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _oneof_case_[0]),
  429. ~0u, // no _weak_field_map_
  430. ~0u, // no _inlined_string_donated_
  431. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  432. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, denotation_),
  433. PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, value_),
  434. ~0u,
  435. 0,
  436. PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _has_bits_),
  437. PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _internal_metadata_),
  438. ~0u, // no _extensions_
  439. ~0u, // no _oneof_case_
  440. ~0u, // no _weak_field_map_
  441. ~0u, // no _inlined_string_donated_
  442. PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, domain_),
  443. PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, version_),
  444. 0,
  445. 1,
  446. };
  447. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  448. { 0, 20, -1, sizeof(::opencv_onnx::AttributeProto)},
  449. { 34, 43, -1, sizeof(::opencv_onnx::ValueInfoProto)},
  450. { 46, 59, -1, sizeof(::opencv_onnx::NodeProto)},
  451. { 66, 81, -1, sizeof(::opencv_onnx::ModelProto)},
  452. { 90, 98, -1, sizeof(::opencv_onnx::StringStringEntryProto)},
  453. { 100, 113, -1, sizeof(::opencv_onnx::GraphProto)},
  454. { 120, 128, -1, sizeof(::opencv_onnx::TensorProto_Segment)},
  455. { 130, 148, -1, sizeof(::opencv_onnx::TensorProto)},
  456. { 160, 170, -1, sizeof(::opencv_onnx::TensorShapeProto_Dimension)},
  457. { 173, -1, -1, sizeof(::opencv_onnx::TensorShapeProto)},
  458. { 180, 188, -1, sizeof(::opencv_onnx::TypeProto_Tensor)},
  459. { 190, 199, -1, sizeof(::opencv_onnx::TypeProto)},
  460. { 201, 209, -1, sizeof(::opencv_onnx::OperatorSetIdProto)},
  461. };
  462. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  463. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_AttributeProto_default_instance_),
  464. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_ValueInfoProto_default_instance_),
  465. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_NodeProto_default_instance_),
  466. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_ModelProto_default_instance_),
  467. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_StringStringEntryProto_default_instance_),
  468. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_GraphProto_default_instance_),
  469. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TensorProto_Segment_default_instance_),
  470. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TensorProto_default_instance_),
  471. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TensorShapeProto_Dimension_default_instance_),
  472. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TensorShapeProto_default_instance_),
  473. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TypeProto_Tensor_default_instance_),
  474. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_TypeProto_default_instance_),
  475. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_onnx::_OperatorSetIdProto_default_instance_),
  476. };
  477. const char descriptor_table_protodef_opencv_2donnx_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  478. "\n\021opencv-onnx.proto\022\013opencv_onnx\"\203\004\n\016Att"
  479. "ributeProto\022\014\n\004name\030\001 \001(\t\022\025\n\rref_attr_na"
  480. "me\030\025 \001(\t\022\022\n\ndoc_string\030\r \001(\t\0227\n\004type\030\024 \001"
  481. "(\0162).opencv_onnx.AttributeProto.Attribut"
  482. "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#"
  483. "\n\001t\030\005 \001(\0132\030.opencv_onnx.TensorProto\022\"\n\001g"
  484. "\030\006 \001(\0132\027.opencv_onnx.GraphProto\022\016\n\006float"
  485. "s\030\007 \003(\002\022\014\n\004ints\030\010 \003(\003\022\017\n\007strings\030\t \003(\014\022)"
  486. "\n\007tensors\030\n \003(\0132\030.opencv_onnx.TensorProt"
  487. "o\022\'\n\006graphs\030\013 \003(\0132\027.opencv_onnx.GraphPro"
  488. "to\"\221\001\n\rAttributeType\022\r\n\tUNDEFINED\020\000\022\t\n\005F"
  489. "LOAT\020\001\022\007\n\003INT\020\002\022\n\n\006STRING\020\003\022\n\n\006TENSOR\020\004\022"
  490. "\t\n\005GRAPH\020\005\022\n\n\006FLOATS\020\006\022\010\n\004INTS\020\007\022\013\n\007STRI"
  491. "NGS\020\010\022\013\n\007TENSORS\020\t\022\n\n\006GRAPHS\020\n\"X\n\016ValueI"
  492. "nfoProto\022\014\n\004name\030\001 \001(\t\022$\n\004type\030\002 \001(\0132\026.o"
  493. "pencv_onnx.TypeProto\022\022\n\ndoc_string\030\003 \001(\t"
  494. "\"\235\001\n\tNodeProto\022\r\n\005input\030\001 \003(\t\022\016\n\006output\030"
  495. "\002 \003(\t\022\014\n\004name\030\003 \001(\t\022\017\n\007op_type\030\004 \001(\t\022\016\n\006"
  496. "domain\030\007 \001(\t\022.\n\tattribute\030\005 \003(\0132\033.opencv"
  497. "_onnx.AttributeProto\022\022\n\ndoc_string\030\006 \001(\t"
  498. "\"\250\002\n\nModelProto\022\022\n\nir_version\030\001 \001(\003\0225\n\014o"
  499. "pset_import\030\010 \003(\0132\037.opencv_onnx.Operator"
  500. "SetIdProto\022\025\n\rproducer_name\030\002 \001(\t\022\030\n\020pro"
  501. "ducer_version\030\003 \001(\t\022\016\n\006domain\030\004 \001(\t\022\025\n\rm"
  502. "odel_version\030\005 \001(\003\022\022\n\ndoc_string\030\006 \001(\t\022&"
  503. "\n\005graph\030\007 \001(\0132\027.opencv_onnx.GraphProto\022;"
  504. "\n\016metadata_props\030\016 \003(\0132#.opencv_onnx.Str"
  505. "ingStringEntryProto\"4\n\026StringStringEntry"
  506. "Proto\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\215\002\n\nGr"
  507. "aphProto\022$\n\004node\030\001 \003(\0132\026.opencv_onnx.Nod"
  508. "eProto\022\014\n\004name\030\002 \001(\t\022-\n\013initializer\030\005 \003("
  509. "\0132\030.opencv_onnx.TensorProto\022\022\n\ndoc_strin"
  510. "g\030\n \001(\t\022*\n\005input\030\013 \003(\0132\033.opencv_onnx.Val"
  511. "ueInfoProto\022+\n\006output\030\014 \003(\0132\033.opencv_onn"
  512. "x.ValueInfoProto\022/\n\nvalue_info\030\r \003(\0132\033.o"
  513. "pencv_onnx.ValueInfoProto\"\275\004\n\013TensorProt"
  514. "o\022\014\n\004dims\030\001 \003(\003\0224\n\tdata_type\030\002 \001(\0162!.ope"
  515. "ncv_onnx.TensorProto.DataType\0221\n\007segment"
  516. "\030\003 \001(\0132 .opencv_onnx.TensorProto.Segment"
  517. "\022\026\n\nfloat_data\030\004 \003(\002B\002\020\001\022\026\n\nint32_data\030\005"
  518. " \003(\005B\002\020\001\022\023\n\013string_data\030\006 \003(\014\022\026\n\nint64_d"
  519. "ata\030\007 \003(\003B\002\020\001\022\014\n\004name\030\010 \001(\t\022\022\n\ndoc_strin"
  520. "g\030\014 \001(\t\022\020\n\010raw_data\030\t \001(\014\022\027\n\013double_data"
  521. "\030\n \003(\001B\002\020\001\022\027\n\013uint64_data\030\013 \003(\004B\002\020\001\032%\n\007S"
  522. "egment\022\r\n\005begin\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\"\314\001\n\010D"
  523. "ataType\022\r\n\tUNDEFINED\020\000\022\t\n\005FLOAT\020\001\022\t\n\005UIN"
  524. "T8\020\002\022\010\n\004INT8\020\003\022\n\n\006UINT16\020\004\022\t\n\005INT16\020\005\022\t\n"
  525. "\005INT32\020\006\022\t\n\005INT64\020\007\022\n\n\006STRING\020\010\022\010\n\004BOOL\020"
  526. "\t\022\013\n\007FLOAT16\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006UINT32\020\014\022\n"
  527. "\n\006UINT64\020\r\022\r\n\tCOMPLEX64\020\016\022\016\n\nCOMPLEX128\020"
  528. "\017\"\234\001\n\020TensorShapeProto\0224\n\003dim\030\001 \003(\0132\'.op"
  529. "encv_onnx.TensorShapeProto.Dimension\032R\n\t"
  530. "Dimension\022\023\n\tdim_value\030\001 \001(\003H\000\022\023\n\tdim_pa"
  531. "ram\030\002 \001(\tH\000\022\022\n\ndenotation\030\003 \001(\tB\007\n\005value"
  532. "\"\314\001\n\tTypeProto\0224\n\013tensor_type\030\001 \001(\0132\035.op"
  533. "encv_onnx.TypeProto.TensorH\000\022\022\n\ndenotati"
  534. "on\030\006 \001(\t\032l\n\006Tensor\0224\n\telem_type\030\001 \001(\0162!."
  535. "opencv_onnx.TensorProto.DataType\022,\n\005shap"
  536. "e\030\002 \001(\0132\035.opencv_onnx.TensorShapeProtoB\007"
  537. "\n\005value\"5\n\022OperatorSetIdProto\022\016\n\006domain\030"
  538. "\001 \001(\t\022\017\n\007version\030\002 \001(\003*c\n\007Version\022\022\n\016_ST"
  539. "ART_VERSION\020\000\022\031\n\025IR_VERSION_2017_10_10\020\001"
  540. "\022\031\n\025IR_VERSION_2017_10_30\020\002\022\016\n\nIR_VERSIO"
  541. "N\020\003"
  542. ;
  543. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_opencv_2donnx_2eproto_once;
  544. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_opencv_2donnx_2eproto = {
  545. false, false, 2523, descriptor_table_protodef_opencv_2donnx_2eproto, "opencv-onnx.proto",
  546. &descriptor_table_opencv_2donnx_2eproto_once, nullptr, 0, 13,
  547. schemas, file_default_instances, TableStruct_opencv_2donnx_2eproto::offsets,
  548. file_level_metadata_opencv_2donnx_2eproto, file_level_enum_descriptors_opencv_2donnx_2eproto, file_level_service_descriptors_opencv_2donnx_2eproto,
  549. };
  550. PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_opencv_2donnx_2eproto_getter() {
  551. return &descriptor_table_opencv_2donnx_2eproto;
  552. }
  553. // Force running AddDescriptors() at dynamic initialization time.
  554. PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_opencv_2donnx_2eproto(&descriptor_table_opencv_2donnx_2eproto);
  555. namespace opencv_onnx {
  556. const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AttributeProto_AttributeType_descriptor() {
  557. ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto);
  558. return file_level_enum_descriptors_opencv_2donnx_2eproto[0];
  559. }
  560. bool AttributeProto_AttributeType_IsValid(int value) {
  561. switch (value) {
  562. case 0:
  563. case 1:
  564. case 2:
  565. case 3:
  566. case 4:
  567. case 5:
  568. case 6:
  569. case 7:
  570. case 8:
  571. case 9:
  572. case 10:
  573. return true;
  574. default:
  575. return false;
  576. }
  577. }
  578. #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
  579. constexpr AttributeProto_AttributeType AttributeProto::UNDEFINED;
  580. constexpr AttributeProto_AttributeType AttributeProto::FLOAT;
  581. constexpr AttributeProto_AttributeType AttributeProto::INT;
  582. constexpr AttributeProto_AttributeType AttributeProto::STRING;
  583. constexpr AttributeProto_AttributeType AttributeProto::TENSOR;
  584. constexpr AttributeProto_AttributeType AttributeProto::GRAPH;
  585. constexpr AttributeProto_AttributeType AttributeProto::FLOATS;
  586. constexpr AttributeProto_AttributeType AttributeProto::INTS;
  587. constexpr AttributeProto_AttributeType AttributeProto::STRINGS;
  588. constexpr AttributeProto_AttributeType AttributeProto::TENSORS;
  589. constexpr AttributeProto_AttributeType AttributeProto::GRAPHS;
  590. constexpr AttributeProto_AttributeType AttributeProto::AttributeType_MIN;
  591. constexpr AttributeProto_AttributeType AttributeProto::AttributeType_MAX;
  592. constexpr int AttributeProto::AttributeType_ARRAYSIZE;
  593. #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
  594. const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TensorProto_DataType_descriptor() {
  595. ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto);
  596. return file_level_enum_descriptors_opencv_2donnx_2eproto[1];
  597. }
  598. bool TensorProto_DataType_IsValid(int value) {
  599. switch (value) {
  600. case 0:
  601. case 1:
  602. case 2:
  603. case 3:
  604. case 4:
  605. case 5:
  606. case 6:
  607. case 7:
  608. case 8:
  609. case 9:
  610. case 10:
  611. case 11:
  612. case 12:
  613. case 13:
  614. case 14:
  615. case 15:
  616. return true;
  617. default:
  618. return false;
  619. }
  620. }
  621. #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
  622. constexpr TensorProto_DataType TensorProto::UNDEFINED;
  623. constexpr TensorProto_DataType TensorProto::FLOAT;
  624. constexpr TensorProto_DataType TensorProto::UINT8;
  625. constexpr TensorProto_DataType TensorProto::INT8;
  626. constexpr TensorProto_DataType TensorProto::UINT16;
  627. constexpr TensorProto_DataType TensorProto::INT16;
  628. constexpr TensorProto_DataType TensorProto::INT32;
  629. constexpr TensorProto_DataType TensorProto::INT64;
  630. constexpr TensorProto_DataType TensorProto::STRING;
  631. constexpr TensorProto_DataType TensorProto::BOOL;
  632. constexpr TensorProto_DataType TensorProto::FLOAT16;
  633. constexpr TensorProto_DataType TensorProto::DOUBLE;
  634. constexpr TensorProto_DataType TensorProto::UINT32;
  635. constexpr TensorProto_DataType TensorProto::UINT64;
  636. constexpr TensorProto_DataType TensorProto::COMPLEX64;
  637. constexpr TensorProto_DataType TensorProto::COMPLEX128;
  638. constexpr TensorProto_DataType TensorProto::DataType_MIN;
  639. constexpr TensorProto_DataType TensorProto::DataType_MAX;
  640. constexpr int TensorProto::DataType_ARRAYSIZE;
  641. #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
  642. const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Version_descriptor() {
  643. ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto);
  644. return file_level_enum_descriptors_opencv_2donnx_2eproto[2];
  645. }
  646. bool Version_IsValid(int value) {
  647. switch (value) {
  648. case 0:
  649. case 1:
  650. case 2:
  651. case 3:
  652. return true;
  653. default:
  654. return false;
  655. }
  656. }
  657. // ===================================================================
  658. class AttributeProto::_Internal {
  659. public:
  660. using HasBits = decltype(std::declval<AttributeProto>()._has_bits_);
  661. static void set_has_name(HasBits* has_bits) {
  662. (*has_bits)[0] |= 1u;
  663. }
  664. static void set_has_ref_attr_name(HasBits* has_bits) {
  665. (*has_bits)[0] |= 8u;
  666. }
  667. static void set_has_doc_string(HasBits* has_bits) {
  668. (*has_bits)[0] |= 4u;
  669. }
  670. static void set_has_type(HasBits* has_bits) {
  671. (*has_bits)[0] |= 256u;
  672. }
  673. static void set_has_f(HasBits* has_bits) {
  674. (*has_bits)[0] |= 128u;
  675. }
  676. static void set_has_i(HasBits* has_bits) {
  677. (*has_bits)[0] |= 64u;
  678. }
  679. static void set_has_s(HasBits* has_bits) {
  680. (*has_bits)[0] |= 2u;
  681. }
  682. static const ::opencv_onnx::TensorProto& t(const AttributeProto* msg);
  683. static void set_has_t(HasBits* has_bits) {
  684. (*has_bits)[0] |= 16u;
  685. }
  686. static const ::opencv_onnx::GraphProto& g(const AttributeProto* msg);
  687. static void set_has_g(HasBits* has_bits) {
  688. (*has_bits)[0] |= 32u;
  689. }
  690. };
  691. const ::opencv_onnx::TensorProto&
  692. AttributeProto::_Internal::t(const AttributeProto* msg) {
  693. return *msg->t_;
  694. }
  695. const ::opencv_onnx::GraphProto&
  696. AttributeProto::_Internal::g(const AttributeProto* msg) {
  697. return *msg->g_;
  698. }
  699. AttributeProto::AttributeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  700. bool is_message_owned)
  701. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  702. floats_(arena),
  703. ints_(arena),
  704. strings_(arena),
  705. tensors_(arena),
  706. graphs_(arena) {
  707. SharedCtor();
  708. if (!is_message_owned) {
  709. RegisterArenaDtor(arena);
  710. }
  711. // @@protoc_insertion_point(arena_constructor:opencv_onnx.AttributeProto)
  712. }
  713. AttributeProto::AttributeProto(const AttributeProto& from)
  714. : ::PROTOBUF_NAMESPACE_ID::Message(),
  715. _has_bits_(from._has_bits_),
  716. floats_(from.floats_),
  717. ints_(from.ints_),
  718. strings_(from.strings_),
  719. tensors_(from.tensors_),
  720. graphs_(from.graphs_) {
  721. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  722. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  723. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  724. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  725. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  726. if (from._internal_has_name()) {
  727. name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
  728. GetArenaForAllocation());
  729. }
  730. s_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  731. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  732. s_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  733. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  734. if (from._internal_has_s()) {
  735. s_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_s(),
  736. GetArenaForAllocation());
  737. }
  738. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  739. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  740. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  741. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  742. if (from._internal_has_doc_string()) {
  743. doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
  744. GetArenaForAllocation());
  745. }
  746. ref_attr_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  747. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  748. ref_attr_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  749. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  750. if (from._internal_has_ref_attr_name()) {
  751. ref_attr_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_ref_attr_name(),
  752. GetArenaForAllocation());
  753. }
  754. if (from._internal_has_t()) {
  755. t_ = new ::opencv_onnx::TensorProto(*from.t_);
  756. } else {
  757. t_ = nullptr;
  758. }
  759. if (from._internal_has_g()) {
  760. g_ = new ::opencv_onnx::GraphProto(*from.g_);
  761. } else {
  762. g_ = nullptr;
  763. }
  764. ::memcpy(&i_, &from.i_,
  765. static_cast<size_t>(reinterpret_cast<char*>(&type_) -
  766. reinterpret_cast<char*>(&i_)) + sizeof(type_));
  767. // @@protoc_insertion_point(copy_constructor:opencv_onnx.AttributeProto)
  768. }
  769. inline void AttributeProto::SharedCtor() {
  770. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  771. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  772. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  773. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  774. s_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  775. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  776. s_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  777. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  778. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  779. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  780. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  781. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  782. ref_attr_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  783. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  784. ref_attr_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  785. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  786. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  787. reinterpret_cast<char*>(&t_) - reinterpret_cast<char*>(this)),
  788. 0, static_cast<size_t>(reinterpret_cast<char*>(&type_) -
  789. reinterpret_cast<char*>(&t_)) + sizeof(type_));
  790. }
  791. AttributeProto::~AttributeProto() {
  792. // @@protoc_insertion_point(destructor:opencv_onnx.AttributeProto)
  793. if (GetArenaForAllocation() != nullptr) return;
  794. SharedDtor();
  795. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  796. }
  797. inline void AttributeProto::SharedDtor() {
  798. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  799. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  800. s_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  801. doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  802. ref_attr_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  803. if (this != internal_default_instance()) delete t_;
  804. if (this != internal_default_instance()) delete g_;
  805. }
  806. void AttributeProto::ArenaDtor(void* object) {
  807. AttributeProto* _this = reinterpret_cast< AttributeProto* >(object);
  808. (void)_this;
  809. }
  810. void AttributeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  811. }
  812. void AttributeProto::SetCachedSize(int size) const {
  813. _cached_size_.Set(size);
  814. }
  815. void AttributeProto::Clear() {
  816. // @@protoc_insertion_point(message_clear_start:opencv_onnx.AttributeProto)
  817. uint32_t cached_has_bits = 0;
  818. // Prevent compiler warnings about cached_has_bits being unused
  819. (void) cached_has_bits;
  820. floats_.Clear();
  821. ints_.Clear();
  822. strings_.Clear();
  823. tensors_.Clear();
  824. graphs_.Clear();
  825. cached_has_bits = _has_bits_[0];
  826. if (cached_has_bits & 0x0000003fu) {
  827. if (cached_has_bits & 0x00000001u) {
  828. name_.ClearNonDefaultToEmpty();
  829. }
  830. if (cached_has_bits & 0x00000002u) {
  831. s_.ClearNonDefaultToEmpty();
  832. }
  833. if (cached_has_bits & 0x00000004u) {
  834. doc_string_.ClearNonDefaultToEmpty();
  835. }
  836. if (cached_has_bits & 0x00000008u) {
  837. ref_attr_name_.ClearNonDefaultToEmpty();
  838. }
  839. if (cached_has_bits & 0x00000010u) {
  840. GOOGLE_DCHECK(t_ != nullptr);
  841. t_->Clear();
  842. }
  843. if (cached_has_bits & 0x00000020u) {
  844. GOOGLE_DCHECK(g_ != nullptr);
  845. g_->Clear();
  846. }
  847. }
  848. if (cached_has_bits & 0x000000c0u) {
  849. ::memset(&i_, 0, static_cast<size_t>(
  850. reinterpret_cast<char*>(&f_) -
  851. reinterpret_cast<char*>(&i_)) + sizeof(f_));
  852. }
  853. type_ = 0;
  854. _has_bits_.Clear();
  855. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  856. }
  857. const char* AttributeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  858. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  859. _Internal::HasBits has_bits{};
  860. while (!ctx->Done(&ptr)) {
  861. uint32_t tag;
  862. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  863. switch (tag >> 3) {
  864. // optional string name = 1;
  865. case 1:
  866. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  867. auto str = _internal_mutable_name();
  868. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  869. #ifndef NDEBUG
  870. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.AttributeProto.name");
  871. #endif // !NDEBUG
  872. CHK_(ptr);
  873. } else
  874. goto handle_unusual;
  875. continue;
  876. // optional float f = 2;
  877. case 2:
  878. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
  879. _Internal::set_has_f(&has_bits);
  880. f_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
  881. ptr += sizeof(float);
  882. } else
  883. goto handle_unusual;
  884. continue;
  885. // optional int64 i = 3;
  886. case 3:
  887. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
  888. _Internal::set_has_i(&has_bits);
  889. i_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  890. CHK_(ptr);
  891. } else
  892. goto handle_unusual;
  893. continue;
  894. // optional bytes s = 4;
  895. case 4:
  896. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
  897. auto str = _internal_mutable_s();
  898. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  899. CHK_(ptr);
  900. } else
  901. goto handle_unusual;
  902. continue;
  903. // optional .opencv_onnx.TensorProto t = 5;
  904. case 5:
  905. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
  906. ptr = ctx->ParseMessage(_internal_mutable_t(), ptr);
  907. CHK_(ptr);
  908. } else
  909. goto handle_unusual;
  910. continue;
  911. // optional .opencv_onnx.GraphProto g = 6;
  912. case 6:
  913. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
  914. ptr = ctx->ParseMessage(_internal_mutable_g(), ptr);
  915. CHK_(ptr);
  916. } else
  917. goto handle_unusual;
  918. continue;
  919. // repeated float floats = 7;
  920. case 7:
  921. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
  922. ptr -= 1;
  923. do {
  924. ptr += 1;
  925. _internal_add_floats(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
  926. ptr += sizeof(float);
  927. if (!ctx->DataAvailable(ptr)) break;
  928. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<61>(ptr));
  929. } else if (static_cast<uint8_t>(tag) == 58) {
  930. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_floats(), ptr, ctx);
  931. CHK_(ptr);
  932. } else
  933. goto handle_unusual;
  934. continue;
  935. // repeated int64 ints = 8;
  936. case 8:
  937. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
  938. ptr -= 1;
  939. do {
  940. ptr += 1;
  941. _internal_add_ints(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
  942. CHK_(ptr);
  943. if (!ctx->DataAvailable(ptr)) break;
  944. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<64>(ptr));
  945. } else if (static_cast<uint8_t>(tag) == 66) {
  946. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_ints(), ptr, ctx);
  947. CHK_(ptr);
  948. } else
  949. goto handle_unusual;
  950. continue;
  951. // repeated bytes strings = 9;
  952. case 9:
  953. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
  954. ptr -= 1;
  955. do {
  956. ptr += 1;
  957. auto str = _internal_add_strings();
  958. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  959. CHK_(ptr);
  960. if (!ctx->DataAvailable(ptr)) break;
  961. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
  962. } else
  963. goto handle_unusual;
  964. continue;
  965. // repeated .opencv_onnx.TensorProto tensors = 10;
  966. case 10:
  967. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
  968. ptr -= 1;
  969. do {
  970. ptr += 1;
  971. ptr = ctx->ParseMessage(_internal_add_tensors(), ptr);
  972. CHK_(ptr);
  973. if (!ctx->DataAvailable(ptr)) break;
  974. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr));
  975. } else
  976. goto handle_unusual;
  977. continue;
  978. // repeated .opencv_onnx.GraphProto graphs = 11;
  979. case 11:
  980. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
  981. ptr -= 1;
  982. do {
  983. ptr += 1;
  984. ptr = ctx->ParseMessage(_internal_add_graphs(), ptr);
  985. CHK_(ptr);
  986. if (!ctx->DataAvailable(ptr)) break;
  987. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
  988. } else
  989. goto handle_unusual;
  990. continue;
  991. // optional string doc_string = 13;
  992. case 13:
  993. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
  994. auto str = _internal_mutable_doc_string();
  995. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  996. #ifndef NDEBUG
  997. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.AttributeProto.doc_string");
  998. #endif // !NDEBUG
  999. CHK_(ptr);
  1000. } else
  1001. goto handle_unusual;
  1002. continue;
  1003. // optional .opencv_onnx.AttributeProto.AttributeType type = 20;
  1004. case 20:
  1005. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
  1006. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  1007. CHK_(ptr);
  1008. if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::AttributeProto_AttributeType_IsValid(val))) {
  1009. _internal_set_type(static_cast<::opencv_onnx::AttributeProto_AttributeType>(val));
  1010. } else {
  1011. ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(20, val, mutable_unknown_fields());
  1012. }
  1013. } else
  1014. goto handle_unusual;
  1015. continue;
  1016. // optional string ref_attr_name = 21;
  1017. case 21:
  1018. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
  1019. auto str = _internal_mutable_ref_attr_name();
  1020. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1021. #ifndef NDEBUG
  1022. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.AttributeProto.ref_attr_name");
  1023. #endif // !NDEBUG
  1024. CHK_(ptr);
  1025. } else
  1026. goto handle_unusual;
  1027. continue;
  1028. default:
  1029. goto handle_unusual;
  1030. } // switch
  1031. handle_unusual:
  1032. if ((tag == 0) || ((tag & 7) == 4)) {
  1033. CHK_(ptr);
  1034. ctx->SetLastTag(tag);
  1035. goto message_done;
  1036. }
  1037. ptr = UnknownFieldParse(
  1038. tag,
  1039. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1040. ptr, ctx);
  1041. CHK_(ptr != nullptr);
  1042. } // while
  1043. message_done:
  1044. _has_bits_.Or(has_bits);
  1045. return ptr;
  1046. failure:
  1047. ptr = nullptr;
  1048. goto message_done;
  1049. #undef CHK_
  1050. }
  1051. uint8_t* AttributeProto::_InternalSerialize(
  1052. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  1053. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.AttributeProto)
  1054. uint32_t cached_has_bits = 0;
  1055. (void) cached_has_bits;
  1056. cached_has_bits = _has_bits_[0];
  1057. // optional string name = 1;
  1058. if (cached_has_bits & 0x00000001u) {
  1059. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1060. this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
  1061. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1062. "opencv_onnx.AttributeProto.name");
  1063. target = stream->WriteStringMaybeAliased(
  1064. 1, this->_internal_name(), target);
  1065. }
  1066. // optional float f = 2;
  1067. if (cached_has_bits & 0x00000080u) {
  1068. target = stream->EnsureSpace(target);
  1069. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_f(), target);
  1070. }
  1071. // optional int64 i = 3;
  1072. if (cached_has_bits & 0x00000040u) {
  1073. target = stream->EnsureSpace(target);
  1074. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_i(), target);
  1075. }
  1076. // optional bytes s = 4;
  1077. if (cached_has_bits & 0x00000002u) {
  1078. target = stream->WriteBytesMaybeAliased(
  1079. 4, this->_internal_s(), target);
  1080. }
  1081. // optional .opencv_onnx.TensorProto t = 5;
  1082. if (cached_has_bits & 0x00000010u) {
  1083. target = stream->EnsureSpace(target);
  1084. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1085. InternalWriteMessage(
  1086. 5, _Internal::t(this), target, stream);
  1087. }
  1088. // optional .opencv_onnx.GraphProto g = 6;
  1089. if (cached_has_bits & 0x00000020u) {
  1090. target = stream->EnsureSpace(target);
  1091. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1092. InternalWriteMessage(
  1093. 6, _Internal::g(this), target, stream);
  1094. }
  1095. // repeated float floats = 7;
  1096. for (int i = 0, n = this->_internal_floats_size(); i < n; i++) {
  1097. target = stream->EnsureSpace(target);
  1098. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_floats(i), target);
  1099. }
  1100. // repeated int64 ints = 8;
  1101. for (int i = 0, n = this->_internal_ints_size(); i < n; i++) {
  1102. target = stream->EnsureSpace(target);
  1103. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->_internal_ints(i), target);
  1104. }
  1105. // repeated bytes strings = 9;
  1106. for (int i = 0, n = this->_internal_strings_size(); i < n; i++) {
  1107. const auto& s = this->_internal_strings(i);
  1108. target = stream->WriteBytes(9, s, target);
  1109. }
  1110. // repeated .opencv_onnx.TensorProto tensors = 10;
  1111. for (unsigned int i = 0,
  1112. n = static_cast<unsigned int>(this->_internal_tensors_size()); i < n; i++) {
  1113. target = stream->EnsureSpace(target);
  1114. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1115. InternalWriteMessage(10, this->_internal_tensors(i), target, stream);
  1116. }
  1117. // repeated .opencv_onnx.GraphProto graphs = 11;
  1118. for (unsigned int i = 0,
  1119. n = static_cast<unsigned int>(this->_internal_graphs_size()); i < n; i++) {
  1120. target = stream->EnsureSpace(target);
  1121. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1122. InternalWriteMessage(11, this->_internal_graphs(i), target, stream);
  1123. }
  1124. // optional string doc_string = 13;
  1125. if (cached_has_bits & 0x00000004u) {
  1126. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1127. this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
  1128. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1129. "opencv_onnx.AttributeProto.doc_string");
  1130. target = stream->WriteStringMaybeAliased(
  1131. 13, this->_internal_doc_string(), target);
  1132. }
  1133. // optional .opencv_onnx.AttributeProto.AttributeType type = 20;
  1134. if (cached_has_bits & 0x00000100u) {
  1135. target = stream->EnsureSpace(target);
  1136. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
  1137. 20, this->_internal_type(), target);
  1138. }
  1139. // optional string ref_attr_name = 21;
  1140. if (cached_has_bits & 0x00000008u) {
  1141. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1142. this->_internal_ref_attr_name().data(), static_cast<int>(this->_internal_ref_attr_name().length()),
  1143. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1144. "opencv_onnx.AttributeProto.ref_attr_name");
  1145. target = stream->WriteStringMaybeAliased(
  1146. 21, this->_internal_ref_attr_name(), target);
  1147. }
  1148. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1149. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  1150. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  1151. }
  1152. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.AttributeProto)
  1153. return target;
  1154. }
  1155. size_t AttributeProto::ByteSizeLong() const {
  1156. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.AttributeProto)
  1157. size_t total_size = 0;
  1158. uint32_t cached_has_bits = 0;
  1159. // Prevent compiler warnings about cached_has_bits being unused
  1160. (void) cached_has_bits;
  1161. // repeated float floats = 7;
  1162. {
  1163. unsigned int count = static_cast<unsigned int>(this->_internal_floats_size());
  1164. size_t data_size = 4UL * count;
  1165. total_size += 1 *
  1166. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_floats_size());
  1167. total_size += data_size;
  1168. }
  1169. // repeated int64 ints = 8;
  1170. {
  1171. size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1172. Int64Size(this->ints_);
  1173. total_size += 1 *
  1174. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_ints_size());
  1175. total_size += data_size;
  1176. }
  1177. // repeated bytes strings = 9;
  1178. total_size += 1 *
  1179. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(strings_.size());
  1180. for (int i = 0, n = strings_.size(); i < n; i++) {
  1181. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  1182. strings_.Get(i));
  1183. }
  1184. // repeated .opencv_onnx.TensorProto tensors = 10;
  1185. total_size += 1UL * this->_internal_tensors_size();
  1186. for (const auto& msg : this->tensors_) {
  1187. total_size +=
  1188. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  1189. }
  1190. // repeated .opencv_onnx.GraphProto graphs = 11;
  1191. total_size += 1UL * this->_internal_graphs_size();
  1192. for (const auto& msg : this->graphs_) {
  1193. total_size +=
  1194. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  1195. }
  1196. cached_has_bits = _has_bits_[0];
  1197. if (cached_has_bits & 0x000000ffu) {
  1198. // optional string name = 1;
  1199. if (cached_has_bits & 0x00000001u) {
  1200. total_size += 1 +
  1201. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1202. this->_internal_name());
  1203. }
  1204. // optional bytes s = 4;
  1205. if (cached_has_bits & 0x00000002u) {
  1206. total_size += 1 +
  1207. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  1208. this->_internal_s());
  1209. }
  1210. // optional string doc_string = 13;
  1211. if (cached_has_bits & 0x00000004u) {
  1212. total_size += 1 +
  1213. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1214. this->_internal_doc_string());
  1215. }
  1216. // optional string ref_attr_name = 21;
  1217. if (cached_has_bits & 0x00000008u) {
  1218. total_size += 2 +
  1219. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1220. this->_internal_ref_attr_name());
  1221. }
  1222. // optional .opencv_onnx.TensorProto t = 5;
  1223. if (cached_has_bits & 0x00000010u) {
  1224. total_size += 1 +
  1225. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1226. *t_);
  1227. }
  1228. // optional .opencv_onnx.GraphProto g = 6;
  1229. if (cached_has_bits & 0x00000020u) {
  1230. total_size += 1 +
  1231. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1232. *g_);
  1233. }
  1234. // optional int64 i = 3;
  1235. if (cached_has_bits & 0x00000040u) {
  1236. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_i());
  1237. }
  1238. // optional float f = 2;
  1239. if (cached_has_bits & 0x00000080u) {
  1240. total_size += 1 + 4;
  1241. }
  1242. }
  1243. // optional .opencv_onnx.AttributeProto.AttributeType type = 20;
  1244. if (cached_has_bits & 0x00000100u) {
  1245. total_size += 2 +
  1246. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type());
  1247. }
  1248. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  1249. }
  1250. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AttributeProto::_class_data_ = {
  1251. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  1252. AttributeProto::MergeImpl
  1253. };
  1254. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AttributeProto::GetClassData() const { return &_class_data_; }
  1255. void AttributeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  1256. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1257. static_cast<AttributeProto *>(to)->MergeFrom(
  1258. static_cast<const AttributeProto &>(from));
  1259. }
  1260. void AttributeProto::MergeFrom(const AttributeProto& from) {
  1261. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.AttributeProto)
  1262. GOOGLE_DCHECK_NE(&from, this);
  1263. uint32_t cached_has_bits = 0;
  1264. (void) cached_has_bits;
  1265. floats_.MergeFrom(from.floats_);
  1266. ints_.MergeFrom(from.ints_);
  1267. strings_.MergeFrom(from.strings_);
  1268. tensors_.MergeFrom(from.tensors_);
  1269. graphs_.MergeFrom(from.graphs_);
  1270. cached_has_bits = from._has_bits_[0];
  1271. if (cached_has_bits & 0x000000ffu) {
  1272. if (cached_has_bits & 0x00000001u) {
  1273. _internal_set_name(from._internal_name());
  1274. }
  1275. if (cached_has_bits & 0x00000002u) {
  1276. _internal_set_s(from._internal_s());
  1277. }
  1278. if (cached_has_bits & 0x00000004u) {
  1279. _internal_set_doc_string(from._internal_doc_string());
  1280. }
  1281. if (cached_has_bits & 0x00000008u) {
  1282. _internal_set_ref_attr_name(from._internal_ref_attr_name());
  1283. }
  1284. if (cached_has_bits & 0x00000010u) {
  1285. _internal_mutable_t()->::opencv_onnx::TensorProto::MergeFrom(from._internal_t());
  1286. }
  1287. if (cached_has_bits & 0x00000020u) {
  1288. _internal_mutable_g()->::opencv_onnx::GraphProto::MergeFrom(from._internal_g());
  1289. }
  1290. if (cached_has_bits & 0x00000040u) {
  1291. i_ = from.i_;
  1292. }
  1293. if (cached_has_bits & 0x00000080u) {
  1294. f_ = from.f_;
  1295. }
  1296. _has_bits_[0] |= cached_has_bits;
  1297. }
  1298. if (cached_has_bits & 0x00000100u) {
  1299. _internal_set_type(from._internal_type());
  1300. }
  1301. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1302. }
  1303. void AttributeProto::CopyFrom(const AttributeProto& from) {
  1304. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.AttributeProto)
  1305. if (&from == this) return;
  1306. Clear();
  1307. MergeFrom(from);
  1308. }
  1309. bool AttributeProto::IsInitialized() const {
  1310. return true;
  1311. }
  1312. void AttributeProto::InternalSwap(AttributeProto* other) {
  1313. using std::swap;
  1314. auto* lhs_arena = GetArenaForAllocation();
  1315. auto* rhs_arena = other->GetArenaForAllocation();
  1316. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1317. swap(_has_bits_[0], other->_has_bits_[0]);
  1318. floats_.InternalSwap(&other->floats_);
  1319. ints_.InternalSwap(&other->ints_);
  1320. strings_.InternalSwap(&other->strings_);
  1321. tensors_.InternalSwap(&other->tensors_);
  1322. graphs_.InternalSwap(&other->graphs_);
  1323. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  1324. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  1325. &name_, lhs_arena,
  1326. &other->name_, rhs_arena
  1327. );
  1328. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  1329. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  1330. &s_, lhs_arena,
  1331. &other->s_, rhs_arena
  1332. );
  1333. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  1334. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  1335. &doc_string_, lhs_arena,
  1336. &other->doc_string_, rhs_arena
  1337. );
  1338. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  1339. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  1340. &ref_attr_name_, lhs_arena,
  1341. &other->ref_attr_name_, rhs_arena
  1342. );
  1343. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  1344. PROTOBUF_FIELD_OFFSET(AttributeProto, type_)
  1345. + sizeof(AttributeProto::type_)
  1346. - PROTOBUF_FIELD_OFFSET(AttributeProto, t_)>(
  1347. reinterpret_cast<char*>(&t_),
  1348. reinterpret_cast<char*>(&other->t_));
  1349. }
  1350. ::PROTOBUF_NAMESPACE_ID::Metadata AttributeProto::GetMetadata() const {
  1351. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  1352. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  1353. file_level_metadata_opencv_2donnx_2eproto[0]);
  1354. }
  1355. // ===================================================================
  1356. class ValueInfoProto::_Internal {
  1357. public:
  1358. using HasBits = decltype(std::declval<ValueInfoProto>()._has_bits_);
  1359. static void set_has_name(HasBits* has_bits) {
  1360. (*has_bits)[0] |= 1u;
  1361. }
  1362. static const ::opencv_onnx::TypeProto& type(const ValueInfoProto* msg);
  1363. static void set_has_type(HasBits* has_bits) {
  1364. (*has_bits)[0] |= 4u;
  1365. }
  1366. static void set_has_doc_string(HasBits* has_bits) {
  1367. (*has_bits)[0] |= 2u;
  1368. }
  1369. };
  1370. const ::opencv_onnx::TypeProto&
  1371. ValueInfoProto::_Internal::type(const ValueInfoProto* msg) {
  1372. return *msg->type_;
  1373. }
  1374. ValueInfoProto::ValueInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  1375. bool is_message_owned)
  1376. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  1377. SharedCtor();
  1378. if (!is_message_owned) {
  1379. RegisterArenaDtor(arena);
  1380. }
  1381. // @@protoc_insertion_point(arena_constructor:opencv_onnx.ValueInfoProto)
  1382. }
  1383. ValueInfoProto::ValueInfoProto(const ValueInfoProto& from)
  1384. : ::PROTOBUF_NAMESPACE_ID::Message(),
  1385. _has_bits_(from._has_bits_) {
  1386. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1387. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1388. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1389. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1390. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1391. if (from._internal_has_name()) {
  1392. name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
  1393. GetArenaForAllocation());
  1394. }
  1395. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1396. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1397. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1398. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1399. if (from._internal_has_doc_string()) {
  1400. doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
  1401. GetArenaForAllocation());
  1402. }
  1403. if (from._internal_has_type()) {
  1404. type_ = new ::opencv_onnx::TypeProto(*from.type_);
  1405. } else {
  1406. type_ = nullptr;
  1407. }
  1408. // @@protoc_insertion_point(copy_constructor:opencv_onnx.ValueInfoProto)
  1409. }
  1410. inline void ValueInfoProto::SharedCtor() {
  1411. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1412. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1413. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1414. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1415. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1416. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1417. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1418. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1419. type_ = nullptr;
  1420. }
  1421. ValueInfoProto::~ValueInfoProto() {
  1422. // @@protoc_insertion_point(destructor:opencv_onnx.ValueInfoProto)
  1423. if (GetArenaForAllocation() != nullptr) return;
  1424. SharedDtor();
  1425. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1426. }
  1427. inline void ValueInfoProto::SharedDtor() {
  1428. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  1429. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1430. doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1431. if (this != internal_default_instance()) delete type_;
  1432. }
  1433. void ValueInfoProto::ArenaDtor(void* object) {
  1434. ValueInfoProto* _this = reinterpret_cast< ValueInfoProto* >(object);
  1435. (void)_this;
  1436. }
  1437. void ValueInfoProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  1438. }
  1439. void ValueInfoProto::SetCachedSize(int size) const {
  1440. _cached_size_.Set(size);
  1441. }
  1442. void ValueInfoProto::Clear() {
  1443. // @@protoc_insertion_point(message_clear_start:opencv_onnx.ValueInfoProto)
  1444. uint32_t cached_has_bits = 0;
  1445. // Prevent compiler warnings about cached_has_bits being unused
  1446. (void) cached_has_bits;
  1447. cached_has_bits = _has_bits_[0];
  1448. if (cached_has_bits & 0x00000007u) {
  1449. if (cached_has_bits & 0x00000001u) {
  1450. name_.ClearNonDefaultToEmpty();
  1451. }
  1452. if (cached_has_bits & 0x00000002u) {
  1453. doc_string_.ClearNonDefaultToEmpty();
  1454. }
  1455. if (cached_has_bits & 0x00000004u) {
  1456. GOOGLE_DCHECK(type_ != nullptr);
  1457. type_->Clear();
  1458. }
  1459. }
  1460. _has_bits_.Clear();
  1461. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1462. }
  1463. const char* ValueInfoProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  1464. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  1465. _Internal::HasBits has_bits{};
  1466. while (!ctx->Done(&ptr)) {
  1467. uint32_t tag;
  1468. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  1469. switch (tag >> 3) {
  1470. // optional string name = 1;
  1471. case 1:
  1472. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  1473. auto str = _internal_mutable_name();
  1474. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1475. #ifndef NDEBUG
  1476. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ValueInfoProto.name");
  1477. #endif // !NDEBUG
  1478. CHK_(ptr);
  1479. } else
  1480. goto handle_unusual;
  1481. continue;
  1482. // optional .opencv_onnx.TypeProto type = 2;
  1483. case 2:
  1484. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  1485. ptr = ctx->ParseMessage(_internal_mutable_type(), ptr);
  1486. CHK_(ptr);
  1487. } else
  1488. goto handle_unusual;
  1489. continue;
  1490. // optional string doc_string = 3;
  1491. case 3:
  1492. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
  1493. auto str = _internal_mutable_doc_string();
  1494. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1495. #ifndef NDEBUG
  1496. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ValueInfoProto.doc_string");
  1497. #endif // !NDEBUG
  1498. CHK_(ptr);
  1499. } else
  1500. goto handle_unusual;
  1501. continue;
  1502. default:
  1503. goto handle_unusual;
  1504. } // switch
  1505. handle_unusual:
  1506. if ((tag == 0) || ((tag & 7) == 4)) {
  1507. CHK_(ptr);
  1508. ctx->SetLastTag(tag);
  1509. goto message_done;
  1510. }
  1511. ptr = UnknownFieldParse(
  1512. tag,
  1513. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1514. ptr, ctx);
  1515. CHK_(ptr != nullptr);
  1516. } // while
  1517. message_done:
  1518. _has_bits_.Or(has_bits);
  1519. return ptr;
  1520. failure:
  1521. ptr = nullptr;
  1522. goto message_done;
  1523. #undef CHK_
  1524. }
  1525. uint8_t* ValueInfoProto::_InternalSerialize(
  1526. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  1527. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ValueInfoProto)
  1528. uint32_t cached_has_bits = 0;
  1529. (void) cached_has_bits;
  1530. cached_has_bits = _has_bits_[0];
  1531. // optional string name = 1;
  1532. if (cached_has_bits & 0x00000001u) {
  1533. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1534. this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
  1535. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1536. "opencv_onnx.ValueInfoProto.name");
  1537. target = stream->WriteStringMaybeAliased(
  1538. 1, this->_internal_name(), target);
  1539. }
  1540. // optional .opencv_onnx.TypeProto type = 2;
  1541. if (cached_has_bits & 0x00000004u) {
  1542. target = stream->EnsureSpace(target);
  1543. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1544. InternalWriteMessage(
  1545. 2, _Internal::type(this), target, stream);
  1546. }
  1547. // optional string doc_string = 3;
  1548. if (cached_has_bits & 0x00000002u) {
  1549. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1550. this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
  1551. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1552. "opencv_onnx.ValueInfoProto.doc_string");
  1553. target = stream->WriteStringMaybeAliased(
  1554. 3, this->_internal_doc_string(), target);
  1555. }
  1556. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1557. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  1558. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  1559. }
  1560. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ValueInfoProto)
  1561. return target;
  1562. }
  1563. size_t ValueInfoProto::ByteSizeLong() const {
  1564. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ValueInfoProto)
  1565. size_t total_size = 0;
  1566. uint32_t cached_has_bits = 0;
  1567. // Prevent compiler warnings about cached_has_bits being unused
  1568. (void) cached_has_bits;
  1569. cached_has_bits = _has_bits_[0];
  1570. if (cached_has_bits & 0x00000007u) {
  1571. // optional string name = 1;
  1572. if (cached_has_bits & 0x00000001u) {
  1573. total_size += 1 +
  1574. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1575. this->_internal_name());
  1576. }
  1577. // optional string doc_string = 3;
  1578. if (cached_has_bits & 0x00000002u) {
  1579. total_size += 1 +
  1580. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1581. this->_internal_doc_string());
  1582. }
  1583. // optional .opencv_onnx.TypeProto type = 2;
  1584. if (cached_has_bits & 0x00000004u) {
  1585. total_size += 1 +
  1586. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1587. *type_);
  1588. }
  1589. }
  1590. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  1591. }
  1592. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ValueInfoProto::_class_data_ = {
  1593. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  1594. ValueInfoProto::MergeImpl
  1595. };
  1596. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ValueInfoProto::GetClassData() const { return &_class_data_; }
  1597. void ValueInfoProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  1598. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1599. static_cast<ValueInfoProto *>(to)->MergeFrom(
  1600. static_cast<const ValueInfoProto &>(from));
  1601. }
  1602. void ValueInfoProto::MergeFrom(const ValueInfoProto& from) {
  1603. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ValueInfoProto)
  1604. GOOGLE_DCHECK_NE(&from, this);
  1605. uint32_t cached_has_bits = 0;
  1606. (void) cached_has_bits;
  1607. cached_has_bits = from._has_bits_[0];
  1608. if (cached_has_bits & 0x00000007u) {
  1609. if (cached_has_bits & 0x00000001u) {
  1610. _internal_set_name(from._internal_name());
  1611. }
  1612. if (cached_has_bits & 0x00000002u) {
  1613. _internal_set_doc_string(from._internal_doc_string());
  1614. }
  1615. if (cached_has_bits & 0x00000004u) {
  1616. _internal_mutable_type()->::opencv_onnx::TypeProto::MergeFrom(from._internal_type());
  1617. }
  1618. }
  1619. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1620. }
  1621. void ValueInfoProto::CopyFrom(const ValueInfoProto& from) {
  1622. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ValueInfoProto)
  1623. if (&from == this) return;
  1624. Clear();
  1625. MergeFrom(from);
  1626. }
  1627. bool ValueInfoProto::IsInitialized() const {
  1628. return true;
  1629. }
  1630. void ValueInfoProto::InternalSwap(ValueInfoProto* other) {
  1631. using std::swap;
  1632. auto* lhs_arena = GetArenaForAllocation();
  1633. auto* rhs_arena = other->GetArenaForAllocation();
  1634. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1635. swap(_has_bits_[0], other->_has_bits_[0]);
  1636. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  1637. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  1638. &name_, lhs_arena,
  1639. &other->name_, rhs_arena
  1640. );
  1641. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  1642. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  1643. &doc_string_, lhs_arena,
  1644. &other->doc_string_, rhs_arena
  1645. );
  1646. swap(type_, other->type_);
  1647. }
  1648. ::PROTOBUF_NAMESPACE_ID::Metadata ValueInfoProto::GetMetadata() const {
  1649. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  1650. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  1651. file_level_metadata_opencv_2donnx_2eproto[1]);
  1652. }
  1653. // ===================================================================
  1654. class NodeProto::_Internal {
  1655. public:
  1656. using HasBits = decltype(std::declval<NodeProto>()._has_bits_);
  1657. static void set_has_name(HasBits* has_bits) {
  1658. (*has_bits)[0] |= 1u;
  1659. }
  1660. static void set_has_op_type(HasBits* has_bits) {
  1661. (*has_bits)[0] |= 2u;
  1662. }
  1663. static void set_has_domain(HasBits* has_bits) {
  1664. (*has_bits)[0] |= 8u;
  1665. }
  1666. static void set_has_doc_string(HasBits* has_bits) {
  1667. (*has_bits)[0] |= 4u;
  1668. }
  1669. };
  1670. NodeProto::NodeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  1671. bool is_message_owned)
  1672. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  1673. input_(arena),
  1674. output_(arena),
  1675. attribute_(arena) {
  1676. SharedCtor();
  1677. if (!is_message_owned) {
  1678. RegisterArenaDtor(arena);
  1679. }
  1680. // @@protoc_insertion_point(arena_constructor:opencv_onnx.NodeProto)
  1681. }
  1682. NodeProto::NodeProto(const NodeProto& from)
  1683. : ::PROTOBUF_NAMESPACE_ID::Message(),
  1684. _has_bits_(from._has_bits_),
  1685. input_(from.input_),
  1686. output_(from.output_),
  1687. attribute_(from.attribute_) {
  1688. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1689. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1690. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1691. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1692. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1693. if (from._internal_has_name()) {
  1694. name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
  1695. GetArenaForAllocation());
  1696. }
  1697. op_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1698. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1699. op_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1700. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1701. if (from._internal_has_op_type()) {
  1702. op_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_op_type(),
  1703. GetArenaForAllocation());
  1704. }
  1705. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1706. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1707. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1708. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1709. if (from._internal_has_doc_string()) {
  1710. doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
  1711. GetArenaForAllocation());
  1712. }
  1713. domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1714. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1715. domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1716. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1717. if (from._internal_has_domain()) {
  1718. domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(),
  1719. GetArenaForAllocation());
  1720. }
  1721. // @@protoc_insertion_point(copy_constructor:opencv_onnx.NodeProto)
  1722. }
  1723. inline void NodeProto::SharedCtor() {
  1724. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1725. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1726. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1727. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1728. op_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1729. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1730. op_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1731. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1732. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1733. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1734. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1735. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1736. domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1737. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1738. domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1739. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1740. }
  1741. NodeProto::~NodeProto() {
  1742. // @@protoc_insertion_point(destructor:opencv_onnx.NodeProto)
  1743. if (GetArenaForAllocation() != nullptr) return;
  1744. SharedDtor();
  1745. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1746. }
  1747. inline void NodeProto::SharedDtor() {
  1748. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  1749. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1750. op_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1751. doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1752. domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1753. }
  1754. void NodeProto::ArenaDtor(void* object) {
  1755. NodeProto* _this = reinterpret_cast< NodeProto* >(object);
  1756. (void)_this;
  1757. }
  1758. void NodeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  1759. }
  1760. void NodeProto::SetCachedSize(int size) const {
  1761. _cached_size_.Set(size);
  1762. }
  1763. void NodeProto::Clear() {
  1764. // @@protoc_insertion_point(message_clear_start:opencv_onnx.NodeProto)
  1765. uint32_t cached_has_bits = 0;
  1766. // Prevent compiler warnings about cached_has_bits being unused
  1767. (void) cached_has_bits;
  1768. input_.Clear();
  1769. output_.Clear();
  1770. attribute_.Clear();
  1771. cached_has_bits = _has_bits_[0];
  1772. if (cached_has_bits & 0x0000000fu) {
  1773. if (cached_has_bits & 0x00000001u) {
  1774. name_.ClearNonDefaultToEmpty();
  1775. }
  1776. if (cached_has_bits & 0x00000002u) {
  1777. op_type_.ClearNonDefaultToEmpty();
  1778. }
  1779. if (cached_has_bits & 0x00000004u) {
  1780. doc_string_.ClearNonDefaultToEmpty();
  1781. }
  1782. if (cached_has_bits & 0x00000008u) {
  1783. domain_.ClearNonDefaultToEmpty();
  1784. }
  1785. }
  1786. _has_bits_.Clear();
  1787. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1788. }
  1789. const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  1790. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  1791. _Internal::HasBits has_bits{};
  1792. while (!ctx->Done(&ptr)) {
  1793. uint32_t tag;
  1794. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  1795. switch (tag >> 3) {
  1796. // repeated string input = 1;
  1797. case 1:
  1798. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  1799. ptr -= 1;
  1800. do {
  1801. ptr += 1;
  1802. auto str = _internal_add_input();
  1803. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1804. #ifndef NDEBUG
  1805. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.input");
  1806. #endif // !NDEBUG
  1807. CHK_(ptr);
  1808. if (!ctx->DataAvailable(ptr)) break;
  1809. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
  1810. } else
  1811. goto handle_unusual;
  1812. continue;
  1813. // repeated string output = 2;
  1814. case 2:
  1815. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  1816. ptr -= 1;
  1817. do {
  1818. ptr += 1;
  1819. auto str = _internal_add_output();
  1820. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1821. #ifndef NDEBUG
  1822. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.output");
  1823. #endif // !NDEBUG
  1824. CHK_(ptr);
  1825. if (!ctx->DataAvailable(ptr)) break;
  1826. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
  1827. } else
  1828. goto handle_unusual;
  1829. continue;
  1830. // optional string name = 3;
  1831. case 3:
  1832. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
  1833. auto str = _internal_mutable_name();
  1834. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1835. #ifndef NDEBUG
  1836. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.name");
  1837. #endif // !NDEBUG
  1838. CHK_(ptr);
  1839. } else
  1840. goto handle_unusual;
  1841. continue;
  1842. // optional string op_type = 4;
  1843. case 4:
  1844. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
  1845. auto str = _internal_mutable_op_type();
  1846. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1847. #ifndef NDEBUG
  1848. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.op_type");
  1849. #endif // !NDEBUG
  1850. CHK_(ptr);
  1851. } else
  1852. goto handle_unusual;
  1853. continue;
  1854. // repeated .opencv_onnx.AttributeProto attribute = 5;
  1855. case 5:
  1856. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
  1857. ptr -= 1;
  1858. do {
  1859. ptr += 1;
  1860. ptr = ctx->ParseMessage(_internal_add_attribute(), ptr);
  1861. CHK_(ptr);
  1862. if (!ctx->DataAvailable(ptr)) break;
  1863. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
  1864. } else
  1865. goto handle_unusual;
  1866. continue;
  1867. // optional string doc_string = 6;
  1868. case 6:
  1869. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
  1870. auto str = _internal_mutable_doc_string();
  1871. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1872. #ifndef NDEBUG
  1873. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.doc_string");
  1874. #endif // !NDEBUG
  1875. CHK_(ptr);
  1876. } else
  1877. goto handle_unusual;
  1878. continue;
  1879. // optional string domain = 7;
  1880. case 7:
  1881. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
  1882. auto str = _internal_mutable_domain();
  1883. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1884. #ifndef NDEBUG
  1885. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.domain");
  1886. #endif // !NDEBUG
  1887. CHK_(ptr);
  1888. } else
  1889. goto handle_unusual;
  1890. continue;
  1891. default:
  1892. goto handle_unusual;
  1893. } // switch
  1894. handle_unusual:
  1895. if ((tag == 0) || ((tag & 7) == 4)) {
  1896. CHK_(ptr);
  1897. ctx->SetLastTag(tag);
  1898. goto message_done;
  1899. }
  1900. ptr = UnknownFieldParse(
  1901. tag,
  1902. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1903. ptr, ctx);
  1904. CHK_(ptr != nullptr);
  1905. } // while
  1906. message_done:
  1907. _has_bits_.Or(has_bits);
  1908. return ptr;
  1909. failure:
  1910. ptr = nullptr;
  1911. goto message_done;
  1912. #undef CHK_
  1913. }
  1914. uint8_t* NodeProto::_InternalSerialize(
  1915. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  1916. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.NodeProto)
  1917. uint32_t cached_has_bits = 0;
  1918. (void) cached_has_bits;
  1919. // repeated string input = 1;
  1920. for (int i = 0, n = this->_internal_input_size(); i < n; i++) {
  1921. const auto& s = this->_internal_input(i);
  1922. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1923. s.data(), static_cast<int>(s.length()),
  1924. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1925. "opencv_onnx.NodeProto.input");
  1926. target = stream->WriteString(1, s, target);
  1927. }
  1928. // repeated string output = 2;
  1929. for (int i = 0, n = this->_internal_output_size(); i < n; i++) {
  1930. const auto& s = this->_internal_output(i);
  1931. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1932. s.data(), static_cast<int>(s.length()),
  1933. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1934. "opencv_onnx.NodeProto.output");
  1935. target = stream->WriteString(2, s, target);
  1936. }
  1937. cached_has_bits = _has_bits_[0];
  1938. // optional string name = 3;
  1939. if (cached_has_bits & 0x00000001u) {
  1940. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1941. this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
  1942. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1943. "opencv_onnx.NodeProto.name");
  1944. target = stream->WriteStringMaybeAliased(
  1945. 3, this->_internal_name(), target);
  1946. }
  1947. // optional string op_type = 4;
  1948. if (cached_has_bits & 0x00000002u) {
  1949. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1950. this->_internal_op_type().data(), static_cast<int>(this->_internal_op_type().length()),
  1951. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1952. "opencv_onnx.NodeProto.op_type");
  1953. target = stream->WriteStringMaybeAliased(
  1954. 4, this->_internal_op_type(), target);
  1955. }
  1956. // repeated .opencv_onnx.AttributeProto attribute = 5;
  1957. for (unsigned int i = 0,
  1958. n = static_cast<unsigned int>(this->_internal_attribute_size()); i < n; i++) {
  1959. target = stream->EnsureSpace(target);
  1960. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  1961. InternalWriteMessage(5, this->_internal_attribute(i), target, stream);
  1962. }
  1963. // optional string doc_string = 6;
  1964. if (cached_has_bits & 0x00000004u) {
  1965. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1966. this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
  1967. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1968. "opencv_onnx.NodeProto.doc_string");
  1969. target = stream->WriteStringMaybeAliased(
  1970. 6, this->_internal_doc_string(), target);
  1971. }
  1972. // optional string domain = 7;
  1973. if (cached_has_bits & 0x00000008u) {
  1974. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  1975. this->_internal_domain().data(), static_cast<int>(this->_internal_domain().length()),
  1976. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  1977. "opencv_onnx.NodeProto.domain");
  1978. target = stream->WriteStringMaybeAliased(
  1979. 7, this->_internal_domain(), target);
  1980. }
  1981. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1982. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  1983. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  1984. }
  1985. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.NodeProto)
  1986. return target;
  1987. }
  1988. size_t NodeProto::ByteSizeLong() const {
  1989. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.NodeProto)
  1990. size_t total_size = 0;
  1991. uint32_t cached_has_bits = 0;
  1992. // Prevent compiler warnings about cached_has_bits being unused
  1993. (void) cached_has_bits;
  1994. // repeated string input = 1;
  1995. total_size += 1 *
  1996. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(input_.size());
  1997. for (int i = 0, n = input_.size(); i < n; i++) {
  1998. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1999. input_.Get(i));
  2000. }
  2001. // repeated string output = 2;
  2002. total_size += 1 *
  2003. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(output_.size());
  2004. for (int i = 0, n = output_.size(); i < n; i++) {
  2005. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2006. output_.Get(i));
  2007. }
  2008. // repeated .opencv_onnx.AttributeProto attribute = 5;
  2009. total_size += 1UL * this->_internal_attribute_size();
  2010. for (const auto& msg : this->attribute_) {
  2011. total_size +=
  2012. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  2013. }
  2014. cached_has_bits = _has_bits_[0];
  2015. if (cached_has_bits & 0x0000000fu) {
  2016. // optional string name = 3;
  2017. if (cached_has_bits & 0x00000001u) {
  2018. total_size += 1 +
  2019. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2020. this->_internal_name());
  2021. }
  2022. // optional string op_type = 4;
  2023. if (cached_has_bits & 0x00000002u) {
  2024. total_size += 1 +
  2025. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2026. this->_internal_op_type());
  2027. }
  2028. // optional string doc_string = 6;
  2029. if (cached_has_bits & 0x00000004u) {
  2030. total_size += 1 +
  2031. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2032. this->_internal_doc_string());
  2033. }
  2034. // optional string domain = 7;
  2035. if (cached_has_bits & 0x00000008u) {
  2036. total_size += 1 +
  2037. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2038. this->_internal_domain());
  2039. }
  2040. }
  2041. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  2042. }
  2043. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NodeProto::_class_data_ = {
  2044. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  2045. NodeProto::MergeImpl
  2046. };
  2047. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NodeProto::GetClassData() const { return &_class_data_; }
  2048. void NodeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  2049. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  2050. static_cast<NodeProto *>(to)->MergeFrom(
  2051. static_cast<const NodeProto &>(from));
  2052. }
  2053. void NodeProto::MergeFrom(const NodeProto& from) {
  2054. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.NodeProto)
  2055. GOOGLE_DCHECK_NE(&from, this);
  2056. uint32_t cached_has_bits = 0;
  2057. (void) cached_has_bits;
  2058. input_.MergeFrom(from.input_);
  2059. output_.MergeFrom(from.output_);
  2060. attribute_.MergeFrom(from.attribute_);
  2061. cached_has_bits = from._has_bits_[0];
  2062. if (cached_has_bits & 0x0000000fu) {
  2063. if (cached_has_bits & 0x00000001u) {
  2064. _internal_set_name(from._internal_name());
  2065. }
  2066. if (cached_has_bits & 0x00000002u) {
  2067. _internal_set_op_type(from._internal_op_type());
  2068. }
  2069. if (cached_has_bits & 0x00000004u) {
  2070. _internal_set_doc_string(from._internal_doc_string());
  2071. }
  2072. if (cached_has_bits & 0x00000008u) {
  2073. _internal_set_domain(from._internal_domain());
  2074. }
  2075. }
  2076. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  2077. }
  2078. void NodeProto::CopyFrom(const NodeProto& from) {
  2079. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.NodeProto)
  2080. if (&from == this) return;
  2081. Clear();
  2082. MergeFrom(from);
  2083. }
  2084. bool NodeProto::IsInitialized() const {
  2085. return true;
  2086. }
  2087. void NodeProto::InternalSwap(NodeProto* other) {
  2088. using std::swap;
  2089. auto* lhs_arena = GetArenaForAllocation();
  2090. auto* rhs_arena = other->GetArenaForAllocation();
  2091. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  2092. swap(_has_bits_[0], other->_has_bits_[0]);
  2093. input_.InternalSwap(&other->input_);
  2094. output_.InternalSwap(&other->output_);
  2095. attribute_.InternalSwap(&other->attribute_);
  2096. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  2097. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2098. &name_, lhs_arena,
  2099. &other->name_, rhs_arena
  2100. );
  2101. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  2102. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2103. &op_type_, lhs_arena,
  2104. &other->op_type_, rhs_arena
  2105. );
  2106. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  2107. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2108. &doc_string_, lhs_arena,
  2109. &other->doc_string_, rhs_arena
  2110. );
  2111. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  2112. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2113. &domain_, lhs_arena,
  2114. &other->domain_, rhs_arena
  2115. );
  2116. }
  2117. ::PROTOBUF_NAMESPACE_ID::Metadata NodeProto::GetMetadata() const {
  2118. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  2119. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  2120. file_level_metadata_opencv_2donnx_2eproto[2]);
  2121. }
  2122. // ===================================================================
  2123. class ModelProto::_Internal {
  2124. public:
  2125. using HasBits = decltype(std::declval<ModelProto>()._has_bits_);
  2126. static void set_has_ir_version(HasBits* has_bits) {
  2127. (*has_bits)[0] |= 32u;
  2128. }
  2129. static void set_has_producer_name(HasBits* has_bits) {
  2130. (*has_bits)[0] |= 1u;
  2131. }
  2132. static void set_has_producer_version(HasBits* has_bits) {
  2133. (*has_bits)[0] |= 2u;
  2134. }
  2135. static void set_has_domain(HasBits* has_bits) {
  2136. (*has_bits)[0] |= 4u;
  2137. }
  2138. static void set_has_model_version(HasBits* has_bits) {
  2139. (*has_bits)[0] |= 64u;
  2140. }
  2141. static void set_has_doc_string(HasBits* has_bits) {
  2142. (*has_bits)[0] |= 8u;
  2143. }
  2144. static const ::opencv_onnx::GraphProto& graph(const ModelProto* msg);
  2145. static void set_has_graph(HasBits* has_bits) {
  2146. (*has_bits)[0] |= 16u;
  2147. }
  2148. };
  2149. const ::opencv_onnx::GraphProto&
  2150. ModelProto::_Internal::graph(const ModelProto* msg) {
  2151. return *msg->graph_;
  2152. }
  2153. ModelProto::ModelProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  2154. bool is_message_owned)
  2155. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  2156. opset_import_(arena),
  2157. metadata_props_(arena) {
  2158. SharedCtor();
  2159. if (!is_message_owned) {
  2160. RegisterArenaDtor(arena);
  2161. }
  2162. // @@protoc_insertion_point(arena_constructor:opencv_onnx.ModelProto)
  2163. }
  2164. ModelProto::ModelProto(const ModelProto& from)
  2165. : ::PROTOBUF_NAMESPACE_ID::Message(),
  2166. _has_bits_(from._has_bits_),
  2167. opset_import_(from.opset_import_),
  2168. metadata_props_(from.metadata_props_) {
  2169. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  2170. producer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2171. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2172. producer_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2173. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2174. if (from._internal_has_producer_name()) {
  2175. producer_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_producer_name(),
  2176. GetArenaForAllocation());
  2177. }
  2178. producer_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2179. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2180. producer_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2181. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2182. if (from._internal_has_producer_version()) {
  2183. producer_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_producer_version(),
  2184. GetArenaForAllocation());
  2185. }
  2186. domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2187. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2188. domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2189. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2190. if (from._internal_has_domain()) {
  2191. domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(),
  2192. GetArenaForAllocation());
  2193. }
  2194. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2195. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2196. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2197. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2198. if (from._internal_has_doc_string()) {
  2199. doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
  2200. GetArenaForAllocation());
  2201. }
  2202. if (from._internal_has_graph()) {
  2203. graph_ = new ::opencv_onnx::GraphProto(*from.graph_);
  2204. } else {
  2205. graph_ = nullptr;
  2206. }
  2207. ::memcpy(&ir_version_, &from.ir_version_,
  2208. static_cast<size_t>(reinterpret_cast<char*>(&model_version_) -
  2209. reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
  2210. // @@protoc_insertion_point(copy_constructor:opencv_onnx.ModelProto)
  2211. }
  2212. inline void ModelProto::SharedCtor() {
  2213. producer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2214. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2215. producer_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2216. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2217. producer_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2218. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2219. producer_version_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2220. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2221. domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2222. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2223. domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2224. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2225. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2226. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2227. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2228. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2229. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  2230. reinterpret_cast<char*>(&graph_) - reinterpret_cast<char*>(this)),
  2231. 0, static_cast<size_t>(reinterpret_cast<char*>(&model_version_) -
  2232. reinterpret_cast<char*>(&graph_)) + sizeof(model_version_));
  2233. }
  2234. ModelProto::~ModelProto() {
  2235. // @@protoc_insertion_point(destructor:opencv_onnx.ModelProto)
  2236. if (GetArenaForAllocation() != nullptr) return;
  2237. SharedDtor();
  2238. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  2239. }
  2240. inline void ModelProto::SharedDtor() {
  2241. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  2242. producer_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2243. producer_version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2244. domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2245. doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2246. if (this != internal_default_instance()) delete graph_;
  2247. }
  2248. void ModelProto::ArenaDtor(void* object) {
  2249. ModelProto* _this = reinterpret_cast< ModelProto* >(object);
  2250. (void)_this;
  2251. }
  2252. void ModelProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  2253. }
  2254. void ModelProto::SetCachedSize(int size) const {
  2255. _cached_size_.Set(size);
  2256. }
  2257. void ModelProto::Clear() {
  2258. // @@protoc_insertion_point(message_clear_start:opencv_onnx.ModelProto)
  2259. uint32_t cached_has_bits = 0;
  2260. // Prevent compiler warnings about cached_has_bits being unused
  2261. (void) cached_has_bits;
  2262. opset_import_.Clear();
  2263. metadata_props_.Clear();
  2264. cached_has_bits = _has_bits_[0];
  2265. if (cached_has_bits & 0x0000001fu) {
  2266. if (cached_has_bits & 0x00000001u) {
  2267. producer_name_.ClearNonDefaultToEmpty();
  2268. }
  2269. if (cached_has_bits & 0x00000002u) {
  2270. producer_version_.ClearNonDefaultToEmpty();
  2271. }
  2272. if (cached_has_bits & 0x00000004u) {
  2273. domain_.ClearNonDefaultToEmpty();
  2274. }
  2275. if (cached_has_bits & 0x00000008u) {
  2276. doc_string_.ClearNonDefaultToEmpty();
  2277. }
  2278. if (cached_has_bits & 0x00000010u) {
  2279. GOOGLE_DCHECK(graph_ != nullptr);
  2280. graph_->Clear();
  2281. }
  2282. }
  2283. if (cached_has_bits & 0x00000060u) {
  2284. ::memset(&ir_version_, 0, static_cast<size_t>(
  2285. reinterpret_cast<char*>(&model_version_) -
  2286. reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
  2287. }
  2288. _has_bits_.Clear();
  2289. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  2290. }
  2291. const char* ModelProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  2292. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  2293. _Internal::HasBits has_bits{};
  2294. while (!ctx->Done(&ptr)) {
  2295. uint32_t tag;
  2296. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  2297. switch (tag >> 3) {
  2298. // optional int64 ir_version = 1;
  2299. case 1:
  2300. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
  2301. _Internal::set_has_ir_version(&has_bits);
  2302. ir_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  2303. CHK_(ptr);
  2304. } else
  2305. goto handle_unusual;
  2306. continue;
  2307. // optional string producer_name = 2;
  2308. case 2:
  2309. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  2310. auto str = _internal_mutable_producer_name();
  2311. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  2312. #ifndef NDEBUG
  2313. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.producer_name");
  2314. #endif // !NDEBUG
  2315. CHK_(ptr);
  2316. } else
  2317. goto handle_unusual;
  2318. continue;
  2319. // optional string producer_version = 3;
  2320. case 3:
  2321. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
  2322. auto str = _internal_mutable_producer_version();
  2323. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  2324. #ifndef NDEBUG
  2325. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.producer_version");
  2326. #endif // !NDEBUG
  2327. CHK_(ptr);
  2328. } else
  2329. goto handle_unusual;
  2330. continue;
  2331. // optional string domain = 4;
  2332. case 4:
  2333. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
  2334. auto str = _internal_mutable_domain();
  2335. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  2336. #ifndef NDEBUG
  2337. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.domain");
  2338. #endif // !NDEBUG
  2339. CHK_(ptr);
  2340. } else
  2341. goto handle_unusual;
  2342. continue;
  2343. // optional int64 model_version = 5;
  2344. case 5:
  2345. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
  2346. _Internal::set_has_model_version(&has_bits);
  2347. model_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  2348. CHK_(ptr);
  2349. } else
  2350. goto handle_unusual;
  2351. continue;
  2352. // optional string doc_string = 6;
  2353. case 6:
  2354. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
  2355. auto str = _internal_mutable_doc_string();
  2356. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  2357. #ifndef NDEBUG
  2358. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.doc_string");
  2359. #endif // !NDEBUG
  2360. CHK_(ptr);
  2361. } else
  2362. goto handle_unusual;
  2363. continue;
  2364. // optional .opencv_onnx.GraphProto graph = 7;
  2365. case 7:
  2366. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
  2367. ptr = ctx->ParseMessage(_internal_mutable_graph(), ptr);
  2368. CHK_(ptr);
  2369. } else
  2370. goto handle_unusual;
  2371. continue;
  2372. // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
  2373. case 8:
  2374. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
  2375. ptr -= 1;
  2376. do {
  2377. ptr += 1;
  2378. ptr = ctx->ParseMessage(_internal_add_opset_import(), ptr);
  2379. CHK_(ptr);
  2380. if (!ctx->DataAvailable(ptr)) break;
  2381. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
  2382. } else
  2383. goto handle_unusual;
  2384. continue;
  2385. // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
  2386. case 14:
  2387. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
  2388. ptr -= 1;
  2389. do {
  2390. ptr += 1;
  2391. ptr = ctx->ParseMessage(_internal_add_metadata_props(), ptr);
  2392. CHK_(ptr);
  2393. if (!ctx->DataAvailable(ptr)) break;
  2394. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
  2395. } else
  2396. goto handle_unusual;
  2397. continue;
  2398. default:
  2399. goto handle_unusual;
  2400. } // switch
  2401. handle_unusual:
  2402. if ((tag == 0) || ((tag & 7) == 4)) {
  2403. CHK_(ptr);
  2404. ctx->SetLastTag(tag);
  2405. goto message_done;
  2406. }
  2407. ptr = UnknownFieldParse(
  2408. tag,
  2409. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  2410. ptr, ctx);
  2411. CHK_(ptr != nullptr);
  2412. } // while
  2413. message_done:
  2414. _has_bits_.Or(has_bits);
  2415. return ptr;
  2416. failure:
  2417. ptr = nullptr;
  2418. goto message_done;
  2419. #undef CHK_
  2420. }
  2421. uint8_t* ModelProto::_InternalSerialize(
  2422. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  2423. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ModelProto)
  2424. uint32_t cached_has_bits = 0;
  2425. (void) cached_has_bits;
  2426. cached_has_bits = _has_bits_[0];
  2427. // optional int64 ir_version = 1;
  2428. if (cached_has_bits & 0x00000020u) {
  2429. target = stream->EnsureSpace(target);
  2430. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_ir_version(), target);
  2431. }
  2432. // optional string producer_name = 2;
  2433. if (cached_has_bits & 0x00000001u) {
  2434. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  2435. this->_internal_producer_name().data(), static_cast<int>(this->_internal_producer_name().length()),
  2436. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  2437. "opencv_onnx.ModelProto.producer_name");
  2438. target = stream->WriteStringMaybeAliased(
  2439. 2, this->_internal_producer_name(), target);
  2440. }
  2441. // optional string producer_version = 3;
  2442. if (cached_has_bits & 0x00000002u) {
  2443. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  2444. this->_internal_producer_version().data(), static_cast<int>(this->_internal_producer_version().length()),
  2445. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  2446. "opencv_onnx.ModelProto.producer_version");
  2447. target = stream->WriteStringMaybeAliased(
  2448. 3, this->_internal_producer_version(), target);
  2449. }
  2450. // optional string domain = 4;
  2451. if (cached_has_bits & 0x00000004u) {
  2452. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  2453. this->_internal_domain().data(), static_cast<int>(this->_internal_domain().length()),
  2454. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  2455. "opencv_onnx.ModelProto.domain");
  2456. target = stream->WriteStringMaybeAliased(
  2457. 4, this->_internal_domain(), target);
  2458. }
  2459. // optional int64 model_version = 5;
  2460. if (cached_has_bits & 0x00000040u) {
  2461. target = stream->EnsureSpace(target);
  2462. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->_internal_model_version(), target);
  2463. }
  2464. // optional string doc_string = 6;
  2465. if (cached_has_bits & 0x00000008u) {
  2466. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  2467. this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
  2468. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  2469. "opencv_onnx.ModelProto.doc_string");
  2470. target = stream->WriteStringMaybeAliased(
  2471. 6, this->_internal_doc_string(), target);
  2472. }
  2473. // optional .opencv_onnx.GraphProto graph = 7;
  2474. if (cached_has_bits & 0x00000010u) {
  2475. target = stream->EnsureSpace(target);
  2476. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  2477. InternalWriteMessage(
  2478. 7, _Internal::graph(this), target, stream);
  2479. }
  2480. // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
  2481. for (unsigned int i = 0,
  2482. n = static_cast<unsigned int>(this->_internal_opset_import_size()); i < n; i++) {
  2483. target = stream->EnsureSpace(target);
  2484. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  2485. InternalWriteMessage(8, this->_internal_opset_import(i), target, stream);
  2486. }
  2487. // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
  2488. for (unsigned int i = 0,
  2489. n = static_cast<unsigned int>(this->_internal_metadata_props_size()); i < n; i++) {
  2490. target = stream->EnsureSpace(target);
  2491. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  2492. InternalWriteMessage(14, this->_internal_metadata_props(i), target, stream);
  2493. }
  2494. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  2495. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  2496. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  2497. }
  2498. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ModelProto)
  2499. return target;
  2500. }
  2501. size_t ModelProto::ByteSizeLong() const {
  2502. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ModelProto)
  2503. size_t total_size = 0;
  2504. uint32_t cached_has_bits = 0;
  2505. // Prevent compiler warnings about cached_has_bits being unused
  2506. (void) cached_has_bits;
  2507. // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
  2508. total_size += 1UL * this->_internal_opset_import_size();
  2509. for (const auto& msg : this->opset_import_) {
  2510. total_size +=
  2511. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  2512. }
  2513. // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
  2514. total_size += 1UL * this->_internal_metadata_props_size();
  2515. for (const auto& msg : this->metadata_props_) {
  2516. total_size +=
  2517. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  2518. }
  2519. cached_has_bits = _has_bits_[0];
  2520. if (cached_has_bits & 0x0000007fu) {
  2521. // optional string producer_name = 2;
  2522. if (cached_has_bits & 0x00000001u) {
  2523. total_size += 1 +
  2524. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2525. this->_internal_producer_name());
  2526. }
  2527. // optional string producer_version = 3;
  2528. if (cached_has_bits & 0x00000002u) {
  2529. total_size += 1 +
  2530. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2531. this->_internal_producer_version());
  2532. }
  2533. // optional string domain = 4;
  2534. if (cached_has_bits & 0x00000004u) {
  2535. total_size += 1 +
  2536. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2537. this->_internal_domain());
  2538. }
  2539. // optional string doc_string = 6;
  2540. if (cached_has_bits & 0x00000008u) {
  2541. total_size += 1 +
  2542. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2543. this->_internal_doc_string());
  2544. }
  2545. // optional .opencv_onnx.GraphProto graph = 7;
  2546. if (cached_has_bits & 0x00000010u) {
  2547. total_size += 1 +
  2548. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  2549. *graph_);
  2550. }
  2551. // optional int64 ir_version = 1;
  2552. if (cached_has_bits & 0x00000020u) {
  2553. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_ir_version());
  2554. }
  2555. // optional int64 model_version = 5;
  2556. if (cached_has_bits & 0x00000040u) {
  2557. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_model_version());
  2558. }
  2559. }
  2560. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  2561. }
  2562. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ModelProto::_class_data_ = {
  2563. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  2564. ModelProto::MergeImpl
  2565. };
  2566. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ModelProto::GetClassData() const { return &_class_data_; }
  2567. void ModelProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  2568. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  2569. static_cast<ModelProto *>(to)->MergeFrom(
  2570. static_cast<const ModelProto &>(from));
  2571. }
  2572. void ModelProto::MergeFrom(const ModelProto& from) {
  2573. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ModelProto)
  2574. GOOGLE_DCHECK_NE(&from, this);
  2575. uint32_t cached_has_bits = 0;
  2576. (void) cached_has_bits;
  2577. opset_import_.MergeFrom(from.opset_import_);
  2578. metadata_props_.MergeFrom(from.metadata_props_);
  2579. cached_has_bits = from._has_bits_[0];
  2580. if (cached_has_bits & 0x0000007fu) {
  2581. if (cached_has_bits & 0x00000001u) {
  2582. _internal_set_producer_name(from._internal_producer_name());
  2583. }
  2584. if (cached_has_bits & 0x00000002u) {
  2585. _internal_set_producer_version(from._internal_producer_version());
  2586. }
  2587. if (cached_has_bits & 0x00000004u) {
  2588. _internal_set_domain(from._internal_domain());
  2589. }
  2590. if (cached_has_bits & 0x00000008u) {
  2591. _internal_set_doc_string(from._internal_doc_string());
  2592. }
  2593. if (cached_has_bits & 0x00000010u) {
  2594. _internal_mutable_graph()->::opencv_onnx::GraphProto::MergeFrom(from._internal_graph());
  2595. }
  2596. if (cached_has_bits & 0x00000020u) {
  2597. ir_version_ = from.ir_version_;
  2598. }
  2599. if (cached_has_bits & 0x00000040u) {
  2600. model_version_ = from.model_version_;
  2601. }
  2602. _has_bits_[0] |= cached_has_bits;
  2603. }
  2604. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  2605. }
  2606. void ModelProto::CopyFrom(const ModelProto& from) {
  2607. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ModelProto)
  2608. if (&from == this) return;
  2609. Clear();
  2610. MergeFrom(from);
  2611. }
  2612. bool ModelProto::IsInitialized() const {
  2613. return true;
  2614. }
  2615. void ModelProto::InternalSwap(ModelProto* other) {
  2616. using std::swap;
  2617. auto* lhs_arena = GetArenaForAllocation();
  2618. auto* rhs_arena = other->GetArenaForAllocation();
  2619. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  2620. swap(_has_bits_[0], other->_has_bits_[0]);
  2621. opset_import_.InternalSwap(&other->opset_import_);
  2622. metadata_props_.InternalSwap(&other->metadata_props_);
  2623. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  2624. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2625. &producer_name_, lhs_arena,
  2626. &other->producer_name_, rhs_arena
  2627. );
  2628. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  2629. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2630. &producer_version_, lhs_arena,
  2631. &other->producer_version_, rhs_arena
  2632. );
  2633. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  2634. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2635. &domain_, lhs_arena,
  2636. &other->domain_, rhs_arena
  2637. );
  2638. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  2639. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2640. &doc_string_, lhs_arena,
  2641. &other->doc_string_, rhs_arena
  2642. );
  2643. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  2644. PROTOBUF_FIELD_OFFSET(ModelProto, model_version_)
  2645. + sizeof(ModelProto::model_version_)
  2646. - PROTOBUF_FIELD_OFFSET(ModelProto, graph_)>(
  2647. reinterpret_cast<char*>(&graph_),
  2648. reinterpret_cast<char*>(&other->graph_));
  2649. }
  2650. ::PROTOBUF_NAMESPACE_ID::Metadata ModelProto::GetMetadata() const {
  2651. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  2652. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  2653. file_level_metadata_opencv_2donnx_2eproto[3]);
  2654. }
  2655. // ===================================================================
  2656. class StringStringEntryProto::_Internal {
  2657. public:
  2658. using HasBits = decltype(std::declval<StringStringEntryProto>()._has_bits_);
  2659. static void set_has_key(HasBits* has_bits) {
  2660. (*has_bits)[0] |= 1u;
  2661. }
  2662. static void set_has_value(HasBits* has_bits) {
  2663. (*has_bits)[0] |= 2u;
  2664. }
  2665. };
  2666. StringStringEntryProto::StringStringEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  2667. bool is_message_owned)
  2668. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  2669. SharedCtor();
  2670. if (!is_message_owned) {
  2671. RegisterArenaDtor(arena);
  2672. }
  2673. // @@protoc_insertion_point(arena_constructor:opencv_onnx.StringStringEntryProto)
  2674. }
  2675. StringStringEntryProto::StringStringEntryProto(const StringStringEntryProto& from)
  2676. : ::PROTOBUF_NAMESPACE_ID::Message(),
  2677. _has_bits_(from._has_bits_) {
  2678. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  2679. key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2680. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2681. key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2682. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2683. if (from._internal_has_key()) {
  2684. key_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_key(),
  2685. GetArenaForAllocation());
  2686. }
  2687. value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2688. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2689. value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2690. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2691. if (from._internal_has_value()) {
  2692. value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_value(),
  2693. GetArenaForAllocation());
  2694. }
  2695. // @@protoc_insertion_point(copy_constructor:opencv_onnx.StringStringEntryProto)
  2696. }
  2697. inline void StringStringEntryProto::SharedCtor() {
  2698. key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2699. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2700. key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2701. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2702. value_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2703. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2704. value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2705. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2706. }
  2707. StringStringEntryProto::~StringStringEntryProto() {
  2708. // @@protoc_insertion_point(destructor:opencv_onnx.StringStringEntryProto)
  2709. if (GetArenaForAllocation() != nullptr) return;
  2710. SharedDtor();
  2711. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  2712. }
  2713. inline void StringStringEntryProto::SharedDtor() {
  2714. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  2715. key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2716. value_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2717. }
  2718. void StringStringEntryProto::ArenaDtor(void* object) {
  2719. StringStringEntryProto* _this = reinterpret_cast< StringStringEntryProto* >(object);
  2720. (void)_this;
  2721. }
  2722. void StringStringEntryProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  2723. }
  2724. void StringStringEntryProto::SetCachedSize(int size) const {
  2725. _cached_size_.Set(size);
  2726. }
  2727. void StringStringEntryProto::Clear() {
  2728. // @@protoc_insertion_point(message_clear_start:opencv_onnx.StringStringEntryProto)
  2729. uint32_t cached_has_bits = 0;
  2730. // Prevent compiler warnings about cached_has_bits being unused
  2731. (void) cached_has_bits;
  2732. cached_has_bits = _has_bits_[0];
  2733. if (cached_has_bits & 0x00000003u) {
  2734. if (cached_has_bits & 0x00000001u) {
  2735. key_.ClearNonDefaultToEmpty();
  2736. }
  2737. if (cached_has_bits & 0x00000002u) {
  2738. value_.ClearNonDefaultToEmpty();
  2739. }
  2740. }
  2741. _has_bits_.Clear();
  2742. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  2743. }
  2744. const char* StringStringEntryProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  2745. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  2746. _Internal::HasBits has_bits{};
  2747. while (!ctx->Done(&ptr)) {
  2748. uint32_t tag;
  2749. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  2750. switch (tag >> 3) {
  2751. // optional string key = 1;
  2752. case 1:
  2753. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  2754. auto str = _internal_mutable_key();
  2755. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  2756. #ifndef NDEBUG
  2757. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.StringStringEntryProto.key");
  2758. #endif // !NDEBUG
  2759. CHK_(ptr);
  2760. } else
  2761. goto handle_unusual;
  2762. continue;
  2763. // optional string value = 2;
  2764. case 2:
  2765. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  2766. auto str = _internal_mutable_value();
  2767. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  2768. #ifndef NDEBUG
  2769. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.StringStringEntryProto.value");
  2770. #endif // !NDEBUG
  2771. CHK_(ptr);
  2772. } else
  2773. goto handle_unusual;
  2774. continue;
  2775. default:
  2776. goto handle_unusual;
  2777. } // switch
  2778. handle_unusual:
  2779. if ((tag == 0) || ((tag & 7) == 4)) {
  2780. CHK_(ptr);
  2781. ctx->SetLastTag(tag);
  2782. goto message_done;
  2783. }
  2784. ptr = UnknownFieldParse(
  2785. tag,
  2786. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  2787. ptr, ctx);
  2788. CHK_(ptr != nullptr);
  2789. } // while
  2790. message_done:
  2791. _has_bits_.Or(has_bits);
  2792. return ptr;
  2793. failure:
  2794. ptr = nullptr;
  2795. goto message_done;
  2796. #undef CHK_
  2797. }
  2798. uint8_t* StringStringEntryProto::_InternalSerialize(
  2799. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  2800. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.StringStringEntryProto)
  2801. uint32_t cached_has_bits = 0;
  2802. (void) cached_has_bits;
  2803. cached_has_bits = _has_bits_[0];
  2804. // optional string key = 1;
  2805. if (cached_has_bits & 0x00000001u) {
  2806. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  2807. this->_internal_key().data(), static_cast<int>(this->_internal_key().length()),
  2808. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  2809. "opencv_onnx.StringStringEntryProto.key");
  2810. target = stream->WriteStringMaybeAliased(
  2811. 1, this->_internal_key(), target);
  2812. }
  2813. // optional string value = 2;
  2814. if (cached_has_bits & 0x00000002u) {
  2815. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  2816. this->_internal_value().data(), static_cast<int>(this->_internal_value().length()),
  2817. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  2818. "opencv_onnx.StringStringEntryProto.value");
  2819. target = stream->WriteStringMaybeAliased(
  2820. 2, this->_internal_value(), target);
  2821. }
  2822. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  2823. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  2824. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  2825. }
  2826. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.StringStringEntryProto)
  2827. return target;
  2828. }
  2829. size_t StringStringEntryProto::ByteSizeLong() const {
  2830. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.StringStringEntryProto)
  2831. size_t total_size = 0;
  2832. uint32_t cached_has_bits = 0;
  2833. // Prevent compiler warnings about cached_has_bits being unused
  2834. (void) cached_has_bits;
  2835. cached_has_bits = _has_bits_[0];
  2836. if (cached_has_bits & 0x00000003u) {
  2837. // optional string key = 1;
  2838. if (cached_has_bits & 0x00000001u) {
  2839. total_size += 1 +
  2840. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2841. this->_internal_key());
  2842. }
  2843. // optional string value = 2;
  2844. if (cached_has_bits & 0x00000002u) {
  2845. total_size += 1 +
  2846. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  2847. this->_internal_value());
  2848. }
  2849. }
  2850. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  2851. }
  2852. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StringStringEntryProto::_class_data_ = {
  2853. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  2854. StringStringEntryProto::MergeImpl
  2855. };
  2856. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StringStringEntryProto::GetClassData() const { return &_class_data_; }
  2857. void StringStringEntryProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  2858. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  2859. static_cast<StringStringEntryProto *>(to)->MergeFrom(
  2860. static_cast<const StringStringEntryProto &>(from));
  2861. }
  2862. void StringStringEntryProto::MergeFrom(const StringStringEntryProto& from) {
  2863. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.StringStringEntryProto)
  2864. GOOGLE_DCHECK_NE(&from, this);
  2865. uint32_t cached_has_bits = 0;
  2866. (void) cached_has_bits;
  2867. cached_has_bits = from._has_bits_[0];
  2868. if (cached_has_bits & 0x00000003u) {
  2869. if (cached_has_bits & 0x00000001u) {
  2870. _internal_set_key(from._internal_key());
  2871. }
  2872. if (cached_has_bits & 0x00000002u) {
  2873. _internal_set_value(from._internal_value());
  2874. }
  2875. }
  2876. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  2877. }
  2878. void StringStringEntryProto::CopyFrom(const StringStringEntryProto& from) {
  2879. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.StringStringEntryProto)
  2880. if (&from == this) return;
  2881. Clear();
  2882. MergeFrom(from);
  2883. }
  2884. bool StringStringEntryProto::IsInitialized() const {
  2885. return true;
  2886. }
  2887. void StringStringEntryProto::InternalSwap(StringStringEntryProto* other) {
  2888. using std::swap;
  2889. auto* lhs_arena = GetArenaForAllocation();
  2890. auto* rhs_arena = other->GetArenaForAllocation();
  2891. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  2892. swap(_has_bits_[0], other->_has_bits_[0]);
  2893. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  2894. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2895. &key_, lhs_arena,
  2896. &other->key_, rhs_arena
  2897. );
  2898. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  2899. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  2900. &value_, lhs_arena,
  2901. &other->value_, rhs_arena
  2902. );
  2903. }
  2904. ::PROTOBUF_NAMESPACE_ID::Metadata StringStringEntryProto::GetMetadata() const {
  2905. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  2906. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  2907. file_level_metadata_opencv_2donnx_2eproto[4]);
  2908. }
  2909. // ===================================================================
  2910. class GraphProto::_Internal {
  2911. public:
  2912. using HasBits = decltype(std::declval<GraphProto>()._has_bits_);
  2913. static void set_has_name(HasBits* has_bits) {
  2914. (*has_bits)[0] |= 1u;
  2915. }
  2916. static void set_has_doc_string(HasBits* has_bits) {
  2917. (*has_bits)[0] |= 2u;
  2918. }
  2919. };
  2920. GraphProto::GraphProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  2921. bool is_message_owned)
  2922. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  2923. node_(arena),
  2924. initializer_(arena),
  2925. input_(arena),
  2926. output_(arena),
  2927. value_info_(arena) {
  2928. SharedCtor();
  2929. if (!is_message_owned) {
  2930. RegisterArenaDtor(arena);
  2931. }
  2932. // @@protoc_insertion_point(arena_constructor:opencv_onnx.GraphProto)
  2933. }
  2934. GraphProto::GraphProto(const GraphProto& from)
  2935. : ::PROTOBUF_NAMESPACE_ID::Message(),
  2936. _has_bits_(from._has_bits_),
  2937. node_(from.node_),
  2938. initializer_(from.initializer_),
  2939. input_(from.input_),
  2940. output_(from.output_),
  2941. value_info_(from.value_info_) {
  2942. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  2943. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2944. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2945. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2946. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2947. if (from._internal_has_name()) {
  2948. name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
  2949. GetArenaForAllocation());
  2950. }
  2951. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2952. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2953. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2954. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2955. if (from._internal_has_doc_string()) {
  2956. doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
  2957. GetArenaForAllocation());
  2958. }
  2959. // @@protoc_insertion_point(copy_constructor:opencv_onnx.GraphProto)
  2960. }
  2961. inline void GraphProto::SharedCtor() {
  2962. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2963. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2964. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2965. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2966. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2967. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2968. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  2969. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  2970. }
  2971. GraphProto::~GraphProto() {
  2972. // @@protoc_insertion_point(destructor:opencv_onnx.GraphProto)
  2973. if (GetArenaForAllocation() != nullptr) return;
  2974. SharedDtor();
  2975. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  2976. }
  2977. inline void GraphProto::SharedDtor() {
  2978. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  2979. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2980. doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  2981. }
  2982. void GraphProto::ArenaDtor(void* object) {
  2983. GraphProto* _this = reinterpret_cast< GraphProto* >(object);
  2984. (void)_this;
  2985. }
  2986. void GraphProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  2987. }
  2988. void GraphProto::SetCachedSize(int size) const {
  2989. _cached_size_.Set(size);
  2990. }
  2991. void GraphProto::Clear() {
  2992. // @@protoc_insertion_point(message_clear_start:opencv_onnx.GraphProto)
  2993. uint32_t cached_has_bits = 0;
  2994. // Prevent compiler warnings about cached_has_bits being unused
  2995. (void) cached_has_bits;
  2996. node_.Clear();
  2997. initializer_.Clear();
  2998. input_.Clear();
  2999. output_.Clear();
  3000. value_info_.Clear();
  3001. cached_has_bits = _has_bits_[0];
  3002. if (cached_has_bits & 0x00000003u) {
  3003. if (cached_has_bits & 0x00000001u) {
  3004. name_.ClearNonDefaultToEmpty();
  3005. }
  3006. if (cached_has_bits & 0x00000002u) {
  3007. doc_string_.ClearNonDefaultToEmpty();
  3008. }
  3009. }
  3010. _has_bits_.Clear();
  3011. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  3012. }
  3013. const char* GraphProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  3014. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  3015. _Internal::HasBits has_bits{};
  3016. while (!ctx->Done(&ptr)) {
  3017. uint32_t tag;
  3018. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  3019. switch (tag >> 3) {
  3020. // repeated .opencv_onnx.NodeProto node = 1;
  3021. case 1:
  3022. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  3023. ptr -= 1;
  3024. do {
  3025. ptr += 1;
  3026. ptr = ctx->ParseMessage(_internal_add_node(), ptr);
  3027. CHK_(ptr);
  3028. if (!ctx->DataAvailable(ptr)) break;
  3029. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
  3030. } else
  3031. goto handle_unusual;
  3032. continue;
  3033. // optional string name = 2;
  3034. case 2:
  3035. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  3036. auto str = _internal_mutable_name();
  3037. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  3038. #ifndef NDEBUG
  3039. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.GraphProto.name");
  3040. #endif // !NDEBUG
  3041. CHK_(ptr);
  3042. } else
  3043. goto handle_unusual;
  3044. continue;
  3045. // repeated .opencv_onnx.TensorProto initializer = 5;
  3046. case 5:
  3047. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
  3048. ptr -= 1;
  3049. do {
  3050. ptr += 1;
  3051. ptr = ctx->ParseMessage(_internal_add_initializer(), ptr);
  3052. CHK_(ptr);
  3053. if (!ctx->DataAvailable(ptr)) break;
  3054. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
  3055. } else
  3056. goto handle_unusual;
  3057. continue;
  3058. // optional string doc_string = 10;
  3059. case 10:
  3060. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
  3061. auto str = _internal_mutable_doc_string();
  3062. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  3063. #ifndef NDEBUG
  3064. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.GraphProto.doc_string");
  3065. #endif // !NDEBUG
  3066. CHK_(ptr);
  3067. } else
  3068. goto handle_unusual;
  3069. continue;
  3070. // repeated .opencv_onnx.ValueInfoProto input = 11;
  3071. case 11:
  3072. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
  3073. ptr -= 1;
  3074. do {
  3075. ptr += 1;
  3076. ptr = ctx->ParseMessage(_internal_add_input(), ptr);
  3077. CHK_(ptr);
  3078. if (!ctx->DataAvailable(ptr)) break;
  3079. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
  3080. } else
  3081. goto handle_unusual;
  3082. continue;
  3083. // repeated .opencv_onnx.ValueInfoProto output = 12;
  3084. case 12:
  3085. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
  3086. ptr -= 1;
  3087. do {
  3088. ptr += 1;
  3089. ptr = ctx->ParseMessage(_internal_add_output(), ptr);
  3090. CHK_(ptr);
  3091. if (!ctx->DataAvailable(ptr)) break;
  3092. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<98>(ptr));
  3093. } else
  3094. goto handle_unusual;
  3095. continue;
  3096. // repeated .opencv_onnx.ValueInfoProto value_info = 13;
  3097. case 13:
  3098. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
  3099. ptr -= 1;
  3100. do {
  3101. ptr += 1;
  3102. ptr = ctx->ParseMessage(_internal_add_value_info(), ptr);
  3103. CHK_(ptr);
  3104. if (!ctx->DataAvailable(ptr)) break;
  3105. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<106>(ptr));
  3106. } else
  3107. goto handle_unusual;
  3108. continue;
  3109. default:
  3110. goto handle_unusual;
  3111. } // switch
  3112. handle_unusual:
  3113. if ((tag == 0) || ((tag & 7) == 4)) {
  3114. CHK_(ptr);
  3115. ctx->SetLastTag(tag);
  3116. goto message_done;
  3117. }
  3118. ptr = UnknownFieldParse(
  3119. tag,
  3120. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  3121. ptr, ctx);
  3122. CHK_(ptr != nullptr);
  3123. } // while
  3124. message_done:
  3125. _has_bits_.Or(has_bits);
  3126. return ptr;
  3127. failure:
  3128. ptr = nullptr;
  3129. goto message_done;
  3130. #undef CHK_
  3131. }
  3132. uint8_t* GraphProto::_InternalSerialize(
  3133. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  3134. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.GraphProto)
  3135. uint32_t cached_has_bits = 0;
  3136. (void) cached_has_bits;
  3137. // repeated .opencv_onnx.NodeProto node = 1;
  3138. for (unsigned int i = 0,
  3139. n = static_cast<unsigned int>(this->_internal_node_size()); i < n; i++) {
  3140. target = stream->EnsureSpace(target);
  3141. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3142. InternalWriteMessage(1, this->_internal_node(i), target, stream);
  3143. }
  3144. cached_has_bits = _has_bits_[0];
  3145. // optional string name = 2;
  3146. if (cached_has_bits & 0x00000001u) {
  3147. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  3148. this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
  3149. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  3150. "opencv_onnx.GraphProto.name");
  3151. target = stream->WriteStringMaybeAliased(
  3152. 2, this->_internal_name(), target);
  3153. }
  3154. // repeated .opencv_onnx.TensorProto initializer = 5;
  3155. for (unsigned int i = 0,
  3156. n = static_cast<unsigned int>(this->_internal_initializer_size()); i < n; i++) {
  3157. target = stream->EnsureSpace(target);
  3158. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3159. InternalWriteMessage(5, this->_internal_initializer(i), target, stream);
  3160. }
  3161. // optional string doc_string = 10;
  3162. if (cached_has_bits & 0x00000002u) {
  3163. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  3164. this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
  3165. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  3166. "opencv_onnx.GraphProto.doc_string");
  3167. target = stream->WriteStringMaybeAliased(
  3168. 10, this->_internal_doc_string(), target);
  3169. }
  3170. // repeated .opencv_onnx.ValueInfoProto input = 11;
  3171. for (unsigned int i = 0,
  3172. n = static_cast<unsigned int>(this->_internal_input_size()); i < n; i++) {
  3173. target = stream->EnsureSpace(target);
  3174. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3175. InternalWriteMessage(11, this->_internal_input(i), target, stream);
  3176. }
  3177. // repeated .opencv_onnx.ValueInfoProto output = 12;
  3178. for (unsigned int i = 0,
  3179. n = static_cast<unsigned int>(this->_internal_output_size()); i < n; i++) {
  3180. target = stream->EnsureSpace(target);
  3181. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3182. InternalWriteMessage(12, this->_internal_output(i), target, stream);
  3183. }
  3184. // repeated .opencv_onnx.ValueInfoProto value_info = 13;
  3185. for (unsigned int i = 0,
  3186. n = static_cast<unsigned int>(this->_internal_value_info_size()); i < n; i++) {
  3187. target = stream->EnsureSpace(target);
  3188. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3189. InternalWriteMessage(13, this->_internal_value_info(i), target, stream);
  3190. }
  3191. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  3192. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  3193. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  3194. }
  3195. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.GraphProto)
  3196. return target;
  3197. }
  3198. size_t GraphProto::ByteSizeLong() const {
  3199. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.GraphProto)
  3200. size_t total_size = 0;
  3201. uint32_t cached_has_bits = 0;
  3202. // Prevent compiler warnings about cached_has_bits being unused
  3203. (void) cached_has_bits;
  3204. // repeated .opencv_onnx.NodeProto node = 1;
  3205. total_size += 1UL * this->_internal_node_size();
  3206. for (const auto& msg : this->node_) {
  3207. total_size +=
  3208. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  3209. }
  3210. // repeated .opencv_onnx.TensorProto initializer = 5;
  3211. total_size += 1UL * this->_internal_initializer_size();
  3212. for (const auto& msg : this->initializer_) {
  3213. total_size +=
  3214. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  3215. }
  3216. // repeated .opencv_onnx.ValueInfoProto input = 11;
  3217. total_size += 1UL * this->_internal_input_size();
  3218. for (const auto& msg : this->input_) {
  3219. total_size +=
  3220. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  3221. }
  3222. // repeated .opencv_onnx.ValueInfoProto output = 12;
  3223. total_size += 1UL * this->_internal_output_size();
  3224. for (const auto& msg : this->output_) {
  3225. total_size +=
  3226. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  3227. }
  3228. // repeated .opencv_onnx.ValueInfoProto value_info = 13;
  3229. total_size += 1UL * this->_internal_value_info_size();
  3230. for (const auto& msg : this->value_info_) {
  3231. total_size +=
  3232. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  3233. }
  3234. cached_has_bits = _has_bits_[0];
  3235. if (cached_has_bits & 0x00000003u) {
  3236. // optional string name = 2;
  3237. if (cached_has_bits & 0x00000001u) {
  3238. total_size += 1 +
  3239. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  3240. this->_internal_name());
  3241. }
  3242. // optional string doc_string = 10;
  3243. if (cached_has_bits & 0x00000002u) {
  3244. total_size += 1 +
  3245. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  3246. this->_internal_doc_string());
  3247. }
  3248. }
  3249. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  3250. }
  3251. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphProto::_class_data_ = {
  3252. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  3253. GraphProto::MergeImpl
  3254. };
  3255. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphProto::GetClassData() const { return &_class_data_; }
  3256. void GraphProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  3257. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  3258. static_cast<GraphProto *>(to)->MergeFrom(
  3259. static_cast<const GraphProto &>(from));
  3260. }
  3261. void GraphProto::MergeFrom(const GraphProto& from) {
  3262. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.GraphProto)
  3263. GOOGLE_DCHECK_NE(&from, this);
  3264. uint32_t cached_has_bits = 0;
  3265. (void) cached_has_bits;
  3266. node_.MergeFrom(from.node_);
  3267. initializer_.MergeFrom(from.initializer_);
  3268. input_.MergeFrom(from.input_);
  3269. output_.MergeFrom(from.output_);
  3270. value_info_.MergeFrom(from.value_info_);
  3271. cached_has_bits = from._has_bits_[0];
  3272. if (cached_has_bits & 0x00000003u) {
  3273. if (cached_has_bits & 0x00000001u) {
  3274. _internal_set_name(from._internal_name());
  3275. }
  3276. if (cached_has_bits & 0x00000002u) {
  3277. _internal_set_doc_string(from._internal_doc_string());
  3278. }
  3279. }
  3280. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  3281. }
  3282. void GraphProto::CopyFrom(const GraphProto& from) {
  3283. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.GraphProto)
  3284. if (&from == this) return;
  3285. Clear();
  3286. MergeFrom(from);
  3287. }
  3288. bool GraphProto::IsInitialized() const {
  3289. return true;
  3290. }
  3291. void GraphProto::InternalSwap(GraphProto* other) {
  3292. using std::swap;
  3293. auto* lhs_arena = GetArenaForAllocation();
  3294. auto* rhs_arena = other->GetArenaForAllocation();
  3295. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  3296. swap(_has_bits_[0], other->_has_bits_[0]);
  3297. node_.InternalSwap(&other->node_);
  3298. initializer_.InternalSwap(&other->initializer_);
  3299. input_.InternalSwap(&other->input_);
  3300. output_.InternalSwap(&other->output_);
  3301. value_info_.InternalSwap(&other->value_info_);
  3302. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  3303. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  3304. &name_, lhs_arena,
  3305. &other->name_, rhs_arena
  3306. );
  3307. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  3308. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  3309. &doc_string_, lhs_arena,
  3310. &other->doc_string_, rhs_arena
  3311. );
  3312. }
  3313. ::PROTOBUF_NAMESPACE_ID::Metadata GraphProto::GetMetadata() const {
  3314. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  3315. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  3316. file_level_metadata_opencv_2donnx_2eproto[5]);
  3317. }
  3318. // ===================================================================
  3319. class TensorProto_Segment::_Internal {
  3320. public:
  3321. using HasBits = decltype(std::declval<TensorProto_Segment>()._has_bits_);
  3322. static void set_has_begin(HasBits* has_bits) {
  3323. (*has_bits)[0] |= 1u;
  3324. }
  3325. static void set_has_end(HasBits* has_bits) {
  3326. (*has_bits)[0] |= 2u;
  3327. }
  3328. };
  3329. TensorProto_Segment::TensorProto_Segment(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  3330. bool is_message_owned)
  3331. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  3332. SharedCtor();
  3333. if (!is_message_owned) {
  3334. RegisterArenaDtor(arena);
  3335. }
  3336. // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorProto.Segment)
  3337. }
  3338. TensorProto_Segment::TensorProto_Segment(const TensorProto_Segment& from)
  3339. : ::PROTOBUF_NAMESPACE_ID::Message(),
  3340. _has_bits_(from._has_bits_) {
  3341. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  3342. ::memcpy(&begin_, &from.begin_,
  3343. static_cast<size_t>(reinterpret_cast<char*>(&end_) -
  3344. reinterpret_cast<char*>(&begin_)) + sizeof(end_));
  3345. // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto.Segment)
  3346. }
  3347. inline void TensorProto_Segment::SharedCtor() {
  3348. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  3349. reinterpret_cast<char*>(&begin_) - reinterpret_cast<char*>(this)),
  3350. 0, static_cast<size_t>(reinterpret_cast<char*>(&end_) -
  3351. reinterpret_cast<char*>(&begin_)) + sizeof(end_));
  3352. }
  3353. TensorProto_Segment::~TensorProto_Segment() {
  3354. // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto.Segment)
  3355. if (GetArenaForAllocation() != nullptr) return;
  3356. SharedDtor();
  3357. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  3358. }
  3359. inline void TensorProto_Segment::SharedDtor() {
  3360. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  3361. }
  3362. void TensorProto_Segment::ArenaDtor(void* object) {
  3363. TensorProto_Segment* _this = reinterpret_cast< TensorProto_Segment* >(object);
  3364. (void)_this;
  3365. }
  3366. void TensorProto_Segment::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  3367. }
  3368. void TensorProto_Segment::SetCachedSize(int size) const {
  3369. _cached_size_.Set(size);
  3370. }
  3371. void TensorProto_Segment::Clear() {
  3372. // @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto.Segment)
  3373. uint32_t cached_has_bits = 0;
  3374. // Prevent compiler warnings about cached_has_bits being unused
  3375. (void) cached_has_bits;
  3376. cached_has_bits = _has_bits_[0];
  3377. if (cached_has_bits & 0x00000003u) {
  3378. ::memset(&begin_, 0, static_cast<size_t>(
  3379. reinterpret_cast<char*>(&end_) -
  3380. reinterpret_cast<char*>(&begin_)) + sizeof(end_));
  3381. }
  3382. _has_bits_.Clear();
  3383. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  3384. }
  3385. const char* TensorProto_Segment::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  3386. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  3387. _Internal::HasBits has_bits{};
  3388. while (!ctx->Done(&ptr)) {
  3389. uint32_t tag;
  3390. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  3391. switch (tag >> 3) {
  3392. // optional int64 begin = 1;
  3393. case 1:
  3394. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
  3395. _Internal::set_has_begin(&has_bits);
  3396. begin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  3397. CHK_(ptr);
  3398. } else
  3399. goto handle_unusual;
  3400. continue;
  3401. // optional int64 end = 2;
  3402. case 2:
  3403. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
  3404. _Internal::set_has_end(&has_bits);
  3405. end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  3406. CHK_(ptr);
  3407. } else
  3408. goto handle_unusual;
  3409. continue;
  3410. default:
  3411. goto handle_unusual;
  3412. } // switch
  3413. handle_unusual:
  3414. if ((tag == 0) || ((tag & 7) == 4)) {
  3415. CHK_(ptr);
  3416. ctx->SetLastTag(tag);
  3417. goto message_done;
  3418. }
  3419. ptr = UnknownFieldParse(
  3420. tag,
  3421. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  3422. ptr, ctx);
  3423. CHK_(ptr != nullptr);
  3424. } // while
  3425. message_done:
  3426. _has_bits_.Or(has_bits);
  3427. return ptr;
  3428. failure:
  3429. ptr = nullptr;
  3430. goto message_done;
  3431. #undef CHK_
  3432. }
  3433. uint8_t* TensorProto_Segment::_InternalSerialize(
  3434. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  3435. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto.Segment)
  3436. uint32_t cached_has_bits = 0;
  3437. (void) cached_has_bits;
  3438. cached_has_bits = _has_bits_[0];
  3439. // optional int64 begin = 1;
  3440. if (cached_has_bits & 0x00000001u) {
  3441. target = stream->EnsureSpace(target);
  3442. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_begin(), target);
  3443. }
  3444. // optional int64 end = 2;
  3445. if (cached_has_bits & 0x00000002u) {
  3446. target = stream->EnsureSpace(target);
  3447. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_end(), target);
  3448. }
  3449. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  3450. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  3451. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  3452. }
  3453. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto.Segment)
  3454. return target;
  3455. }
  3456. size_t TensorProto_Segment::ByteSizeLong() const {
  3457. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto.Segment)
  3458. size_t total_size = 0;
  3459. uint32_t cached_has_bits = 0;
  3460. // Prevent compiler warnings about cached_has_bits being unused
  3461. (void) cached_has_bits;
  3462. cached_has_bits = _has_bits_[0];
  3463. if (cached_has_bits & 0x00000003u) {
  3464. // optional int64 begin = 1;
  3465. if (cached_has_bits & 0x00000001u) {
  3466. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_begin());
  3467. }
  3468. // optional int64 end = 2;
  3469. if (cached_has_bits & 0x00000002u) {
  3470. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_end());
  3471. }
  3472. }
  3473. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  3474. }
  3475. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorProto_Segment::_class_data_ = {
  3476. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  3477. TensorProto_Segment::MergeImpl
  3478. };
  3479. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorProto_Segment::GetClassData() const { return &_class_data_; }
  3480. void TensorProto_Segment::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  3481. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  3482. static_cast<TensorProto_Segment *>(to)->MergeFrom(
  3483. static_cast<const TensorProto_Segment &>(from));
  3484. }
  3485. void TensorProto_Segment::MergeFrom(const TensorProto_Segment& from) {
  3486. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto.Segment)
  3487. GOOGLE_DCHECK_NE(&from, this);
  3488. uint32_t cached_has_bits = 0;
  3489. (void) cached_has_bits;
  3490. cached_has_bits = from._has_bits_[0];
  3491. if (cached_has_bits & 0x00000003u) {
  3492. if (cached_has_bits & 0x00000001u) {
  3493. begin_ = from.begin_;
  3494. }
  3495. if (cached_has_bits & 0x00000002u) {
  3496. end_ = from.end_;
  3497. }
  3498. _has_bits_[0] |= cached_has_bits;
  3499. }
  3500. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  3501. }
  3502. void TensorProto_Segment::CopyFrom(const TensorProto_Segment& from) {
  3503. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto.Segment)
  3504. if (&from == this) return;
  3505. Clear();
  3506. MergeFrom(from);
  3507. }
  3508. bool TensorProto_Segment::IsInitialized() const {
  3509. return true;
  3510. }
  3511. void TensorProto_Segment::InternalSwap(TensorProto_Segment* other) {
  3512. using std::swap;
  3513. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  3514. swap(_has_bits_[0], other->_has_bits_[0]);
  3515. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  3516. PROTOBUF_FIELD_OFFSET(TensorProto_Segment, end_)
  3517. + sizeof(TensorProto_Segment::end_)
  3518. - PROTOBUF_FIELD_OFFSET(TensorProto_Segment, begin_)>(
  3519. reinterpret_cast<char*>(&begin_),
  3520. reinterpret_cast<char*>(&other->begin_));
  3521. }
  3522. ::PROTOBUF_NAMESPACE_ID::Metadata TensorProto_Segment::GetMetadata() const {
  3523. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  3524. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  3525. file_level_metadata_opencv_2donnx_2eproto[6]);
  3526. }
  3527. // ===================================================================
  3528. class TensorProto::_Internal {
  3529. public:
  3530. using HasBits = decltype(std::declval<TensorProto>()._has_bits_);
  3531. static void set_has_data_type(HasBits* has_bits) {
  3532. (*has_bits)[0] |= 16u;
  3533. }
  3534. static const ::opencv_onnx::TensorProto_Segment& segment(const TensorProto* msg);
  3535. static void set_has_segment(HasBits* has_bits) {
  3536. (*has_bits)[0] |= 8u;
  3537. }
  3538. static void set_has_name(HasBits* has_bits) {
  3539. (*has_bits)[0] |= 1u;
  3540. }
  3541. static void set_has_doc_string(HasBits* has_bits) {
  3542. (*has_bits)[0] |= 4u;
  3543. }
  3544. static void set_has_raw_data(HasBits* has_bits) {
  3545. (*has_bits)[0] |= 2u;
  3546. }
  3547. };
  3548. const ::opencv_onnx::TensorProto_Segment&
  3549. TensorProto::_Internal::segment(const TensorProto* msg) {
  3550. return *msg->segment_;
  3551. }
  3552. TensorProto::TensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  3553. bool is_message_owned)
  3554. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  3555. dims_(arena),
  3556. float_data_(arena),
  3557. int32_data_(arena),
  3558. string_data_(arena),
  3559. int64_data_(arena),
  3560. double_data_(arena),
  3561. uint64_data_(arena) {
  3562. SharedCtor();
  3563. if (!is_message_owned) {
  3564. RegisterArenaDtor(arena);
  3565. }
  3566. // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorProto)
  3567. }
  3568. TensorProto::TensorProto(const TensorProto& from)
  3569. : ::PROTOBUF_NAMESPACE_ID::Message(),
  3570. _has_bits_(from._has_bits_),
  3571. dims_(from.dims_),
  3572. float_data_(from.float_data_),
  3573. int32_data_(from.int32_data_),
  3574. string_data_(from.string_data_),
  3575. int64_data_(from.int64_data_),
  3576. double_data_(from.double_data_),
  3577. uint64_data_(from.uint64_data_) {
  3578. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  3579. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3580. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3581. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  3582. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3583. if (from._internal_has_name()) {
  3584. name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
  3585. GetArenaForAllocation());
  3586. }
  3587. raw_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3588. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3589. raw_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  3590. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3591. if (from._internal_has_raw_data()) {
  3592. raw_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_raw_data(),
  3593. GetArenaForAllocation());
  3594. }
  3595. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3596. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3597. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  3598. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3599. if (from._internal_has_doc_string()) {
  3600. doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(),
  3601. GetArenaForAllocation());
  3602. }
  3603. if (from._internal_has_segment()) {
  3604. segment_ = new ::opencv_onnx::TensorProto_Segment(*from.segment_);
  3605. } else {
  3606. segment_ = nullptr;
  3607. }
  3608. data_type_ = from.data_type_;
  3609. // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto)
  3610. }
  3611. inline void TensorProto::SharedCtor() {
  3612. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3613. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3614. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  3615. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3616. raw_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3617. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3618. raw_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  3619. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3620. doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3621. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3622. doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  3623. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  3624. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  3625. reinterpret_cast<char*>(&segment_) - reinterpret_cast<char*>(this)),
  3626. 0, static_cast<size_t>(reinterpret_cast<char*>(&data_type_) -
  3627. reinterpret_cast<char*>(&segment_)) + sizeof(data_type_));
  3628. }
  3629. TensorProto::~TensorProto() {
  3630. // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto)
  3631. if (GetArenaForAllocation() != nullptr) return;
  3632. SharedDtor();
  3633. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  3634. }
  3635. inline void TensorProto::SharedDtor() {
  3636. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  3637. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3638. raw_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3639. doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  3640. if (this != internal_default_instance()) delete segment_;
  3641. }
  3642. void TensorProto::ArenaDtor(void* object) {
  3643. TensorProto* _this = reinterpret_cast< TensorProto* >(object);
  3644. (void)_this;
  3645. }
  3646. void TensorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  3647. }
  3648. void TensorProto::SetCachedSize(int size) const {
  3649. _cached_size_.Set(size);
  3650. }
  3651. void TensorProto::Clear() {
  3652. // @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto)
  3653. uint32_t cached_has_bits = 0;
  3654. // Prevent compiler warnings about cached_has_bits being unused
  3655. (void) cached_has_bits;
  3656. dims_.Clear();
  3657. float_data_.Clear();
  3658. int32_data_.Clear();
  3659. string_data_.Clear();
  3660. int64_data_.Clear();
  3661. double_data_.Clear();
  3662. uint64_data_.Clear();
  3663. cached_has_bits = _has_bits_[0];
  3664. if (cached_has_bits & 0x0000000fu) {
  3665. if (cached_has_bits & 0x00000001u) {
  3666. name_.ClearNonDefaultToEmpty();
  3667. }
  3668. if (cached_has_bits & 0x00000002u) {
  3669. raw_data_.ClearNonDefaultToEmpty();
  3670. }
  3671. if (cached_has_bits & 0x00000004u) {
  3672. doc_string_.ClearNonDefaultToEmpty();
  3673. }
  3674. if (cached_has_bits & 0x00000008u) {
  3675. GOOGLE_DCHECK(segment_ != nullptr);
  3676. segment_->Clear();
  3677. }
  3678. }
  3679. data_type_ = 0;
  3680. _has_bits_.Clear();
  3681. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  3682. }
  3683. const char* TensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  3684. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  3685. _Internal::HasBits has_bits{};
  3686. while (!ctx->Done(&ptr)) {
  3687. uint32_t tag;
  3688. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  3689. switch (tag >> 3) {
  3690. // repeated int64 dims = 1;
  3691. case 1:
  3692. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
  3693. ptr -= 1;
  3694. do {
  3695. ptr += 1;
  3696. _internal_add_dims(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
  3697. CHK_(ptr);
  3698. if (!ctx->DataAvailable(ptr)) break;
  3699. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr));
  3700. } else if (static_cast<uint8_t>(tag) == 10) {
  3701. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_dims(), ptr, ctx);
  3702. CHK_(ptr);
  3703. } else
  3704. goto handle_unusual;
  3705. continue;
  3706. // optional .opencv_onnx.TensorProto.DataType data_type = 2;
  3707. case 2:
  3708. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
  3709. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  3710. CHK_(ptr);
  3711. if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::TensorProto_DataType_IsValid(val))) {
  3712. _internal_set_data_type(static_cast<::opencv_onnx::TensorProto_DataType>(val));
  3713. } else {
  3714. ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
  3715. }
  3716. } else
  3717. goto handle_unusual;
  3718. continue;
  3719. // optional .opencv_onnx.TensorProto.Segment segment = 3;
  3720. case 3:
  3721. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
  3722. ptr = ctx->ParseMessage(_internal_mutable_segment(), ptr);
  3723. CHK_(ptr);
  3724. } else
  3725. goto handle_unusual;
  3726. continue;
  3727. // repeated float float_data = 4 [packed = true];
  3728. case 4:
  3729. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
  3730. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_float_data(), ptr, ctx);
  3731. CHK_(ptr);
  3732. } else if (static_cast<uint8_t>(tag) == 37) {
  3733. _internal_add_float_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
  3734. ptr += sizeof(float);
  3735. } else
  3736. goto handle_unusual;
  3737. continue;
  3738. // repeated int32 int32_data = 5 [packed = true];
  3739. case 5:
  3740. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
  3741. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_int32_data(), ptr, ctx);
  3742. CHK_(ptr);
  3743. } else if (static_cast<uint8_t>(tag) == 40) {
  3744. _internal_add_int32_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
  3745. CHK_(ptr);
  3746. } else
  3747. goto handle_unusual;
  3748. continue;
  3749. // repeated bytes string_data = 6;
  3750. case 6:
  3751. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
  3752. ptr -= 1;
  3753. do {
  3754. ptr += 1;
  3755. auto str = _internal_add_string_data();
  3756. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  3757. CHK_(ptr);
  3758. if (!ctx->DataAvailable(ptr)) break;
  3759. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
  3760. } else
  3761. goto handle_unusual;
  3762. continue;
  3763. // repeated int64 int64_data = 7 [packed = true];
  3764. case 7:
  3765. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
  3766. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_int64_data(), ptr, ctx);
  3767. CHK_(ptr);
  3768. } else if (static_cast<uint8_t>(tag) == 56) {
  3769. _internal_add_int64_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
  3770. CHK_(ptr);
  3771. } else
  3772. goto handle_unusual;
  3773. continue;
  3774. // optional string name = 8;
  3775. case 8:
  3776. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
  3777. auto str = _internal_mutable_name();
  3778. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  3779. #ifndef NDEBUG
  3780. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorProto.name");
  3781. #endif // !NDEBUG
  3782. CHK_(ptr);
  3783. } else
  3784. goto handle_unusual;
  3785. continue;
  3786. // optional bytes raw_data = 9;
  3787. case 9:
  3788. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
  3789. auto str = _internal_mutable_raw_data();
  3790. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  3791. CHK_(ptr);
  3792. } else
  3793. goto handle_unusual;
  3794. continue;
  3795. // repeated double double_data = 10 [packed = true];
  3796. case 10:
  3797. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
  3798. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_double_data(), ptr, ctx);
  3799. CHK_(ptr);
  3800. } else if (static_cast<uint8_t>(tag) == 81) {
  3801. _internal_add_double_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
  3802. ptr += sizeof(double);
  3803. } else
  3804. goto handle_unusual;
  3805. continue;
  3806. // repeated uint64 uint64_data = 11 [packed = true];
  3807. case 11:
  3808. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
  3809. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_uint64_data(), ptr, ctx);
  3810. CHK_(ptr);
  3811. } else if (static_cast<uint8_t>(tag) == 88) {
  3812. _internal_add_uint64_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
  3813. CHK_(ptr);
  3814. } else
  3815. goto handle_unusual;
  3816. continue;
  3817. // optional string doc_string = 12;
  3818. case 12:
  3819. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
  3820. auto str = _internal_mutable_doc_string();
  3821. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  3822. #ifndef NDEBUG
  3823. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorProto.doc_string");
  3824. #endif // !NDEBUG
  3825. CHK_(ptr);
  3826. } else
  3827. goto handle_unusual;
  3828. continue;
  3829. default:
  3830. goto handle_unusual;
  3831. } // switch
  3832. handle_unusual:
  3833. if ((tag == 0) || ((tag & 7) == 4)) {
  3834. CHK_(ptr);
  3835. ctx->SetLastTag(tag);
  3836. goto message_done;
  3837. }
  3838. ptr = UnknownFieldParse(
  3839. tag,
  3840. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  3841. ptr, ctx);
  3842. CHK_(ptr != nullptr);
  3843. } // while
  3844. message_done:
  3845. _has_bits_.Or(has_bits);
  3846. return ptr;
  3847. failure:
  3848. ptr = nullptr;
  3849. goto message_done;
  3850. #undef CHK_
  3851. }
  3852. uint8_t* TensorProto::_InternalSerialize(
  3853. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  3854. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto)
  3855. uint32_t cached_has_bits = 0;
  3856. (void) cached_has_bits;
  3857. // repeated int64 dims = 1;
  3858. for (int i = 0, n = this->_internal_dims_size(); i < n; i++) {
  3859. target = stream->EnsureSpace(target);
  3860. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_dims(i), target);
  3861. }
  3862. cached_has_bits = _has_bits_[0];
  3863. // optional .opencv_onnx.TensorProto.DataType data_type = 2;
  3864. if (cached_has_bits & 0x00000010u) {
  3865. target = stream->EnsureSpace(target);
  3866. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
  3867. 2, this->_internal_data_type(), target);
  3868. }
  3869. // optional .opencv_onnx.TensorProto.Segment segment = 3;
  3870. if (cached_has_bits & 0x00000008u) {
  3871. target = stream->EnsureSpace(target);
  3872. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3873. InternalWriteMessage(
  3874. 3, _Internal::segment(this), target, stream);
  3875. }
  3876. // repeated float float_data = 4 [packed = true];
  3877. if (this->_internal_float_data_size() > 0) {
  3878. target = stream->WriteFixedPacked(4, _internal_float_data(), target);
  3879. }
  3880. // repeated int32 int32_data = 5 [packed = true];
  3881. {
  3882. int byte_size = _int32_data_cached_byte_size_.load(std::memory_order_relaxed);
  3883. if (byte_size > 0) {
  3884. target = stream->WriteInt32Packed(
  3885. 5, _internal_int32_data(), byte_size, target);
  3886. }
  3887. }
  3888. // repeated bytes string_data = 6;
  3889. for (int i = 0, n = this->_internal_string_data_size(); i < n; i++) {
  3890. const auto& s = this->_internal_string_data(i);
  3891. target = stream->WriteBytes(6, s, target);
  3892. }
  3893. // repeated int64 int64_data = 7 [packed = true];
  3894. {
  3895. int byte_size = _int64_data_cached_byte_size_.load(std::memory_order_relaxed);
  3896. if (byte_size > 0) {
  3897. target = stream->WriteInt64Packed(
  3898. 7, _internal_int64_data(), byte_size, target);
  3899. }
  3900. }
  3901. // optional string name = 8;
  3902. if (cached_has_bits & 0x00000001u) {
  3903. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  3904. this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
  3905. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  3906. "opencv_onnx.TensorProto.name");
  3907. target = stream->WriteStringMaybeAliased(
  3908. 8, this->_internal_name(), target);
  3909. }
  3910. // optional bytes raw_data = 9;
  3911. if (cached_has_bits & 0x00000002u) {
  3912. target = stream->WriteBytesMaybeAliased(
  3913. 9, this->_internal_raw_data(), target);
  3914. }
  3915. // repeated double double_data = 10 [packed = true];
  3916. if (this->_internal_double_data_size() > 0) {
  3917. target = stream->WriteFixedPacked(10, _internal_double_data(), target);
  3918. }
  3919. // repeated uint64 uint64_data = 11 [packed = true];
  3920. {
  3921. int byte_size = _uint64_data_cached_byte_size_.load(std::memory_order_relaxed);
  3922. if (byte_size > 0) {
  3923. target = stream->WriteUInt64Packed(
  3924. 11, _internal_uint64_data(), byte_size, target);
  3925. }
  3926. }
  3927. // optional string doc_string = 12;
  3928. if (cached_has_bits & 0x00000004u) {
  3929. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  3930. this->_internal_doc_string().data(), static_cast<int>(this->_internal_doc_string().length()),
  3931. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  3932. "opencv_onnx.TensorProto.doc_string");
  3933. target = stream->WriteStringMaybeAliased(
  3934. 12, this->_internal_doc_string(), target);
  3935. }
  3936. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  3937. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  3938. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  3939. }
  3940. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto)
  3941. return target;
  3942. }
  3943. size_t TensorProto::ByteSizeLong() const {
  3944. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto)
  3945. size_t total_size = 0;
  3946. uint32_t cached_has_bits = 0;
  3947. // Prevent compiler warnings about cached_has_bits being unused
  3948. (void) cached_has_bits;
  3949. // repeated int64 dims = 1;
  3950. {
  3951. size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3952. Int64Size(this->dims_);
  3953. total_size += 1 *
  3954. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_dims_size());
  3955. total_size += data_size;
  3956. }
  3957. // repeated float float_data = 4 [packed = true];
  3958. {
  3959. unsigned int count = static_cast<unsigned int>(this->_internal_float_data_size());
  3960. size_t data_size = 4UL * count;
  3961. if (data_size > 0) {
  3962. total_size += 1 +
  3963. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  3964. static_cast<int32_t>(data_size));
  3965. }
  3966. total_size += data_size;
  3967. }
  3968. // repeated int32 int32_data = 5 [packed = true];
  3969. {
  3970. size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3971. Int32Size(this->int32_data_);
  3972. if (data_size > 0) {
  3973. total_size += 1 +
  3974. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  3975. static_cast<int32_t>(data_size));
  3976. }
  3977. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
  3978. _int32_data_cached_byte_size_.store(cached_size,
  3979. std::memory_order_relaxed);
  3980. total_size += data_size;
  3981. }
  3982. // repeated bytes string_data = 6;
  3983. total_size += 1 *
  3984. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(string_data_.size());
  3985. for (int i = 0, n = string_data_.size(); i < n; i++) {
  3986. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  3987. string_data_.Get(i));
  3988. }
  3989. // repeated int64 int64_data = 7 [packed = true];
  3990. {
  3991. size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  3992. Int64Size(this->int64_data_);
  3993. if (data_size > 0) {
  3994. total_size += 1 +
  3995. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  3996. static_cast<int32_t>(data_size));
  3997. }
  3998. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
  3999. _int64_data_cached_byte_size_.store(cached_size,
  4000. std::memory_order_relaxed);
  4001. total_size += data_size;
  4002. }
  4003. // repeated double double_data = 10 [packed = true];
  4004. {
  4005. unsigned int count = static_cast<unsigned int>(this->_internal_double_data_size());
  4006. size_t data_size = 8UL * count;
  4007. if (data_size > 0) {
  4008. total_size += 1 +
  4009. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  4010. static_cast<int32_t>(data_size));
  4011. }
  4012. total_size += data_size;
  4013. }
  4014. // repeated uint64 uint64_data = 11 [packed = true];
  4015. {
  4016. size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  4017. UInt64Size(this->uint64_data_);
  4018. if (data_size > 0) {
  4019. total_size += 1 +
  4020. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  4021. static_cast<int32_t>(data_size));
  4022. }
  4023. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
  4024. _uint64_data_cached_byte_size_.store(cached_size,
  4025. std::memory_order_relaxed);
  4026. total_size += data_size;
  4027. }
  4028. cached_has_bits = _has_bits_[0];
  4029. if (cached_has_bits & 0x0000001fu) {
  4030. // optional string name = 8;
  4031. if (cached_has_bits & 0x00000001u) {
  4032. total_size += 1 +
  4033. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  4034. this->_internal_name());
  4035. }
  4036. // optional bytes raw_data = 9;
  4037. if (cached_has_bits & 0x00000002u) {
  4038. total_size += 1 +
  4039. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  4040. this->_internal_raw_data());
  4041. }
  4042. // optional string doc_string = 12;
  4043. if (cached_has_bits & 0x00000004u) {
  4044. total_size += 1 +
  4045. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  4046. this->_internal_doc_string());
  4047. }
  4048. // optional .opencv_onnx.TensorProto.Segment segment = 3;
  4049. if (cached_has_bits & 0x00000008u) {
  4050. total_size += 1 +
  4051. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  4052. *segment_);
  4053. }
  4054. // optional .opencv_onnx.TensorProto.DataType data_type = 2;
  4055. if (cached_has_bits & 0x00000010u) {
  4056. total_size += 1 +
  4057. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_data_type());
  4058. }
  4059. }
  4060. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  4061. }
  4062. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorProto::_class_data_ = {
  4063. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  4064. TensorProto::MergeImpl
  4065. };
  4066. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorProto::GetClassData() const { return &_class_data_; }
  4067. void TensorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  4068. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  4069. static_cast<TensorProto *>(to)->MergeFrom(
  4070. static_cast<const TensorProto &>(from));
  4071. }
  4072. void TensorProto::MergeFrom(const TensorProto& from) {
  4073. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto)
  4074. GOOGLE_DCHECK_NE(&from, this);
  4075. uint32_t cached_has_bits = 0;
  4076. (void) cached_has_bits;
  4077. dims_.MergeFrom(from.dims_);
  4078. float_data_.MergeFrom(from.float_data_);
  4079. int32_data_.MergeFrom(from.int32_data_);
  4080. string_data_.MergeFrom(from.string_data_);
  4081. int64_data_.MergeFrom(from.int64_data_);
  4082. double_data_.MergeFrom(from.double_data_);
  4083. uint64_data_.MergeFrom(from.uint64_data_);
  4084. cached_has_bits = from._has_bits_[0];
  4085. if (cached_has_bits & 0x0000001fu) {
  4086. if (cached_has_bits & 0x00000001u) {
  4087. _internal_set_name(from._internal_name());
  4088. }
  4089. if (cached_has_bits & 0x00000002u) {
  4090. _internal_set_raw_data(from._internal_raw_data());
  4091. }
  4092. if (cached_has_bits & 0x00000004u) {
  4093. _internal_set_doc_string(from._internal_doc_string());
  4094. }
  4095. if (cached_has_bits & 0x00000008u) {
  4096. _internal_mutable_segment()->::opencv_onnx::TensorProto_Segment::MergeFrom(from._internal_segment());
  4097. }
  4098. if (cached_has_bits & 0x00000010u) {
  4099. data_type_ = from.data_type_;
  4100. }
  4101. _has_bits_[0] |= cached_has_bits;
  4102. }
  4103. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  4104. }
  4105. void TensorProto::CopyFrom(const TensorProto& from) {
  4106. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto)
  4107. if (&from == this) return;
  4108. Clear();
  4109. MergeFrom(from);
  4110. }
  4111. bool TensorProto::IsInitialized() const {
  4112. return true;
  4113. }
  4114. void TensorProto::InternalSwap(TensorProto* other) {
  4115. using std::swap;
  4116. auto* lhs_arena = GetArenaForAllocation();
  4117. auto* rhs_arena = other->GetArenaForAllocation();
  4118. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  4119. swap(_has_bits_[0], other->_has_bits_[0]);
  4120. dims_.InternalSwap(&other->dims_);
  4121. float_data_.InternalSwap(&other->float_data_);
  4122. int32_data_.InternalSwap(&other->int32_data_);
  4123. string_data_.InternalSwap(&other->string_data_);
  4124. int64_data_.InternalSwap(&other->int64_data_);
  4125. double_data_.InternalSwap(&other->double_data_);
  4126. uint64_data_.InternalSwap(&other->uint64_data_);
  4127. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  4128. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  4129. &name_, lhs_arena,
  4130. &other->name_, rhs_arena
  4131. );
  4132. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  4133. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  4134. &raw_data_, lhs_arena,
  4135. &other->raw_data_, rhs_arena
  4136. );
  4137. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  4138. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  4139. &doc_string_, lhs_arena,
  4140. &other->doc_string_, rhs_arena
  4141. );
  4142. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  4143. PROTOBUF_FIELD_OFFSET(TensorProto, data_type_)
  4144. + sizeof(TensorProto::data_type_)
  4145. - PROTOBUF_FIELD_OFFSET(TensorProto, segment_)>(
  4146. reinterpret_cast<char*>(&segment_),
  4147. reinterpret_cast<char*>(&other->segment_));
  4148. }
  4149. ::PROTOBUF_NAMESPACE_ID::Metadata TensorProto::GetMetadata() const {
  4150. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  4151. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  4152. file_level_metadata_opencv_2donnx_2eproto[7]);
  4153. }
  4154. // ===================================================================
  4155. class TensorShapeProto_Dimension::_Internal {
  4156. public:
  4157. using HasBits = decltype(std::declval<TensorShapeProto_Dimension>()._has_bits_);
  4158. static void set_has_denotation(HasBits* has_bits) {
  4159. (*has_bits)[0] |= 1u;
  4160. }
  4161. };
  4162. TensorShapeProto_Dimension::TensorShapeProto_Dimension(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  4163. bool is_message_owned)
  4164. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  4165. SharedCtor();
  4166. if (!is_message_owned) {
  4167. RegisterArenaDtor(arena);
  4168. }
  4169. // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorShapeProto.Dimension)
  4170. }
  4171. TensorShapeProto_Dimension::TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from)
  4172. : ::PROTOBUF_NAMESPACE_ID::Message(),
  4173. _has_bits_(from._has_bits_) {
  4174. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  4175. denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4176. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  4177. denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  4178. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  4179. if (from._internal_has_denotation()) {
  4180. denotation_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_denotation(),
  4181. GetArenaForAllocation());
  4182. }
  4183. clear_has_value();
  4184. switch (from.value_case()) {
  4185. case kDimValue: {
  4186. _internal_set_dim_value(from._internal_dim_value());
  4187. break;
  4188. }
  4189. case kDimParam: {
  4190. _internal_set_dim_param(from._internal_dim_param());
  4191. break;
  4192. }
  4193. case VALUE_NOT_SET: {
  4194. break;
  4195. }
  4196. }
  4197. // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto.Dimension)
  4198. }
  4199. inline void TensorShapeProto_Dimension::SharedCtor() {
  4200. denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4201. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  4202. denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  4203. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  4204. clear_has_value();
  4205. }
  4206. TensorShapeProto_Dimension::~TensorShapeProto_Dimension() {
  4207. // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto.Dimension)
  4208. if (GetArenaForAllocation() != nullptr) return;
  4209. SharedDtor();
  4210. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  4211. }
  4212. inline void TensorShapeProto_Dimension::SharedDtor() {
  4213. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  4214. denotation_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4215. if (has_value()) {
  4216. clear_value();
  4217. }
  4218. }
  4219. void TensorShapeProto_Dimension::ArenaDtor(void* object) {
  4220. TensorShapeProto_Dimension* _this = reinterpret_cast< TensorShapeProto_Dimension* >(object);
  4221. (void)_this;
  4222. }
  4223. void TensorShapeProto_Dimension::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  4224. }
  4225. void TensorShapeProto_Dimension::SetCachedSize(int size) const {
  4226. _cached_size_.Set(size);
  4227. }
  4228. void TensorShapeProto_Dimension::clear_value() {
  4229. // @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TensorShapeProto.Dimension)
  4230. switch (value_case()) {
  4231. case kDimValue: {
  4232. // No need to clear
  4233. break;
  4234. }
  4235. case kDimParam: {
  4236. value_.dim_param_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
  4237. break;
  4238. }
  4239. case VALUE_NOT_SET: {
  4240. break;
  4241. }
  4242. }
  4243. _oneof_case_[0] = VALUE_NOT_SET;
  4244. }
  4245. void TensorShapeProto_Dimension::Clear() {
  4246. // @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto.Dimension)
  4247. uint32_t cached_has_bits = 0;
  4248. // Prevent compiler warnings about cached_has_bits being unused
  4249. (void) cached_has_bits;
  4250. cached_has_bits = _has_bits_[0];
  4251. if (cached_has_bits & 0x00000001u) {
  4252. denotation_.ClearNonDefaultToEmpty();
  4253. }
  4254. clear_value();
  4255. _has_bits_.Clear();
  4256. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  4257. }
  4258. const char* TensorShapeProto_Dimension::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  4259. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  4260. _Internal::HasBits has_bits{};
  4261. while (!ctx->Done(&ptr)) {
  4262. uint32_t tag;
  4263. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  4264. switch (tag >> 3) {
  4265. // int64 dim_value = 1;
  4266. case 1:
  4267. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
  4268. _internal_set_dim_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
  4269. CHK_(ptr);
  4270. } else
  4271. goto handle_unusual;
  4272. continue;
  4273. // string dim_param = 2;
  4274. case 2:
  4275. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  4276. auto str = _internal_mutable_dim_param();
  4277. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  4278. #ifndef NDEBUG
  4279. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorShapeProto.Dimension.dim_param");
  4280. #endif // !NDEBUG
  4281. CHK_(ptr);
  4282. } else
  4283. goto handle_unusual;
  4284. continue;
  4285. // optional string denotation = 3;
  4286. case 3:
  4287. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
  4288. auto str = _internal_mutable_denotation();
  4289. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  4290. #ifndef NDEBUG
  4291. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorShapeProto.Dimension.denotation");
  4292. #endif // !NDEBUG
  4293. CHK_(ptr);
  4294. } else
  4295. goto handle_unusual;
  4296. continue;
  4297. default:
  4298. goto handle_unusual;
  4299. } // switch
  4300. handle_unusual:
  4301. if ((tag == 0) || ((tag & 7) == 4)) {
  4302. CHK_(ptr);
  4303. ctx->SetLastTag(tag);
  4304. goto message_done;
  4305. }
  4306. ptr = UnknownFieldParse(
  4307. tag,
  4308. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  4309. ptr, ctx);
  4310. CHK_(ptr != nullptr);
  4311. } // while
  4312. message_done:
  4313. _has_bits_.Or(has_bits);
  4314. return ptr;
  4315. failure:
  4316. ptr = nullptr;
  4317. goto message_done;
  4318. #undef CHK_
  4319. }
  4320. uint8_t* TensorShapeProto_Dimension::_InternalSerialize(
  4321. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  4322. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto.Dimension)
  4323. uint32_t cached_has_bits = 0;
  4324. (void) cached_has_bits;
  4325. switch (value_case()) {
  4326. case kDimValue: {
  4327. target = stream->EnsureSpace(target);
  4328. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_dim_value(), target);
  4329. break;
  4330. }
  4331. case kDimParam: {
  4332. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  4333. this->_internal_dim_param().data(), static_cast<int>(this->_internal_dim_param().length()),
  4334. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  4335. "opencv_onnx.TensorShapeProto.Dimension.dim_param");
  4336. target = stream->WriteStringMaybeAliased(
  4337. 2, this->_internal_dim_param(), target);
  4338. break;
  4339. }
  4340. default: ;
  4341. }
  4342. cached_has_bits = _has_bits_[0];
  4343. // optional string denotation = 3;
  4344. if (cached_has_bits & 0x00000001u) {
  4345. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  4346. this->_internal_denotation().data(), static_cast<int>(this->_internal_denotation().length()),
  4347. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  4348. "opencv_onnx.TensorShapeProto.Dimension.denotation");
  4349. target = stream->WriteStringMaybeAliased(
  4350. 3, this->_internal_denotation(), target);
  4351. }
  4352. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  4353. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  4354. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  4355. }
  4356. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto.Dimension)
  4357. return target;
  4358. }
  4359. size_t TensorShapeProto_Dimension::ByteSizeLong() const {
  4360. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto.Dimension)
  4361. size_t total_size = 0;
  4362. uint32_t cached_has_bits = 0;
  4363. // Prevent compiler warnings about cached_has_bits being unused
  4364. (void) cached_has_bits;
  4365. // optional string denotation = 3;
  4366. cached_has_bits = _has_bits_[0];
  4367. if (cached_has_bits & 0x00000001u) {
  4368. total_size += 1 +
  4369. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  4370. this->_internal_denotation());
  4371. }
  4372. switch (value_case()) {
  4373. // int64 dim_value = 1;
  4374. case kDimValue: {
  4375. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_dim_value());
  4376. break;
  4377. }
  4378. // string dim_param = 2;
  4379. case kDimParam: {
  4380. total_size += 1 +
  4381. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  4382. this->_internal_dim_param());
  4383. break;
  4384. }
  4385. case VALUE_NOT_SET: {
  4386. break;
  4387. }
  4388. }
  4389. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  4390. }
  4391. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto_Dimension::_class_data_ = {
  4392. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  4393. TensorShapeProto_Dimension::MergeImpl
  4394. };
  4395. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto_Dimension::GetClassData() const { return &_class_data_; }
  4396. void TensorShapeProto_Dimension::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  4397. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  4398. static_cast<TensorShapeProto_Dimension *>(to)->MergeFrom(
  4399. static_cast<const TensorShapeProto_Dimension &>(from));
  4400. }
  4401. void TensorShapeProto_Dimension::MergeFrom(const TensorShapeProto_Dimension& from) {
  4402. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto.Dimension)
  4403. GOOGLE_DCHECK_NE(&from, this);
  4404. uint32_t cached_has_bits = 0;
  4405. (void) cached_has_bits;
  4406. if (from._internal_has_denotation()) {
  4407. _internal_set_denotation(from._internal_denotation());
  4408. }
  4409. switch (from.value_case()) {
  4410. case kDimValue: {
  4411. _internal_set_dim_value(from._internal_dim_value());
  4412. break;
  4413. }
  4414. case kDimParam: {
  4415. _internal_set_dim_param(from._internal_dim_param());
  4416. break;
  4417. }
  4418. case VALUE_NOT_SET: {
  4419. break;
  4420. }
  4421. }
  4422. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  4423. }
  4424. void TensorShapeProto_Dimension::CopyFrom(const TensorShapeProto_Dimension& from) {
  4425. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorShapeProto.Dimension)
  4426. if (&from == this) return;
  4427. Clear();
  4428. MergeFrom(from);
  4429. }
  4430. bool TensorShapeProto_Dimension::IsInitialized() const {
  4431. return true;
  4432. }
  4433. void TensorShapeProto_Dimension::InternalSwap(TensorShapeProto_Dimension* other) {
  4434. using std::swap;
  4435. auto* lhs_arena = GetArenaForAllocation();
  4436. auto* rhs_arena = other->GetArenaForAllocation();
  4437. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  4438. swap(_has_bits_[0], other->_has_bits_[0]);
  4439. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  4440. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  4441. &denotation_, lhs_arena,
  4442. &other->denotation_, rhs_arena
  4443. );
  4444. swap(value_, other->value_);
  4445. swap(_oneof_case_[0], other->_oneof_case_[0]);
  4446. }
  4447. ::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto_Dimension::GetMetadata() const {
  4448. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  4449. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  4450. file_level_metadata_opencv_2donnx_2eproto[8]);
  4451. }
  4452. // ===================================================================
  4453. class TensorShapeProto::_Internal {
  4454. public:
  4455. };
  4456. TensorShapeProto::TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  4457. bool is_message_owned)
  4458. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  4459. dim_(arena) {
  4460. SharedCtor();
  4461. if (!is_message_owned) {
  4462. RegisterArenaDtor(arena);
  4463. }
  4464. // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorShapeProto)
  4465. }
  4466. TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)
  4467. : ::PROTOBUF_NAMESPACE_ID::Message(),
  4468. dim_(from.dim_) {
  4469. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  4470. // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto)
  4471. }
  4472. inline void TensorShapeProto::SharedCtor() {
  4473. }
  4474. TensorShapeProto::~TensorShapeProto() {
  4475. // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto)
  4476. if (GetArenaForAllocation() != nullptr) return;
  4477. SharedDtor();
  4478. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  4479. }
  4480. inline void TensorShapeProto::SharedDtor() {
  4481. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  4482. }
  4483. void TensorShapeProto::ArenaDtor(void* object) {
  4484. TensorShapeProto* _this = reinterpret_cast< TensorShapeProto* >(object);
  4485. (void)_this;
  4486. }
  4487. void TensorShapeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  4488. }
  4489. void TensorShapeProto::SetCachedSize(int size) const {
  4490. _cached_size_.Set(size);
  4491. }
  4492. void TensorShapeProto::Clear() {
  4493. // @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto)
  4494. uint32_t cached_has_bits = 0;
  4495. // Prevent compiler warnings about cached_has_bits being unused
  4496. (void) cached_has_bits;
  4497. dim_.Clear();
  4498. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  4499. }
  4500. const char* TensorShapeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  4501. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  4502. while (!ctx->Done(&ptr)) {
  4503. uint32_t tag;
  4504. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  4505. switch (tag >> 3) {
  4506. // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
  4507. case 1:
  4508. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  4509. ptr -= 1;
  4510. do {
  4511. ptr += 1;
  4512. ptr = ctx->ParseMessage(_internal_add_dim(), ptr);
  4513. CHK_(ptr);
  4514. if (!ctx->DataAvailable(ptr)) break;
  4515. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
  4516. } else
  4517. goto handle_unusual;
  4518. continue;
  4519. default:
  4520. goto handle_unusual;
  4521. } // switch
  4522. handle_unusual:
  4523. if ((tag == 0) || ((tag & 7) == 4)) {
  4524. CHK_(ptr);
  4525. ctx->SetLastTag(tag);
  4526. goto message_done;
  4527. }
  4528. ptr = UnknownFieldParse(
  4529. tag,
  4530. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  4531. ptr, ctx);
  4532. CHK_(ptr != nullptr);
  4533. } // while
  4534. message_done:
  4535. return ptr;
  4536. failure:
  4537. ptr = nullptr;
  4538. goto message_done;
  4539. #undef CHK_
  4540. }
  4541. uint8_t* TensorShapeProto::_InternalSerialize(
  4542. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  4543. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto)
  4544. uint32_t cached_has_bits = 0;
  4545. (void) cached_has_bits;
  4546. // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
  4547. for (unsigned int i = 0,
  4548. n = static_cast<unsigned int>(this->_internal_dim_size()); i < n; i++) {
  4549. target = stream->EnsureSpace(target);
  4550. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  4551. InternalWriteMessage(1, this->_internal_dim(i), target, stream);
  4552. }
  4553. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  4554. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  4555. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  4556. }
  4557. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto)
  4558. return target;
  4559. }
  4560. size_t TensorShapeProto::ByteSizeLong() const {
  4561. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto)
  4562. size_t total_size = 0;
  4563. uint32_t cached_has_bits = 0;
  4564. // Prevent compiler warnings about cached_has_bits being unused
  4565. (void) cached_has_bits;
  4566. // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
  4567. total_size += 1UL * this->_internal_dim_size();
  4568. for (const auto& msg : this->dim_) {
  4569. total_size +=
  4570. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  4571. }
  4572. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  4573. }
  4574. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto::_class_data_ = {
  4575. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  4576. TensorShapeProto::MergeImpl
  4577. };
  4578. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto::GetClassData() const { return &_class_data_; }
  4579. void TensorShapeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  4580. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  4581. static_cast<TensorShapeProto *>(to)->MergeFrom(
  4582. static_cast<const TensorShapeProto &>(from));
  4583. }
  4584. void TensorShapeProto::MergeFrom(const TensorShapeProto& from) {
  4585. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto)
  4586. GOOGLE_DCHECK_NE(&from, this);
  4587. uint32_t cached_has_bits = 0;
  4588. (void) cached_has_bits;
  4589. dim_.MergeFrom(from.dim_);
  4590. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  4591. }
  4592. void TensorShapeProto::CopyFrom(const TensorShapeProto& from) {
  4593. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorShapeProto)
  4594. if (&from == this) return;
  4595. Clear();
  4596. MergeFrom(from);
  4597. }
  4598. bool TensorShapeProto::IsInitialized() const {
  4599. return true;
  4600. }
  4601. void TensorShapeProto::InternalSwap(TensorShapeProto* other) {
  4602. using std::swap;
  4603. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  4604. dim_.InternalSwap(&other->dim_);
  4605. }
  4606. ::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto::GetMetadata() const {
  4607. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  4608. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  4609. file_level_metadata_opencv_2donnx_2eproto[9]);
  4610. }
  4611. // ===================================================================
  4612. class TypeProto_Tensor::_Internal {
  4613. public:
  4614. using HasBits = decltype(std::declval<TypeProto_Tensor>()._has_bits_);
  4615. static void set_has_elem_type(HasBits* has_bits) {
  4616. (*has_bits)[0] |= 2u;
  4617. }
  4618. static const ::opencv_onnx::TensorShapeProto& shape(const TypeProto_Tensor* msg);
  4619. static void set_has_shape(HasBits* has_bits) {
  4620. (*has_bits)[0] |= 1u;
  4621. }
  4622. };
  4623. const ::opencv_onnx::TensorShapeProto&
  4624. TypeProto_Tensor::_Internal::shape(const TypeProto_Tensor* msg) {
  4625. return *msg->shape_;
  4626. }
  4627. TypeProto_Tensor::TypeProto_Tensor(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  4628. bool is_message_owned)
  4629. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  4630. SharedCtor();
  4631. if (!is_message_owned) {
  4632. RegisterArenaDtor(arena);
  4633. }
  4634. // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Tensor)
  4635. }
  4636. TypeProto_Tensor::TypeProto_Tensor(const TypeProto_Tensor& from)
  4637. : ::PROTOBUF_NAMESPACE_ID::Message(),
  4638. _has_bits_(from._has_bits_) {
  4639. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  4640. if (from._internal_has_shape()) {
  4641. shape_ = new ::opencv_onnx::TensorShapeProto(*from.shape_);
  4642. } else {
  4643. shape_ = nullptr;
  4644. }
  4645. elem_type_ = from.elem_type_;
  4646. // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Tensor)
  4647. }
  4648. inline void TypeProto_Tensor::SharedCtor() {
  4649. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  4650. reinterpret_cast<char*>(&shape_) - reinterpret_cast<char*>(this)),
  4651. 0, static_cast<size_t>(reinterpret_cast<char*>(&elem_type_) -
  4652. reinterpret_cast<char*>(&shape_)) + sizeof(elem_type_));
  4653. }
  4654. TypeProto_Tensor::~TypeProto_Tensor() {
  4655. // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Tensor)
  4656. if (GetArenaForAllocation() != nullptr) return;
  4657. SharedDtor();
  4658. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  4659. }
  4660. inline void TypeProto_Tensor::SharedDtor() {
  4661. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  4662. if (this != internal_default_instance()) delete shape_;
  4663. }
  4664. void TypeProto_Tensor::ArenaDtor(void* object) {
  4665. TypeProto_Tensor* _this = reinterpret_cast< TypeProto_Tensor* >(object);
  4666. (void)_this;
  4667. }
  4668. void TypeProto_Tensor::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  4669. }
  4670. void TypeProto_Tensor::SetCachedSize(int size) const {
  4671. _cached_size_.Set(size);
  4672. }
  4673. void TypeProto_Tensor::Clear() {
  4674. // @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto.Tensor)
  4675. uint32_t cached_has_bits = 0;
  4676. // Prevent compiler warnings about cached_has_bits being unused
  4677. (void) cached_has_bits;
  4678. cached_has_bits = _has_bits_[0];
  4679. if (cached_has_bits & 0x00000001u) {
  4680. GOOGLE_DCHECK(shape_ != nullptr);
  4681. shape_->Clear();
  4682. }
  4683. elem_type_ = 0;
  4684. _has_bits_.Clear();
  4685. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  4686. }
  4687. const char* TypeProto_Tensor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  4688. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  4689. _Internal::HasBits has_bits{};
  4690. while (!ctx->Done(&ptr)) {
  4691. uint32_t tag;
  4692. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  4693. switch (tag >> 3) {
  4694. // optional .opencv_onnx.TensorProto.DataType elem_type = 1;
  4695. case 1:
  4696. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
  4697. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  4698. CHK_(ptr);
  4699. if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::TensorProto_DataType_IsValid(val))) {
  4700. _internal_set_elem_type(static_cast<::opencv_onnx::TensorProto_DataType>(val));
  4701. } else {
  4702. ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
  4703. }
  4704. } else
  4705. goto handle_unusual;
  4706. continue;
  4707. // optional .opencv_onnx.TensorShapeProto shape = 2;
  4708. case 2:
  4709. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  4710. ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr);
  4711. CHK_(ptr);
  4712. } else
  4713. goto handle_unusual;
  4714. continue;
  4715. default:
  4716. goto handle_unusual;
  4717. } // switch
  4718. handle_unusual:
  4719. if ((tag == 0) || ((tag & 7) == 4)) {
  4720. CHK_(ptr);
  4721. ctx->SetLastTag(tag);
  4722. goto message_done;
  4723. }
  4724. ptr = UnknownFieldParse(
  4725. tag,
  4726. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  4727. ptr, ctx);
  4728. CHK_(ptr != nullptr);
  4729. } // while
  4730. message_done:
  4731. _has_bits_.Or(has_bits);
  4732. return ptr;
  4733. failure:
  4734. ptr = nullptr;
  4735. goto message_done;
  4736. #undef CHK_
  4737. }
  4738. uint8_t* TypeProto_Tensor::_InternalSerialize(
  4739. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  4740. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto.Tensor)
  4741. uint32_t cached_has_bits = 0;
  4742. (void) cached_has_bits;
  4743. cached_has_bits = _has_bits_[0];
  4744. // optional .opencv_onnx.TensorProto.DataType elem_type = 1;
  4745. if (cached_has_bits & 0x00000002u) {
  4746. target = stream->EnsureSpace(target);
  4747. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
  4748. 1, this->_internal_elem_type(), target);
  4749. }
  4750. // optional .opencv_onnx.TensorShapeProto shape = 2;
  4751. if (cached_has_bits & 0x00000001u) {
  4752. target = stream->EnsureSpace(target);
  4753. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  4754. InternalWriteMessage(
  4755. 2, _Internal::shape(this), target, stream);
  4756. }
  4757. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  4758. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  4759. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  4760. }
  4761. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Tensor)
  4762. return target;
  4763. }
  4764. size_t TypeProto_Tensor::ByteSizeLong() const {
  4765. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Tensor)
  4766. size_t total_size = 0;
  4767. uint32_t cached_has_bits = 0;
  4768. // Prevent compiler warnings about cached_has_bits being unused
  4769. (void) cached_has_bits;
  4770. cached_has_bits = _has_bits_[0];
  4771. if (cached_has_bits & 0x00000003u) {
  4772. // optional .opencv_onnx.TensorShapeProto shape = 2;
  4773. if (cached_has_bits & 0x00000001u) {
  4774. total_size += 1 +
  4775. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  4776. *shape_);
  4777. }
  4778. // optional .opencv_onnx.TensorProto.DataType elem_type = 1;
  4779. if (cached_has_bits & 0x00000002u) {
  4780. total_size += 1 +
  4781. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_elem_type());
  4782. }
  4783. }
  4784. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  4785. }
  4786. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TypeProto_Tensor::_class_data_ = {
  4787. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  4788. TypeProto_Tensor::MergeImpl
  4789. };
  4790. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TypeProto_Tensor::GetClassData() const { return &_class_data_; }
  4791. void TypeProto_Tensor::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  4792. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  4793. static_cast<TypeProto_Tensor *>(to)->MergeFrom(
  4794. static_cast<const TypeProto_Tensor &>(from));
  4795. }
  4796. void TypeProto_Tensor::MergeFrom(const TypeProto_Tensor& from) {
  4797. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Tensor)
  4798. GOOGLE_DCHECK_NE(&from, this);
  4799. uint32_t cached_has_bits = 0;
  4800. (void) cached_has_bits;
  4801. cached_has_bits = from._has_bits_[0];
  4802. if (cached_has_bits & 0x00000003u) {
  4803. if (cached_has_bits & 0x00000001u) {
  4804. _internal_mutable_shape()->::opencv_onnx::TensorShapeProto::MergeFrom(from._internal_shape());
  4805. }
  4806. if (cached_has_bits & 0x00000002u) {
  4807. elem_type_ = from.elem_type_;
  4808. }
  4809. _has_bits_[0] |= cached_has_bits;
  4810. }
  4811. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  4812. }
  4813. void TypeProto_Tensor::CopyFrom(const TypeProto_Tensor& from) {
  4814. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto.Tensor)
  4815. if (&from == this) return;
  4816. Clear();
  4817. MergeFrom(from);
  4818. }
  4819. bool TypeProto_Tensor::IsInitialized() const {
  4820. return true;
  4821. }
  4822. void TypeProto_Tensor::InternalSwap(TypeProto_Tensor* other) {
  4823. using std::swap;
  4824. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  4825. swap(_has_bits_[0], other->_has_bits_[0]);
  4826. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  4827. PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, elem_type_)
  4828. + sizeof(TypeProto_Tensor::elem_type_)
  4829. - PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, shape_)>(
  4830. reinterpret_cast<char*>(&shape_),
  4831. reinterpret_cast<char*>(&other->shape_));
  4832. }
  4833. ::PROTOBUF_NAMESPACE_ID::Metadata TypeProto_Tensor::GetMetadata() const {
  4834. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  4835. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  4836. file_level_metadata_opencv_2donnx_2eproto[10]);
  4837. }
  4838. // ===================================================================
  4839. class TypeProto::_Internal {
  4840. public:
  4841. using HasBits = decltype(std::declval<TypeProto>()._has_bits_);
  4842. static const ::opencv_onnx::TypeProto_Tensor& tensor_type(const TypeProto* msg);
  4843. static void set_has_denotation(HasBits* has_bits) {
  4844. (*has_bits)[0] |= 1u;
  4845. }
  4846. };
  4847. const ::opencv_onnx::TypeProto_Tensor&
  4848. TypeProto::_Internal::tensor_type(const TypeProto* msg) {
  4849. return *msg->value_.tensor_type_;
  4850. }
  4851. void TypeProto::set_allocated_tensor_type(::opencv_onnx::TypeProto_Tensor* tensor_type) {
  4852. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  4853. clear_value();
  4854. if (tensor_type) {
  4855. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  4856. ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto_Tensor>::GetOwningArena(tensor_type);
  4857. if (message_arena != submessage_arena) {
  4858. tensor_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  4859. message_arena, tensor_type, submessage_arena);
  4860. }
  4861. set_has_tensor_type();
  4862. value_.tensor_type_ = tensor_type;
  4863. }
  4864. // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.tensor_type)
  4865. }
  4866. TypeProto::TypeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  4867. bool is_message_owned)
  4868. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  4869. SharedCtor();
  4870. if (!is_message_owned) {
  4871. RegisterArenaDtor(arena);
  4872. }
  4873. // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto)
  4874. }
  4875. TypeProto::TypeProto(const TypeProto& from)
  4876. : ::PROTOBUF_NAMESPACE_ID::Message(),
  4877. _has_bits_(from._has_bits_) {
  4878. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  4879. denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4880. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  4881. denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  4882. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  4883. if (from._internal_has_denotation()) {
  4884. denotation_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_denotation(),
  4885. GetArenaForAllocation());
  4886. }
  4887. clear_has_value();
  4888. switch (from.value_case()) {
  4889. case kTensorType: {
  4890. _internal_mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from._internal_tensor_type());
  4891. break;
  4892. }
  4893. case VALUE_NOT_SET: {
  4894. break;
  4895. }
  4896. }
  4897. // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto)
  4898. }
  4899. inline void TypeProto::SharedCtor() {
  4900. denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4901. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  4902. denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  4903. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  4904. clear_has_value();
  4905. }
  4906. TypeProto::~TypeProto() {
  4907. // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto)
  4908. if (GetArenaForAllocation() != nullptr) return;
  4909. SharedDtor();
  4910. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  4911. }
  4912. inline void TypeProto::SharedDtor() {
  4913. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  4914. denotation_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  4915. if (has_value()) {
  4916. clear_value();
  4917. }
  4918. }
  4919. void TypeProto::ArenaDtor(void* object) {
  4920. TypeProto* _this = reinterpret_cast< TypeProto* >(object);
  4921. (void)_this;
  4922. }
  4923. void TypeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  4924. }
  4925. void TypeProto::SetCachedSize(int size) const {
  4926. _cached_size_.Set(size);
  4927. }
  4928. void TypeProto::clear_value() {
  4929. // @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TypeProto)
  4930. switch (value_case()) {
  4931. case kTensorType: {
  4932. if (GetArenaForAllocation() == nullptr) {
  4933. delete value_.tensor_type_;
  4934. }
  4935. break;
  4936. }
  4937. case VALUE_NOT_SET: {
  4938. break;
  4939. }
  4940. }
  4941. _oneof_case_[0] = VALUE_NOT_SET;
  4942. }
  4943. void TypeProto::Clear() {
  4944. // @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto)
  4945. uint32_t cached_has_bits = 0;
  4946. // Prevent compiler warnings about cached_has_bits being unused
  4947. (void) cached_has_bits;
  4948. cached_has_bits = _has_bits_[0];
  4949. if (cached_has_bits & 0x00000001u) {
  4950. denotation_.ClearNonDefaultToEmpty();
  4951. }
  4952. clear_value();
  4953. _has_bits_.Clear();
  4954. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  4955. }
  4956. const char* TypeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  4957. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  4958. _Internal::HasBits has_bits{};
  4959. while (!ctx->Done(&ptr)) {
  4960. uint32_t tag;
  4961. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  4962. switch (tag >> 3) {
  4963. // .opencv_onnx.TypeProto.Tensor tensor_type = 1;
  4964. case 1:
  4965. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  4966. ptr = ctx->ParseMessage(_internal_mutable_tensor_type(), ptr);
  4967. CHK_(ptr);
  4968. } else
  4969. goto handle_unusual;
  4970. continue;
  4971. // optional string denotation = 6;
  4972. case 6:
  4973. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
  4974. auto str = _internal_mutable_denotation();
  4975. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  4976. #ifndef NDEBUG
  4977. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TypeProto.denotation");
  4978. #endif // !NDEBUG
  4979. CHK_(ptr);
  4980. } else
  4981. goto handle_unusual;
  4982. continue;
  4983. default:
  4984. goto handle_unusual;
  4985. } // switch
  4986. handle_unusual:
  4987. if ((tag == 0) || ((tag & 7) == 4)) {
  4988. CHK_(ptr);
  4989. ctx->SetLastTag(tag);
  4990. goto message_done;
  4991. }
  4992. ptr = UnknownFieldParse(
  4993. tag,
  4994. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  4995. ptr, ctx);
  4996. CHK_(ptr != nullptr);
  4997. } // while
  4998. message_done:
  4999. _has_bits_.Or(has_bits);
  5000. return ptr;
  5001. failure:
  5002. ptr = nullptr;
  5003. goto message_done;
  5004. #undef CHK_
  5005. }
  5006. uint8_t* TypeProto::_InternalSerialize(
  5007. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  5008. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto)
  5009. uint32_t cached_has_bits = 0;
  5010. (void) cached_has_bits;
  5011. // .opencv_onnx.TypeProto.Tensor tensor_type = 1;
  5012. if (_internal_has_tensor_type()) {
  5013. target = stream->EnsureSpace(target);
  5014. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  5015. InternalWriteMessage(
  5016. 1, _Internal::tensor_type(this), target, stream);
  5017. }
  5018. cached_has_bits = _has_bits_[0];
  5019. // optional string denotation = 6;
  5020. if (cached_has_bits & 0x00000001u) {
  5021. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  5022. this->_internal_denotation().data(), static_cast<int>(this->_internal_denotation().length()),
  5023. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  5024. "opencv_onnx.TypeProto.denotation");
  5025. target = stream->WriteStringMaybeAliased(
  5026. 6, this->_internal_denotation(), target);
  5027. }
  5028. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  5029. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  5030. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  5031. }
  5032. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto)
  5033. return target;
  5034. }
  5035. size_t TypeProto::ByteSizeLong() const {
  5036. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto)
  5037. size_t total_size = 0;
  5038. uint32_t cached_has_bits = 0;
  5039. // Prevent compiler warnings about cached_has_bits being unused
  5040. (void) cached_has_bits;
  5041. // optional string denotation = 6;
  5042. cached_has_bits = _has_bits_[0];
  5043. if (cached_has_bits & 0x00000001u) {
  5044. total_size += 1 +
  5045. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  5046. this->_internal_denotation());
  5047. }
  5048. switch (value_case()) {
  5049. // .opencv_onnx.TypeProto.Tensor tensor_type = 1;
  5050. case kTensorType: {
  5051. total_size += 1 +
  5052. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  5053. *value_.tensor_type_);
  5054. break;
  5055. }
  5056. case VALUE_NOT_SET: {
  5057. break;
  5058. }
  5059. }
  5060. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  5061. }
  5062. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TypeProto::_class_data_ = {
  5063. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  5064. TypeProto::MergeImpl
  5065. };
  5066. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TypeProto::GetClassData() const { return &_class_data_; }
  5067. void TypeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  5068. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  5069. static_cast<TypeProto *>(to)->MergeFrom(
  5070. static_cast<const TypeProto &>(from));
  5071. }
  5072. void TypeProto::MergeFrom(const TypeProto& from) {
  5073. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto)
  5074. GOOGLE_DCHECK_NE(&from, this);
  5075. uint32_t cached_has_bits = 0;
  5076. (void) cached_has_bits;
  5077. if (from._internal_has_denotation()) {
  5078. _internal_set_denotation(from._internal_denotation());
  5079. }
  5080. switch (from.value_case()) {
  5081. case kTensorType: {
  5082. _internal_mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from._internal_tensor_type());
  5083. break;
  5084. }
  5085. case VALUE_NOT_SET: {
  5086. break;
  5087. }
  5088. }
  5089. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  5090. }
  5091. void TypeProto::CopyFrom(const TypeProto& from) {
  5092. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto)
  5093. if (&from == this) return;
  5094. Clear();
  5095. MergeFrom(from);
  5096. }
  5097. bool TypeProto::IsInitialized() const {
  5098. return true;
  5099. }
  5100. void TypeProto::InternalSwap(TypeProto* other) {
  5101. using std::swap;
  5102. auto* lhs_arena = GetArenaForAllocation();
  5103. auto* rhs_arena = other->GetArenaForAllocation();
  5104. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  5105. swap(_has_bits_[0], other->_has_bits_[0]);
  5106. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  5107. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  5108. &denotation_, lhs_arena,
  5109. &other->denotation_, rhs_arena
  5110. );
  5111. swap(value_, other->value_);
  5112. swap(_oneof_case_[0], other->_oneof_case_[0]);
  5113. }
  5114. ::PROTOBUF_NAMESPACE_ID::Metadata TypeProto::GetMetadata() const {
  5115. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  5116. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  5117. file_level_metadata_opencv_2donnx_2eproto[11]);
  5118. }
  5119. // ===================================================================
  5120. class OperatorSetIdProto::_Internal {
  5121. public:
  5122. using HasBits = decltype(std::declval<OperatorSetIdProto>()._has_bits_);
  5123. static void set_has_domain(HasBits* has_bits) {
  5124. (*has_bits)[0] |= 1u;
  5125. }
  5126. static void set_has_version(HasBits* has_bits) {
  5127. (*has_bits)[0] |= 2u;
  5128. }
  5129. };
  5130. OperatorSetIdProto::OperatorSetIdProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  5131. bool is_message_owned)
  5132. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  5133. SharedCtor();
  5134. if (!is_message_owned) {
  5135. RegisterArenaDtor(arena);
  5136. }
  5137. // @@protoc_insertion_point(arena_constructor:opencv_onnx.OperatorSetIdProto)
  5138. }
  5139. OperatorSetIdProto::OperatorSetIdProto(const OperatorSetIdProto& from)
  5140. : ::PROTOBUF_NAMESPACE_ID::Message(),
  5141. _has_bits_(from._has_bits_) {
  5142. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  5143. domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5144. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  5145. domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  5146. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  5147. if (from._internal_has_domain()) {
  5148. domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(),
  5149. GetArenaForAllocation());
  5150. }
  5151. version_ = from.version_;
  5152. // @@protoc_insertion_point(copy_constructor:opencv_onnx.OperatorSetIdProto)
  5153. }
  5154. inline void OperatorSetIdProto::SharedCtor() {
  5155. domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5156. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  5157. domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  5158. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  5159. version_ = int64_t{0};
  5160. }
  5161. OperatorSetIdProto::~OperatorSetIdProto() {
  5162. // @@protoc_insertion_point(destructor:opencv_onnx.OperatorSetIdProto)
  5163. if (GetArenaForAllocation() != nullptr) return;
  5164. SharedDtor();
  5165. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  5166. }
  5167. inline void OperatorSetIdProto::SharedDtor() {
  5168. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  5169. domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  5170. }
  5171. void OperatorSetIdProto::ArenaDtor(void* object) {
  5172. OperatorSetIdProto* _this = reinterpret_cast< OperatorSetIdProto* >(object);
  5173. (void)_this;
  5174. }
  5175. void OperatorSetIdProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  5176. }
  5177. void OperatorSetIdProto::SetCachedSize(int size) const {
  5178. _cached_size_.Set(size);
  5179. }
  5180. void OperatorSetIdProto::Clear() {
  5181. // @@protoc_insertion_point(message_clear_start:opencv_onnx.OperatorSetIdProto)
  5182. uint32_t cached_has_bits = 0;
  5183. // Prevent compiler warnings about cached_has_bits being unused
  5184. (void) cached_has_bits;
  5185. cached_has_bits = _has_bits_[0];
  5186. if (cached_has_bits & 0x00000001u) {
  5187. domain_.ClearNonDefaultToEmpty();
  5188. }
  5189. version_ = int64_t{0};
  5190. _has_bits_.Clear();
  5191. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  5192. }
  5193. const char* OperatorSetIdProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  5194. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  5195. _Internal::HasBits has_bits{};
  5196. while (!ctx->Done(&ptr)) {
  5197. uint32_t tag;
  5198. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  5199. switch (tag >> 3) {
  5200. // optional string domain = 1;
  5201. case 1:
  5202. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  5203. auto str = _internal_mutable_domain();
  5204. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  5205. #ifndef NDEBUG
  5206. ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.OperatorSetIdProto.domain");
  5207. #endif // !NDEBUG
  5208. CHK_(ptr);
  5209. } else
  5210. goto handle_unusual;
  5211. continue;
  5212. // optional int64 version = 2;
  5213. case 2:
  5214. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
  5215. _Internal::set_has_version(&has_bits);
  5216. version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  5217. CHK_(ptr);
  5218. } else
  5219. goto handle_unusual;
  5220. continue;
  5221. default:
  5222. goto handle_unusual;
  5223. } // switch
  5224. handle_unusual:
  5225. if ((tag == 0) || ((tag & 7) == 4)) {
  5226. CHK_(ptr);
  5227. ctx->SetLastTag(tag);
  5228. goto message_done;
  5229. }
  5230. ptr = UnknownFieldParse(
  5231. tag,
  5232. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  5233. ptr, ctx);
  5234. CHK_(ptr != nullptr);
  5235. } // while
  5236. message_done:
  5237. _has_bits_.Or(has_bits);
  5238. return ptr;
  5239. failure:
  5240. ptr = nullptr;
  5241. goto message_done;
  5242. #undef CHK_
  5243. }
  5244. uint8_t* OperatorSetIdProto::_InternalSerialize(
  5245. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  5246. // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.OperatorSetIdProto)
  5247. uint32_t cached_has_bits = 0;
  5248. (void) cached_has_bits;
  5249. cached_has_bits = _has_bits_[0];
  5250. // optional string domain = 1;
  5251. if (cached_has_bits & 0x00000001u) {
  5252. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
  5253. this->_internal_domain().data(), static_cast<int>(this->_internal_domain().length()),
  5254. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
  5255. "opencv_onnx.OperatorSetIdProto.domain");
  5256. target = stream->WriteStringMaybeAliased(
  5257. 1, this->_internal_domain(), target);
  5258. }
  5259. // optional int64 version = 2;
  5260. if (cached_has_bits & 0x00000002u) {
  5261. target = stream->EnsureSpace(target);
  5262. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_version(), target);
  5263. }
  5264. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  5265. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  5266. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  5267. }
  5268. // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.OperatorSetIdProto)
  5269. return target;
  5270. }
  5271. size_t OperatorSetIdProto::ByteSizeLong() const {
  5272. // @@protoc_insertion_point(message_byte_size_start:opencv_onnx.OperatorSetIdProto)
  5273. size_t total_size = 0;
  5274. uint32_t cached_has_bits = 0;
  5275. // Prevent compiler warnings about cached_has_bits being unused
  5276. (void) cached_has_bits;
  5277. cached_has_bits = _has_bits_[0];
  5278. if (cached_has_bits & 0x00000003u) {
  5279. // optional string domain = 1;
  5280. if (cached_has_bits & 0x00000001u) {
  5281. total_size += 1 +
  5282. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  5283. this->_internal_domain());
  5284. }
  5285. // optional int64 version = 2;
  5286. if (cached_has_bits & 0x00000002u) {
  5287. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_version());
  5288. }
  5289. }
  5290. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  5291. }
  5292. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData OperatorSetIdProto::_class_data_ = {
  5293. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  5294. OperatorSetIdProto::MergeImpl
  5295. };
  5296. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*OperatorSetIdProto::GetClassData() const { return &_class_data_; }
  5297. void OperatorSetIdProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  5298. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  5299. static_cast<OperatorSetIdProto *>(to)->MergeFrom(
  5300. static_cast<const OperatorSetIdProto &>(from));
  5301. }
  5302. void OperatorSetIdProto::MergeFrom(const OperatorSetIdProto& from) {
  5303. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.OperatorSetIdProto)
  5304. GOOGLE_DCHECK_NE(&from, this);
  5305. uint32_t cached_has_bits = 0;
  5306. (void) cached_has_bits;
  5307. cached_has_bits = from._has_bits_[0];
  5308. if (cached_has_bits & 0x00000003u) {
  5309. if (cached_has_bits & 0x00000001u) {
  5310. _internal_set_domain(from._internal_domain());
  5311. }
  5312. if (cached_has_bits & 0x00000002u) {
  5313. version_ = from.version_;
  5314. }
  5315. _has_bits_[0] |= cached_has_bits;
  5316. }
  5317. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  5318. }
  5319. void OperatorSetIdProto::CopyFrom(const OperatorSetIdProto& from) {
  5320. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.OperatorSetIdProto)
  5321. if (&from == this) return;
  5322. Clear();
  5323. MergeFrom(from);
  5324. }
  5325. bool OperatorSetIdProto::IsInitialized() const {
  5326. return true;
  5327. }
  5328. void OperatorSetIdProto::InternalSwap(OperatorSetIdProto* other) {
  5329. using std::swap;
  5330. auto* lhs_arena = GetArenaForAllocation();
  5331. auto* rhs_arena = other->GetArenaForAllocation();
  5332. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  5333. swap(_has_bits_[0], other->_has_bits_[0]);
  5334. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  5335. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  5336. &domain_, lhs_arena,
  5337. &other->domain_, rhs_arena
  5338. );
  5339. swap(version_, other->version_);
  5340. }
  5341. ::PROTOBUF_NAMESPACE_ID::Metadata OperatorSetIdProto::GetMetadata() const {
  5342. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  5343. &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once,
  5344. file_level_metadata_opencv_2donnx_2eproto[12]);
  5345. }
  5346. // @@protoc_insertion_point(namespace_scope)
  5347. } // namespace opencv_onnx
  5348. PROTOBUF_NAMESPACE_OPEN
  5349. template<> PROTOBUF_NOINLINE ::opencv_onnx::AttributeProto* Arena::CreateMaybeMessage< ::opencv_onnx::AttributeProto >(Arena* arena) {
  5350. return Arena::CreateMessageInternal< ::opencv_onnx::AttributeProto >(arena);
  5351. }
  5352. template<> PROTOBUF_NOINLINE ::opencv_onnx::ValueInfoProto* Arena::CreateMaybeMessage< ::opencv_onnx::ValueInfoProto >(Arena* arena) {
  5353. return Arena::CreateMessageInternal< ::opencv_onnx::ValueInfoProto >(arena);
  5354. }
  5355. template<> PROTOBUF_NOINLINE ::opencv_onnx::NodeProto* Arena::CreateMaybeMessage< ::opencv_onnx::NodeProto >(Arena* arena) {
  5356. return Arena::CreateMessageInternal< ::opencv_onnx::NodeProto >(arena);
  5357. }
  5358. template<> PROTOBUF_NOINLINE ::opencv_onnx::ModelProto* Arena::CreateMaybeMessage< ::opencv_onnx::ModelProto >(Arena* arena) {
  5359. return Arena::CreateMessageInternal< ::opencv_onnx::ModelProto >(arena);
  5360. }
  5361. template<> PROTOBUF_NOINLINE ::opencv_onnx::StringStringEntryProto* Arena::CreateMaybeMessage< ::opencv_onnx::StringStringEntryProto >(Arena* arena) {
  5362. return Arena::CreateMessageInternal< ::opencv_onnx::StringStringEntryProto >(arena);
  5363. }
  5364. template<> PROTOBUF_NOINLINE ::opencv_onnx::GraphProto* Arena::CreateMaybeMessage< ::opencv_onnx::GraphProto >(Arena* arena) {
  5365. return Arena::CreateMessageInternal< ::opencv_onnx::GraphProto >(arena);
  5366. }
  5367. template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorProto_Segment* Arena::CreateMaybeMessage< ::opencv_onnx::TensorProto_Segment >(Arena* arena) {
  5368. return Arena::CreateMessageInternal< ::opencv_onnx::TensorProto_Segment >(arena);
  5369. }
  5370. template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorProto* Arena::CreateMaybeMessage< ::opencv_onnx::TensorProto >(Arena* arena) {
  5371. return Arena::CreateMessageInternal< ::opencv_onnx::TensorProto >(arena);
  5372. }
  5373. template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorShapeProto_Dimension* Arena::CreateMaybeMessage< ::opencv_onnx::TensorShapeProto_Dimension >(Arena* arena) {
  5374. return Arena::CreateMessageInternal< ::opencv_onnx::TensorShapeProto_Dimension >(arena);
  5375. }
  5376. template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorShapeProto* Arena::CreateMaybeMessage< ::opencv_onnx::TensorShapeProto >(Arena* arena) {
  5377. return Arena::CreateMessageInternal< ::opencv_onnx::TensorShapeProto >(arena);
  5378. }
  5379. template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_Tensor* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_Tensor >(Arena* arena) {
  5380. return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_Tensor >(arena);
  5381. }
  5382. template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto >(Arena* arena) {
  5383. return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto >(arena);
  5384. }
  5385. template<> PROTOBUF_NOINLINE ::opencv_onnx::OperatorSetIdProto* Arena::CreateMaybeMessage< ::opencv_onnx::OperatorSetIdProto >(Arena* arena) {
  5386. return Arena::CreateMessageInternal< ::opencv_onnx::OperatorSetIdProto >(arena);
  5387. }
  5388. PROTOBUF_NAMESPACE_CLOSE
  5389. // @@protoc_insertion_point(global_scope)
  5390. #include <google/protobuf/port_undef.inc>