hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
588 values
lang
stringclasses
305 values
max_stars_repo_path
stringlengths
3
363
max_stars_repo_name
stringlengths
5
118
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringdate
2015-01-01 00:00:35
2022-03-31 23:43:49
max_stars_repo_stars_event_max_datetime
stringdate
2015-01-01 12:37:38
2022-03-31 23:59:52
max_issues_repo_path
stringlengths
3
363
max_issues_repo_name
stringlengths
5
118
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
float64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
363
max_forks_repo_name
stringlengths
5
135
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringdate
2015-01-01 00:01:02
2022-03-31 23:27:27
max_forks_repo_forks_event_max_datetime
stringdate
2015-01-03 08:55:07
2022-03-31 23:59:24
content
stringlengths
5
1.05M
avg_line_length
float64
1.13
1.04M
max_line_length
int64
1
1.05M
alphanum_fraction
float64
0
1
cf2e86c21b88e40b98c0256969741fd2397c2298
8,325
h
C
3rdparty/WebRTC/linux/include/webrtc/third_party/blink/renderer/core/fetch/fetch_request_data.h
VirgilSecurity/virgil-webrtc-qt-demo
1c9ebe3893629ad396be6e187657df870b06322b
[ "BSD-3-Clause" ]
5
2020-12-17T06:55:53.000Z
2021-09-30T13:06:58.000Z
webrtc/include/third_party/blink/renderer/core/fetch/fetch_request_data.h
Smileglaze/RtcWinDemo
14c3d2c1db3731a756588e829b91c4edd704b5e8
[ "MIT" ]
1
2021-05-04T15:22:19.000Z
2021-05-10T13:49:25.000Z
3rdparty/WebRTC/android/include/webrtc/third_party/blink/renderer/core/fetch/fetch_request_data.h
VirgilSecurity/virgil-webrtc-qt-demo
1c9ebe3893629ad396be6e187657df870b06322b
[ "BSD-3-Clause" ]
8
2020-09-30T10:06:31.000Z
2022-03-29T21:17:21.000Z
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FETCH_FETCH_REQUEST_DATA_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_FETCH_FETCH_REQUEST_DATA_H_ #include "base/macros.h" #include "base/memory/scoped_refptr.h" #include "base/unguessable_token.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "services/network/public/mojom/fetch_api.mojom-blink-forward.h" #include "services/network/public/mojom/referrer_policy.mojom-blink-forward.h" #include "services/network/public/mojom/trust_tokens.mojom-blink.h" #include "services/network/public/mojom/url_loader_factory.mojom-blink.h" #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h" #include "third_party/blink/public/platform/web_url_request.h" #include "third_party/blink/renderer/core/fetch/body_stream_buffer.h" #include "third_party/blink/renderer/platform/heap/handle.h" #include "third_party/blink/renderer/platform/loader/fetch/resource_load_priority.h" #include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h" #include "third_party/blink/renderer/platform/mojo/heap_mojo_wrapper_mode.h" #include "third_party/blink/renderer/platform/weborigin/kurl.h" #include "third_party/blink/renderer/platform/weborigin/referrer.h" #include "third_party/blink/renderer/platform/weborigin/security_origin.h" #include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" namespace blink { class ExceptionState; class FetchHeaderList; class SecurityOrigin; class ScriptState; class CORE_EXPORT FetchRequestData final : public GarbageCollected<FetchRequestData> { public: enum Tainting { kBasicTainting, kCorsTainting, kOpaqueTainting }; enum class ForServiceWorkerFetchEvent { kFalse, kTrue }; static FetchRequestData* Create(ScriptState*, const mojom::blink::FetchAPIRequest&, ForServiceWorkerFetchEvent); FetchRequestData* Clone(ScriptState*, ExceptionState&); FetchRequestData* Pass(ScriptState*, ExceptionState&); explicit FetchRequestData(ExecutionContext* execution_context); ~FetchRequestData(); void SetMethod(AtomicString method) { method_ = method; } const AtomicString& Method() const { return method_; } void SetURL(const KURL& url) { url_ = url; } const KURL& Url() const { return url_; } mojom::RequestContextType Context() const { return context_; } void SetContext(mojom::RequestContextType context) { context_ = context; } network::mojom::RequestDestination Destination() const { return destination_; } void SetDestination(network::mojom::RequestDestination destination) { destination_ = destination; } scoped_refptr<const SecurityOrigin> Origin() const { return origin_; } void SetOrigin(scoped_refptr<const SecurityOrigin> origin) { origin_ = std::move(origin); } scoped_refptr<const SecurityOrigin> IsolatedWorldOrigin() const { return isolated_world_origin_; } void SetIsolatedWorldOrigin( scoped_refptr<const SecurityOrigin> isolated_world_origin) { isolated_world_origin_ = std::move(isolated_world_origin); } const AtomicString& ReferrerString() const { return referrer_string_; } void SetReferrerString(const AtomicString& s) { referrer_string_ = s; } network::mojom::ReferrerPolicy GetReferrerPolicy() const { return referrer_policy_; } void SetReferrerPolicy(network::mojom::ReferrerPolicy p) { referrer_policy_ = p; } void SetMode(network::mojom::RequestMode mode) { mode_ = mode; } network::mojom::RequestMode Mode() const { return mode_; } void SetCredentials(network::mojom::CredentialsMode credentials) { credentials_ = credentials; } network::mojom::CredentialsMode Credentials() const { return credentials_; } void SetCacheMode(mojom::FetchCacheMode cache_mode) { cache_mode_ = cache_mode; } mojom::FetchCacheMode CacheMode() const { return cache_mode_; } void SetRedirect(network::mojom::RedirectMode redirect) { redirect_ = redirect; } network::mojom::RedirectMode Redirect() const { return redirect_; } void SetImportance(mojom::FetchImportanceMode importance) { importance_ = importance; } mojom::FetchImportanceMode Importance() const { return importance_; } void SetResponseTainting(Tainting tainting) { response_tainting_ = tainting; } Tainting ResponseTainting() const { return response_tainting_; } FetchHeaderList* HeaderList() const { return header_list_.Get(); } void SetHeaderList(FetchHeaderList* header_list) { header_list_ = header_list; } BodyStreamBuffer* Buffer() const { return buffer_; } void SetBuffer(BodyStreamBuffer* buffer) { buffer_ = buffer; } String MimeType() const { return mime_type_; } void SetMimeType(const String& type) { mime_type_ = type; } String Integrity() const { return integrity_; } void SetIntegrity(const String& integrity) { integrity_ = integrity; } ResourceLoadPriority Priority() const { return priority_; } void SetPriority(ResourceLoadPriority priority) { priority_ = priority; } bool Keepalive() const { return keepalive_; } void SetKeepalive(bool b) { keepalive_ = b; } bool IsHistoryNavigation() const { return is_history_navigation_; } void SetIsHistoryNavigation(bool b) { is_history_navigation_ = b; } network::mojom::blink::URLLoaderFactory* URLLoaderFactory() const { return url_loader_factory_.is_bound() ? url_loader_factory_.get() : nullptr; } void SetURLLoaderFactory( mojo::PendingRemote<network::mojom::blink::URLLoaderFactory> factory) { url_loader_factory_.Bind( std::move(factory), execution_context_->GetTaskRunner(TaskType::kNetworking)); } const base::UnguessableToken& WindowId() const { return window_id_; } void SetWindowId(const base::UnguessableToken& id) { window_id_ = id; } const base::Optional<network::mojom::blink::TrustTokenParams>& TrustTokenParams() const { return trust_token_params_; } void SetTrustTokenParams( base::Optional<network::mojom::blink::TrustTokenParams> trust_token_params) { trust_token_params_ = std::move(trust_token_params); } void Trace(Visitor*); private: FetchRequestData* CloneExceptBody(); AtomicString method_; KURL url_; Member<FetchHeaderList> header_list_; // FIXME: Support m_skipServiceWorkerFlag; mojom::RequestContextType context_; network::mojom::RequestDestination destination_; scoped_refptr<const SecurityOrigin> origin_; scoped_refptr<const SecurityOrigin> isolated_world_origin_; // FIXME: Support m_forceOriginHeaderFlag; AtomicString referrer_string_; network::mojom::ReferrerPolicy referrer_policy_; // FIXME: Support m_authenticationFlag; // FIXME: Support m_synchronousFlag; network::mojom::RequestMode mode_; network::mojom::CredentialsMode credentials_; // TODO(yiyix): |cache_mode_| is exposed but does not yet affect fetch // behavior. We must transfer the mode to the network layer and service // worker. mojom::FetchCacheMode cache_mode_; network::mojom::RedirectMode redirect_; mojom::FetchImportanceMode importance_; base::Optional<network::mojom::blink::TrustTokenParams> trust_token_params_; // FIXME: Support m_useURLCredentialsFlag; // FIXME: Support m_redirectCount; Tainting response_tainting_; Member<BodyStreamBuffer> buffer_; String mime_type_; String integrity_; ResourceLoadPriority priority_; bool keepalive_; bool is_history_navigation_ = false; // A specific factory that should be used for this request instead of whatever // the system would otherwise decide to use to load this request. // Currently used for blob: URLs, to ensure they can still be loaded even if // the URL got revoked after creating the request. HeapMojoRemote<network::mojom::blink::URLLoaderFactory, HeapMojoWrapperMode::kWithoutContextObserver> url_loader_factory_; base::UnguessableToken window_id_; Member<ExecutionContext> execution_context_; DISALLOW_COPY_AND_ASSIGN(FetchRequestData); }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_FETCH_FETCH_REQUEST_DATA_H_
43.134715
84
0.767568
049517b29949639416d7c2bb147c8c56340fe9a2
1,330
h
C
TXVideoPlayer/Classes/SuperPlayerModelInternal.h
yuyedaidao/TXVideoPlayer
416f1bd664ff71dadde233351ee96951bb4e86aa
[ "MIT" ]
null
null
null
TXVideoPlayer/Classes/SuperPlayerModelInternal.h
yuyedaidao/TXVideoPlayer
416f1bd664ff71dadde233351ee96951bb4e86aa
[ "MIT" ]
null
null
null
TXVideoPlayer/Classes/SuperPlayerModelInternal.h
yuyedaidao/TXVideoPlayer
416f1bd664ff71dadde233351ee96951bb4e86aa
[ "MIT" ]
null
null
null
// // SuperPlayerModelInternal.h // SuperPlayer // // Created by Steven Choi on 2020/2/12. // Copyright © 2020 annidy. All rights reserved. // #import "SuperPlayerModel.h" #import "AFNetworking/AFNetworking.h" #import "SPVideoFrameDescription.h" #import "SPPlayCGIParseResult.h" @class TXImageSprite; NS_ASSUME_NONNULL_BEGIN @interface SuperPlayerModel() /// 播放配置, 为 nil 时为 "default" @property (copy, nonatomic) NSString *pcfg; @property (strong, nonatomic) AFHTTPSessionManager *sessionManager; // 以下为 PlayCGI V4 协议解析结果 /// 正在播放的清晰度 @property (nonatomic) NSString *playingDefinition; /// 正在播放的清晰度URL @property (readonly) NSString *playingDefinitionUrl; /// 正在播放的清晰度索引 @property (readonly) NSInteger playingDefinitionIndex; /// 清晰度列表 @property (readonly) NSArray *playDefinitions; /// 打点信息 @property (strong, nonatomic) NSArray<SPVideoFrameDescription *> *keyFrameDescList; /// 视频雪碧图 @property (strong, nonatomic) TXImageSprite *imageSprite; /// 视频原时长(用于试看时返回完整视频时长) @property (assign, nonatomic) NSTimeInterval originalDuration; /// 加载播放信息 - (NSURLSessionTask *)requestWithCompletion: (void(^)(NSError *err, SuperPlayerModel *model))completion; /// DRM Token @property (strong, nonatomic) NSString *drmToken; /// DRM Type @property (nonatomic, assign) SPDrmType drmType; @end NS_ASSUME_NONNULL_END
22.542373
83
0.757895
e7129c037ea7e2829cfeeebf91e417c939c97df7
397
c
C
libsrc/object/obj_palette_32.c
LinoBigatti/APIagb
5401548a8e723614f19034e1411055bda500430e
[ "MIT" ]
2
2019-02-16T10:11:12.000Z
2019-07-05T15:14:41.000Z
libsrc/object/obj_palette_32.c
LinoBigatti/APIagb-dev
6aae757bcb8ed86e706843bfa50862bf06360f81
[ "MIT" ]
null
null
null
libsrc/object/obj_palette_32.c
LinoBigatti/APIagb-dev
6aae757bcb8ed86e706843bfa50862bf06360f81
[ "MIT" ]
null
null
null
//Load an object's palette, using 32 bit units. (Recommended) #include <object/obj_palette_32.h> void obj_palette_32(const void *src_, u32 length, u32 palbank) { u32 *src = (u32*)src_; u32 *dst; if(length == 8) { dst = (u32*)&obj_pal_memory[16 * palbank]; } else { dst = (u32*)&obj_pal_memory[0]; } int ii; for(ii = 0; ii < length; ii++) { dst[ii] = src[ii]; } }
22.055556
65
0.596977
e72ee7455da82c133481770f65f35756ca92b86b
8,895
c
C
src/third_party/wiredtiger/src/btree/col_srch.c
danx0r/mongo
70d4944c235bcdf7fbbc63971099563d2af72956
[ "Apache-2.0" ]
72
2020-06-12T06:33:41.000Z
2021-03-22T03:15:56.000Z
src/third_party/wiredtiger/src/btree/col_srch.c
danx0r/mongo
70d4944c235bcdf7fbbc63971099563d2af72956
[ "Apache-2.0" ]
9
2020-07-02T09:36:49.000Z
2021-03-25T23:54:00.000Z
src/third_party/wiredtiger/src/btree/col_srch.c
danx0r/mongo
70d4944c235bcdf7fbbc63971099563d2af72956
[ "Apache-2.0" ]
14
2020-06-12T03:08:03.000Z
2021-02-03T11:43:09.000Z
/*- * Copyright (c) 2014-2018 MongoDB, Inc. * Copyright (c) 2008-2014 WiredTiger, Inc. * All rights reserved. * * See the file LICENSE for redistribution information. */ #include "wt_internal.h" /* * __check_leaf_key_range -- * Check the search key is in the leaf page's key range. */ static inline int __check_leaf_key_range(WT_SESSION_IMPL *session, uint64_t recno, WT_REF *leaf, WT_CURSOR_BTREE *cbt) { WT_PAGE_INDEX *pindex; uint32_t indx; /* * There are reasons we can't do the fast checks, and we continue with * the leaf page search in those cases, only skipping the complete leaf * page search if we know it's not going to work. */ cbt->compare = 0; /* * Check if the search key is smaller than the parent's starting key for * this page. */ if (recno < leaf->ref_recno) { cbt->compare = 1; /* page keys > search key */ return (0); } /* * Check if the search key is greater than or equal to the starting key * for the parent's next page. * * !!! * Check that "indx + 1" is a valid page-index entry first, because it * also checks that "indx" is a valid page-index entry, and we have to * do that latter check before looking at the indx slot of the array * for a match to leaf (in other words, our page hint might be wrong). */ WT_INTL_INDEX_GET(session, leaf->home, pindex); indx = leaf->pindex_hint; if (indx + 1 < pindex->entries && pindex->index[indx] == leaf) if (recno >= pindex->index[indx + 1]->ref_recno) { cbt->compare = -1; /* page keys < search key */ return (0); } return (0); } /* * __wt_col_search -- * Search a column-store tree for a specific record-based key. */ int __wt_col_search(WT_SESSION_IMPL *session, uint64_t search_recno, WT_REF *leaf, WT_CURSOR_BTREE *cbt, bool restore) { WT_BTREE *btree; WT_COL *cip; WT_DECL_RET; WT_INSERT *ins; WT_INSERT_HEAD *ins_head; WT_PAGE *page; WT_PAGE_INDEX *pindex, *parent_pindex; WT_REF *current, *descent; uint64_t recno; uint32_t base, indx, limit, read_flags; int depth; btree = S2BT(session); current = NULL; __cursor_pos_clear(cbt); /* * When appending a new record, the search record number will be an * out-of-band value, search for the largest key in the table instead. */ if ((recno = search_recno) == WT_RECNO_OOB) recno = UINT64_MAX; /* * We may be searching only a single leaf page, not the full tree. In * the normal case where we are searching a tree, check the page's * parent keys before doing the full search, it's faster when the * cursor is being re-positioned. Skip this if the page is being * re-instantiated in memory. */ if (leaf != NULL) { WT_ASSERT(session, search_recno != WT_RECNO_OOB); if (!restore) { WT_RET(__check_leaf_key_range( session, recno, leaf, cbt)); if (cbt->compare != 0) { /* * !!! * WT_CURSOR.search_near uses the slot value to * decide if there was an on-page match. */ cbt->slot = 0; return (0); } } current = leaf; goto leaf_only; } if (0) { restart: /* * Discard the currently held page and restart the search from * the root. */ WT_RET(__wt_page_release(session, current, 0)); } /* Search the internal pages of the tree. */ current = &btree->root; for (depth = 2, pindex = NULL;; ++depth) { parent_pindex = pindex; page = current->page; if (page->type != WT_PAGE_COL_INT) break; WT_INTL_INDEX_GET(session, page, pindex); base = pindex->entries; descent = pindex->index[base - 1]; /* Fast path appends. */ if (recno >= descent->ref_recno) { /* * If on the last slot (the key is larger than any key * on the page), check for an internal page split race. */ if (__wt_split_descent_race( session, current, parent_pindex)) goto restart; goto descend; } /* Binary search of internal pages. */ for (base = 0, limit = pindex->entries - 1; limit != 0; limit >>= 1) { indx = base + (limit >> 1); descent = pindex->index[indx]; if (recno == descent->ref_recno) break; if (recno < descent->ref_recno) continue; base = indx + 1; --limit; } descend: /* * Reference the slot used for next step down the tree. * * Base is the smallest index greater than recno and may be the * (last + 1) index. The slot for descent is the one before * base. */ if (recno != descent->ref_recno) { /* * We don't have to correct for base == 0 because the * only way for base to be 0 is if recno is the page's * starting recno. */ WT_ASSERT(session, base > 0); descent = pindex->index[base - 1]; } /* Encourage races. */ WT_DIAGNOSTIC_YIELD; /* * Swap the current page for the child page. If the page splits * while we're retrieving it, restart the search at the root. * We cannot restart in the "current" page; for example, if a * thread is appending to the tree, the page it's waiting for * did an insert-split into the parent, then the parent split * into its parent, the name space we are searching for may have * moved above the current page in the tree. * * On other error, simply return, the swap call ensures we're * holding nothing on failure. */ read_flags = WT_READ_RESTART_OK; if (F_ISSET(cbt, WT_CBT_READ_ONCE)) FLD_SET(read_flags, WT_READ_WONT_NEED); if ((ret = __wt_page_swap(session, current, descent, read_flags)) == 0) { current = descent; continue; } if (ret == WT_RESTART) goto restart; return (ret); } /* Track how deep the tree gets. */ if (depth > btree->maximum_depth) btree->maximum_depth = depth; leaf_only: page = current->page; cbt->ref = current; /* * Don't bother searching if the caller is appending a new record where * we'll allocate the record number; we're not going to find a match by * definition, and we figure out the record number and position when we * do the work. */ if (search_recno == WT_RECNO_OOB) { cbt->compare = -1; return (0); } /* * Search the leaf page. * * Search after a page is pinned does a search of the pinned page before * doing a full tree search, in which case we might be searching for a * record logically before the page. Return failure, and there's nothing * else to do, the record isn't going to be on this page. * * We don't check inside the search path for a record greater than the * maximum record in the tree; in that case, we get here with a record * that's impossibly large for the page. We do have additional setup to * do in that case, the record may be appended to the page. */ if (page->type == WT_PAGE_COL_FIX) { if (recno < current->ref_recno) { cbt->recno = current->ref_recno; cbt->compare = 1; return (0); } if (recno >= current->ref_recno + page->entries) { cbt->recno = current->ref_recno + page->entries; goto past_end; } else { cbt->recno = recno; cbt->compare = 0; ins_head = WT_COL_UPDATE_SINGLE(page); } } else { if (recno < current->ref_recno) { cbt->recno = current->ref_recno; cbt->slot = 0; cbt->compare = 1; return (0); } if ((cip = __col_var_search(current, recno, NULL)) == NULL) { cbt->recno = __col_var_last_recno(current); cbt->slot = page->entries == 0 ? 0 : page->entries - 1; goto past_end; } else { cbt->recno = recno; cbt->slot = WT_COL_SLOT(page, cip); cbt->compare = 0; ins_head = WT_COL_UPDATE_SLOT(page, cbt->slot); F_SET(cbt, WT_CBT_VAR_ONPAGE_MATCH); } } /* * We have a match on the page, check for an update. Check the page's * update list (fixed-length), or slot's update list (variable-length) * for a better match. The only better match we can find is an exact * match, otherwise the existing match on the page is the one we want. * For that reason, don't set the cursor's WT_INSERT_HEAD/WT_INSERT pair * until we know we have a useful entry. */ if ((ins = __col_insert_search( ins_head, cbt->ins_stack, cbt->next_stack, recno)) != NULL) if (recno == WT_INSERT_RECNO(ins)) { cbt->ins_head = ins_head; cbt->ins = ins; } return (0); past_end: /* * A record past the end of the page's standard information. Check the * append list; by definition, any record on the append list is closer * than the last record on the page, so it's a better choice for return. * This is a rarely used path: we normally find exact matches, because * column-store files are dense, but in this case the caller searched * past the end of the table. */ cbt->ins_head = WT_COL_APPEND(page); if ((cbt->ins = __col_insert_search( cbt->ins_head, cbt->ins_stack, cbt->next_stack, recno)) == NULL) cbt->compare = -1; else { cbt->recno = WT_INSERT_RECNO(cbt->ins); if (recno == cbt->recno) cbt->compare = 0; else if (recno < cbt->recno) cbt->compare = 1; else cbt->compare = -1; } return (0); }
28.148734
76
0.660821
082323b5832ac7069a9ba064360d34d17f6b1a65
23,496
c
C
rlips/src/old_files/ocllips.c
morispaa/rlips
88c68abfc423b287b1f7759fced25cab63cabf1e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
rlips/src/old_files/ocllips.c
morispaa/rlips
88c68abfc423b287b1f7759fced25cab63cabf1e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
rlips/src/old_files/ocllips.c
morispaa/rlips
88c68abfc423b287b1f7759fced25cab63cabf1e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
//file: rlips.h // R Linear Inverse Problem Solver // Version 0.5 // // This version contains only OpenCL versions of single precision real // and complex routines. // // The final version will have both single and double precision real and complex // routines, and OpenCL version are used only if OpenCL libraries are installed and // OpenCL capable GPU is present. // (c) 2011- University of Oulu, Finland // Written by Mikko Orispaa <mikko.orispaa@oulu.fi> // Licensed under FreeBSD license. See file LICENSE for details. #include<stdio.h> #include<stdlib.h> #include<math.h> //#include<R.h> //#include<Rinternals.h> #ifdef MAC #include<OpenCL/opencl.h> #endif #ifdef LINUX #include<CL/opencl.h> #endif #include "rlips.h" #include "rotations.h" #include "kernelsources.h" #define ridx(A,B,C) ((B)+(A)*(2*(C)-(A)-1)/2) #define yidx(A,B,C) ((A)*(C)+(B)) #define min(A,B) (((A)<=(B))?(A):(B)) #define max(A,B) (((A)>(B))?(A):(B)) void sInitOcllips(int *ref, int *ncols, int *nrhs, int *nbuf, int *blocksize) { sOcllips * restrict K; // Allocate new sOcllips struct K = (sOcllips *)malloc(sizeof(sOcllips)); // Allocate OpenCL structures in K K->platform_id = malloc(sizeof(cl_platform_id)); K->device_id = malloc(sizeof(cl_device_id)); K->context = malloc(sizeof(cl_context)); K->commandqueue = malloc(sizeof(cl_command_queue)); K->kernel_program = malloc(sizeof(cl_program)); K->fullRotKernel = malloc(sizeof(cl_kernel)); K->partRotKernel = malloc(sizeof(cl_kernel)); // Set the user provided parameters K->numCols = *ncols; K->numRHS = *nrhs; K->sizeBuffer = *nbuf; K->sizeWorkgroup = *blocksize; // Column size of OpenCL buffers (smallest multiple of workgroup size that // contains both theory matrix columns and measurements) K->numRmatCols = (*ncols + *nrhs + 32 - 1) / 32 * 32; //K->numRmatCols = *ncols + *nrhs; // Numbers whose absolute value is smaller than zThreshold are // considered as zeroes K->zThreshold = 1.0E-8f; // Set initial values for status parameters K->numTotRows = 0; K->numBufferRows = 0; K->numRmatRows = 0; K->flops = 0L; // Set OpenCL buffersizes K->sizeRmat = K->numRmatCols * K->numCols; K->sizeBufferMat = K->numRmatCols * K->sizeBuffer; // printf("Trying to initialize OpenCL\n"); // ******************************************** // Initialize OpenCL cl_int error; // Get first OpenCL platform error = clGetPlatformIDs(1,K->platform_id,NULL); if (error != CL_SUCCESS) { printf("Did not get OpenCL platform! Error code %d. Exiting sInitOcllips.\n", error); exit(1); } // Ask for one GPU error = clGetDeviceIDs(*K->platform_id,CL_DEVICE_TYPE_GPU,1,K->device_id,NULL); if (error != CL_SUCCESS) { printf("Did not get OpenCL device! Error code %d. Exiting sInitOcllips.\n", error); exit(1); } // Create OpenCL context *K->context = clCreateContext(0,1,K->device_id,NULL,NULL,&error); if (error != CL_SUCCESS) { printf("Did not create OpenCL context! Error code %d. Exiting sInitOcllips.\n", error); if (*K->context) clReleaseContext(*K->context); exit(1); } // Create command queue *K->commandqueue = clCreateCommandQueue(*K->context,*K->device_id,0,&error); if (error != CL_SUCCESS) { printf("Did not create OpenCL command queue! Error code %d. Exiting sInitOcllips.\n", error); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); exit(1); } // Create kernel program (KernelSource in ocllips.h) *K->kernel_program = clCreateProgramWithSource(*K->context,1,(const char **)&sKernelSource,NULL,&error); if (!*K->kernel_program) { printf("Could not create compute program! Exiting sInitOcllips.\n"); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); exit(1); } // Build kernel executable error = clBuildProgram(*K->kernel_program,0,NULL,"-w",NULL,NULL); if (error != CL_SUCCESS) { printf("Error code: %d\n",error); size_t len; char buffer[2048]; printf("Failed to build program executable! Exiting sInitOcllips.\n"); clGetProgramBuildInfo(*K->kernel_program,*K->device_id,CL_PROGRAM_BUILD_LOG,sizeof(buffer),buffer,&len); printf("%s\n",buffer); if (*K->kernel_program) clReleaseProgram(*K->kernel_program); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); exit(1); } // Create the kernel functions *K->fullRotKernel = clCreateKernel(*K->kernel_program,"s_full_rotations",&error); cl_int error2; *K->partRotKernel = clCreateKernel(*K->kernel_program,"s_partial_rotations",&error2); if (error != CL_SUCCESS || error2 != CL_SUCCESS) { printf("Could not create kernel! Error codes: %d, %d. Exiting sInitOcllips.\n",error,error2); if(*K->fullRotKernel) clReleaseKernel(*K->fullRotKernel); if(*K->partRotKernel) clReleaseKernel(*K->partRotKernel); if (*K->kernel_program) clReleaseProgram(*K->kernel_program); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); exit(1); } // printf("Trying to create OpenCL buffers\n"); // Create OpenCL buffers K->dRmat = clCreateBuffer(*K->context,CL_MEM_READ_WRITE,sizeof(float) * K->sizeRmat,NULL,&error); //K->dBufferMat = clCreateBuffer(*K->context,CL_MEM_READ_WRITE,sizeof(float) * K->sizeBufferMat,NULL,&error2); if (error != CL_SUCCESS || error2 != CL_SUCCESS) { printf("Could not create OpenCL data buffers! Exiting sInitOcllips.\n"); if(*K->fullRotKernel) clReleaseKernel(*K->fullRotKernel); if(*K->partRotKernel) clReleaseKernel(*K->partRotKernel); if (*K->kernel_program) clReleaseProgram(*K->kernel_program); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); exit(1); } // Print info on max. workgroup size //size_t maxsize; //error = clGetKernelWorkGroupInfo(*K->partRotKernel, *K->device_id, CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, // sizeof(size_t), &maxsize, NULL); //printf("Preferred work group size is %ld\n",maxsize); // printf("Trying to create address\n"); // Construct address and return addr D; long *q; q = (long *)K; D.longValue = (long)q; ref[0] = D.II[0]; ref[1] = D.II[1]; return; } // KillOcllips // Frees allocated Ocllips and all OpenCL structures associated to it. void sKillOcllips(int *ref) { // Construct address addr D; D.II[0] = ref[0]; D.II[1] = ref[1]; sOcllips *K; K = (sOcllips *)D.longValue; if(*K->fullRotKernel) clReleaseKernel(*K->fullRotKernel); if(*K->partRotKernel) clReleaseKernel(*K->partRotKernel); if (*K->kernel_program) clReleaseProgram(*K->kernel_program); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); if (K->dRmat) clReleaseMemObject(K->dRmat); //if (K->dBufferMat) clReleaseMemObject(K->dBufferMat); free(K); ref[0] = 0; ref[1] = 0; } // RotateOcllips // Takes dataBuffer containing theory matrix rows and measurements and // sends it to device. Then makes the rotations. void sRotateOcllips(int *ref, double *double_dataBuffer, int *bufferRows) { // Construct address addr D; D.II[0] = ref[0]; D.II[1] = ref[1]; sOcllips *K; K = (sOcllips *)D.longValue; // Check that the number of bufferRows does not exceed the device buffer size if (*bufferRows > K->sizeBuffer) { printf("Too many data rows to rotate! Buffer has %d rows. You tried to rotate %d rows.\nRotations not done!\n",K->sizeBuffer,*bufferRows); return; } // Make sure there is something to rotate if (*bufferRows > 0) { int i; cl_int error; int rowsToRotate, numColumns, fRow, fCol, numRows1, numRows2; // Variables used in inc files (Fix when changing to functions!) int stage, totalStages, firstRow, firstCol, numRotations, dRmatOffset, n; cl_int err1; size_t localSize, globalSize; // Let's see if this does the trick... float __attribute__ ((aligned (32))) *dataBuffer; dataBuffer = malloc(sizeof(float) * *bufferRows * K->numRmatCols); for (i=0 ; i< *bufferRows * K->numRmatCols ; i++) { dataBuffer[i] = (float) double_dataBuffer[i]; } cl_int error2; // Move data buffer into device //error = clEnqueueWriteBuffer(*K->commandqueue,K->dBufferMat,CL_FALSE,0, // sizeof(float) * K->numRmatCols * *bufferRows,dataBuffer,0,NULL,NULL); K->dBufferMat = clCreateBuffer(*K->context,CL_MEM_READ_WRITE|CL_MEM_COPY_HOST_PTR,sizeof(float) * K->numRmatCols * *bufferRows,dataBuffer,&error2); // Are there any full rotations to be made? if (K->numRmatRows > 0) { // Is R matrix already full? if (K->numRmatRows >= K->numCols) { rowsToRotate = *bufferRows; //numColumns = K->numRmatCols; numColumns = K->numCols; fRow = 0; fCol = 0; //#include "rot_full.inc" sFullRotations(K,rowsToRotate,numColumns,fRow,fCol); } // else: will R matrix become full with this buffer? else if (K->numRmatRows + *bufferRows > K->numCols) { numRows1 = K->numCols - K->numRmatRows; numRows2 = *bufferRows - numRows1; //printf("numRows1: %d\nnumRows2: %d\n",numRows1,numRows2); rowsToRotate = numRows1; numColumns = K->numRmatRows; fRow = 0; fCol = 0; //#include "rot_full.inc" sFullRotations(K,rowsToRotate,numColumns,fRow,fCol); rowsToRotate = numRows1; numColumns = numRows1; fRow = 0; fCol = K->numRmatRows; //#include "rot_partial.inc" sPartialRotations(K,rowsToRotate,numColumns,fRow,fCol); rowsToRotate = numRows2; //numColumns = K->numRmatCols; numColumns = K->numCols; fRow = numRows1; fCol = 0; //#include "rot_full.inc" sFullRotations(K,rowsToRotate,numColumns,fRow,fCol); } // else: first do normal full rotations and then partial rotations else { rowsToRotate = *bufferRows; numColumns = K->numRmatRows; fRow = 0; fCol = 0; //#include "rot_full.inc" sFullRotations(K,rowsToRotate,numColumns,fRow,fCol); rowsToRotate = *bufferRows; numColumns = *bufferRows; fRow = 0; fCol = K->numRmatRows; //#include "rot_partial.inc" sPartialRotations(K,rowsToRotate,numColumns,fRow,fCol); } } // else: do just partial rotations. This is only done if R matrix is empty else { rowsToRotate = *bufferRows; numColumns = *bufferRows; fRow = 0; fCol = K->numRmatRows; //#include "rot_partial.inc" sPartialRotations(K,rowsToRotate,numColumns,fRow,fCol); } // Update internal parameters K->numTotRows += *bufferRows; K->numRmatRows += *bufferRows; if (K->numRmatRows > K->numCols) K->numRmatRows = K->numCols; free(dataBuffer); clReleaseMemObject(K->dBufferMat); } } // GetDataOcllips // Fetches R matrix from device and sends it back to R. void sGetDataOcllips(int *ref, double *double_dataBuffer, int *dataRows) { // Construct address addr D; D.II[0] = ref[0]; D.II[1] = ref[1]; sOcllips *K; K = (sOcllips *)D.longValue; cl_int error; float __attribute__ ((aligned (32))) *dataBuffer; dataBuffer = malloc(sizeof(float) * K->sizeRmat); // Read dRmat from device to dataBuffer error = clEnqueueReadBuffer(*K->commandqueue,K->dRmat,CL_TRUE,0,sizeof(float) * K->sizeRmat,dataBuffer,0,NULL,NULL); if (error != CL_SUCCESS) { printf("Could not read buffer from device!\n"); *dataRows = 0; return; } int i; for (i=0 ; i < K->sizeRmat ; i ++) { double_dataBuffer[i] = (double) dataBuffer[i]; } // Return to R the total number of rows in R matrix. *dataRows = K->numTotRows; } // Single precision complex void cInitOcllips(int *ref, int *ncols, int *nrhs, int *nbuf, int *blocksize) { cOcllips *K; // Allocate new sOcllips struct K = (cOcllips *)malloc(sizeof(cOcllips)); // Allocate OpenCL structures in K K->platform_id = malloc(sizeof(cl_platform_id)); K->device_id = malloc(sizeof(cl_device_id)); K->context = malloc(sizeof(cl_context)); K->commandqueue = malloc(sizeof(cl_command_queue)); K->kernel_program = malloc(sizeof(cl_program)); K->fullRotKernel = malloc(sizeof(cl_kernel)); K->partRotKernel = malloc(sizeof(cl_kernel)); // Set the user provided parameters K->numCols = *ncols; K->numRHS = *nrhs; K->sizeBuffer = *nbuf; K->sizeWorkgroup = *blocksize; // Column size of OpenCL buffers (smallest multiple of workgroup size that // contains both theory matrix columns and measurements) //K->numRmatCols = (*ncols + *nrhs + *blocksize - 1) / *blocksize * *blocksize; K->numRmatCols = (*ncols + *nrhs + 32 - 1) / 32 * 32; // Numbers whose absolute value is smaller than zThreshold are // considered as zeroes K->zThreshold = 1.0E-8f; // Set initial values for status parameters K->numTotRows = 0; K->numBufferRows = 0; K->numRmatRows = 0; K->flops = 0L; // Set OpenCL buffersizes K->sizeRmat = K->numRmatCols * K->numCols; K->sizeBufferMat = K->numRmatCols * K->sizeBuffer; // printf("Trying to initialize OpenCL\n"); // ******************************************** // Initialize OpenCL cl_int error; // Get first OpenCL platform error = clGetPlatformIDs(1,K->platform_id,NULL); if (error != CL_SUCCESS) { printf("Did not get OpenCL platform! Error code %d. Exiting sInitOcllips.\n", error); exit(1); } // Ask for one GPU error = clGetDeviceIDs(*K->platform_id,CL_DEVICE_TYPE_GPU,1,K->device_id,NULL); if (error != CL_SUCCESS) { printf("Did not get OpenCL device! Error code %d. Exiting sInitOcllips.\n", error); exit(1); } // Create OpenCL context *K->context = clCreateContext(0,1,K->device_id,NULL,NULL,&error); if (error != CL_SUCCESS) { printf("Did not create OpenCL context! Error code %d. Exiting sInitOcllips.\n", error); if (*K->context) clReleaseContext(*K->context); exit(1); } // Create command queue *K->commandqueue = clCreateCommandQueue(*K->context,*K->device_id,0,&error); if (error != CL_SUCCESS) { printf("Did not create OpenCL command queue! Error code %d. Exiting sInitOcllips.\n", error); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); exit(1); } // Create kernel program (KernelSource in ocllips.h) *K->kernel_program = clCreateProgramWithSource(*K->context,1,(const char **)&cKernelSource,NULL,&error); if (!*K->kernel_program) { printf("Could not create compute program! Exiting sInitOcllips.\n"); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); exit(1); } // Build kernel executable error = clBuildProgram(*K->kernel_program,0,NULL,"-w",NULL,NULL); if (error != CL_SUCCESS) { printf("Error code: %d\n",error); size_t len; char buffer[1024*100]; printf("Failed to build program executable! Exiting sInitOcllips.\n"); clGetProgramBuildInfo(*K->kernel_program,*K->device_id,CL_PROGRAM_BUILD_LOG,sizeof(buffer),buffer,&len); printf("Log length: %d\n%s\n",(int) len,buffer); if (*K->kernel_program) clReleaseProgram(*K->kernel_program); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); exit(1); } // Create the kernel functions *K->fullRotKernel = clCreateKernel(*K->kernel_program,"c_full_rotations",&error); cl_int error2; *K->partRotKernel = clCreateKernel(*K->kernel_program,"c_partial_rotations",&error2); if (error != CL_SUCCESS || error2 != CL_SUCCESS) { printf("Could not create kernel! Error codes: %d, %d. Exiting sInitOcllips.\n",error,error2); if(*K->fullRotKernel) clReleaseKernel(*K->fullRotKernel); if(*K->partRotKernel) clReleaseKernel(*K->partRotKernel); if (*K->kernel_program) clReleaseProgram(*K->kernel_program); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); exit(1); } // printf("Trying to create OpenCL buffers\n"); // Create OpenCL buffers K->dRmat_r = clCreateBuffer(*K->context,CL_MEM_READ_WRITE,sizeof(float) * K->sizeRmat,NULL,&error); K->dRmat_i = clCreateBuffer(*K->context,CL_MEM_READ_WRITE,sizeof(float) * K->sizeRmat,NULL,&error); //K->dBufferMat = clCreateBuffer(*K->context,CL_MEM_READ_WRITE,sizeof(float) * K->sizeBufferMat,NULL,&error2); if (error != CL_SUCCESS || error2 != CL_SUCCESS) { printf("Could not create OpenCL data buffers! Exiting sInitOcllips.\n"); if(*K->fullRotKernel) clReleaseKernel(*K->fullRotKernel); if(*K->partRotKernel) clReleaseKernel(*K->partRotKernel); if (*K->kernel_program) clReleaseProgram(*K->kernel_program); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); exit(1); } // Print info on max. workgroup size //size_t maxsize; //error = clGetKernelWorkGroupInfo(*K->partRotKernel, *K->device_id, CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, // sizeof(size_t), &maxsize, NULL); //printf("Preferred work group size is %ld\n",maxsize); // printf("Trying to create address\n"); // Construct address and return addr D; long *q; q = (long *)K; D.longValue = (long)q; ref[0] = D.II[0]; ref[1] = D.II[1]; return; } void cKillOcllips(int *ref) { // Construct address addr D; D.II[0] = ref[0]; D.II[1] = ref[1]; cOcllips *K; K = (cOcllips *)D.longValue; if(*K->fullRotKernel) clReleaseKernel(*K->fullRotKernel); if(*K->partRotKernel) clReleaseKernel(*K->partRotKernel); if (*K->kernel_program) clReleaseProgram(*K->kernel_program); if (*K->commandqueue) clReleaseCommandQueue(*K->commandqueue); if (*K->context) clReleaseContext(*K->context); if (K->dRmat_r) clReleaseMemObject(K->dRmat_r); if (K->dRmat_i) clReleaseMemObject(K->dRmat_i); //if (K->dBufferMat_r) clReleaseMemObject(K->dBufferMat_r); //if (K->dBufferMat_i) clReleaseMemObject(K->dBufferMat_i); free(K); ref[0] = 0; ref[1] = 0; } void cRotateOcllips(int *ref, double *double_dataBuffer_r, double *double_dataBuffer_i, int *bufferRows) { // Construct address addr D; D.II[0] = ref[0]; D.II[1] = ref[1]; cOcllips *K; K = (cOcllips *)D.longValue; // Check that the number of bufferRows does not exceed the device buffer size if (*bufferRows > K->sizeBuffer) { printf("Too many data rows to rotate! Buffer has %d rows. You tried to rotate %d rows.\nRotations not done!\n",K->sizeBuffer,*bufferRows); return; } // Make sure there is something to rotate if (*bufferRows > 0) { int i; cl_int error; int rowsToRotate, numColumns, fRow, fCol, numRows1, numRows2; // Variables used in inc files (Fix when changing to functions!) int stage, totalStages, firstRow, firstCol, numRotations, dRmatOffset, n; cl_int err1; size_t localSize, globalSize; // Let's see if this does the trick... float __attribute__ ((aligned (32))) *dataBuffer_r; float __attribute__ ((aligned (32))) *dataBuffer_i; dataBuffer_r = malloc(sizeof(float) * *bufferRows * K->numRmatCols); dataBuffer_i = malloc(sizeof(float) * *bufferRows * K->numRmatCols); for (i=0 ; i< *bufferRows * K->numRmatCols ; i++) { dataBuffer_r[i] = (float) double_dataBuffer_r[i]; dataBuffer_i[i] = (float) double_dataBuffer_i[i]; } cl_int error2; // Move data buffer into device //error = clEnqueueWriteBuffer(*K->commandqueue,K->dBufferMat,CL_FALSE,0, // sizeof(float) * K->numRmatCols * *bufferRows,dataBuffer,0,NULL,NULL); K->dBufferMat_r = clCreateBuffer(*K->context,CL_MEM_READ_WRITE|CL_MEM_COPY_HOST_PTR,sizeof(float) * K->numRmatCols * *bufferRows,dataBuffer_r,&error2); K->dBufferMat_i = clCreateBuffer(*K->context,CL_MEM_READ_WRITE|CL_MEM_COPY_HOST_PTR,sizeof(float) * K->numRmatCols * *bufferRows,dataBuffer_i,&error2); // Are there any full rotations to be made? if (K->numRmatRows > 0) { // Is R matrix already full? if (K->numRmatRows >= K->numCols) { rowsToRotate = * bufferRows; //numColumns = K->numRmatCols; numColumns = K->numCols; fRow = 0; fCol = 0; //#include "rot_full_c.inc" cFullRotations(K,rowsToRotate,numColumns,fRow,fCol); } // else: will R matrix become full with this buffer? else if (K->numRmatRows + *bufferRows > K->numCols) { numRows1 = K->numCols - K->numRmatRows; numRows2 = *bufferRows - numRows1; rowsToRotate = numRows1; numColumns = K->numRmatRows; fRow = 0; fCol = 0; //#include "rot_full_c.inc" cFullRotations(K,rowsToRotate,numColumns,fRow,fCol); rowsToRotate = numRows1; numColumns = numRows1; fRow = 0; fCol = K->numRmatRows; //#include "rot_partial_c.inc" cPartialRotations(K,rowsToRotate,numColumns,fRow,fCol); rowsToRotate = numRows2; //numColumns = K->numRmatCols; numColumns = K->numCols; fRow = numRows1; fCol = 0; //#include "rot_full_c.inc" cFullRotations(K,rowsToRotate,numColumns,fRow,fCol); } // else: first do normal full rotations and then partial rotations else { rowsToRotate = *bufferRows; numColumns = K->numRmatRows; fRow = 0; fCol = 0; //#include "rot_full_c.inc" cFullRotations(K,rowsToRotate,numColumns,fRow,fCol); //clFinish(*K->commandqueue); rowsToRotate = *bufferRows; numColumns = *bufferRows; fRow = 0; fCol = K->numRmatRows; //#include "rot_partial_c.inc" cPartialRotations(K,rowsToRotate,numColumns,fRow,fCol); } } // else: do just partial rotations. This is only done if R matrix is empty else { rowsToRotate = *bufferRows; numColumns = *bufferRows; fRow = 0; fCol = K->numRmatRows; //#include "rot_partial_c.inc" cPartialRotations(K,rowsToRotate,numColumns,fRow,fCol); } // Update internal parameters K->numTotRows += *bufferRows; K->numRmatRows += *bufferRows; if (K->numRmatRows > K->numCols) K->numRmatRows = K->numCols; free(dataBuffer_r); free(dataBuffer_i); clReleaseMemObject(K->dBufferMat_r); clReleaseMemObject(K->dBufferMat_i); } } void cGetDataOcllips(int *ref, double *double_dataBuffer_r, double *double_dataBuffer_i, int *dataRows) { // Construct address addr D; D.II[0] = ref[0]; D.II[1] = ref[1]; cOcllips *K; K = (cOcllips *)D.longValue; cl_int error; float __attribute__ ((aligned (32))) *dataBuffer_r; float __attribute__ ((aligned (32))) *dataBuffer_i; dataBuffer_r = malloc(sizeof(float) * K->sizeRmat); dataBuffer_i = malloc(sizeof(float) * K->sizeRmat); // Read dRmat from device to dataBuffer error = clEnqueueReadBuffer(*K->commandqueue,K->dRmat_r,CL_TRUE,0,sizeof(float) * K->sizeRmat,dataBuffer_r,0,NULL,NULL); error = clEnqueueReadBuffer(*K->commandqueue,K->dRmat_i,CL_TRUE,0,sizeof(float) * K->sizeRmat,dataBuffer_i,0,NULL,NULL); if (error != CL_SUCCESS) { printf("Could not read buffer from device!\n"); *dataRows = 0; return; } int i; for (i=0 ; i < K->sizeRmat ; i ++) { double_dataBuffer_r[i] = (double) dataBuffer_r[i]; double_dataBuffer_i[i] = (double) dataBuffer_i[i]; } // Return to R the total number of rows in R matrix. *dataRows = K->numTotRows; }
28.794118
154
0.674838
a2fec1c01085cbc92b9c94cc5300c67306cb8948
2,701
c
C
stack/c/num_conversion.c
najcit/DataStruct
4e812c861008986bc57261edc98540fd8082b0fe
[ "Apache-2.0" ]
null
null
null
stack/c/num_conversion.c
najcit/DataStruct
4e812c861008986bc57261edc98540fd8082b0fe
[ "Apache-2.0" ]
null
null
null
stack/c/num_conversion.c
najcit/DataStruct
4e812c861008986bc57261edc98540fd8082b0fe
[ "Apache-2.0" ]
null
null
null
#include "link_stack.c" // 数字进制转化的一个基本原理 // N = (N div d) * d + (N mod d) // 例子如下: // 1348[10] = 2504[8] // 10进制 1348 转化到 8进制 2054 的过程 // N N div d N mod d // 1348 168 4 // 168 21 0 // 21 2 5 // 2 0 2 // 将10进制数转化为8进制的数输出 // 8进制数以字符串形式输出 #include <stdio.h> #include <string.h> int num_8_conversion(int num_10, char *num_8, int len) { // 初始化栈 Stack stack; init_stack(&stack); // 循环压栈 Element element = {0}; int N = num_10; int n = 0; while(N) { n = N % 8; // 余数 N = N / 8; // 商 element.data = n; stack_push(&stack, element); } // 循环出栈 memset(num_8, 0, len); int i = 0; while (!stack_empty(&stack)) { if (i == len){ return -1; } stack_pop(&stack, &element); num_8[i++] = element.data + 48; // 将数字转化为 ASCII码 } // 销毁栈 destroy_stack(&stack); return 0; } // 将10进制数转化为指定的进制 int num_conversion(int num, int base, char *num_base, int len) { // 初始化栈 Stack stack; init_stack(&stack); // 循环压栈 Element element = {0}; int N = num; int n = 0; while(N) { n = N % base; // 余数 N = N / base; // 商 element.data = n; stack_push(&stack, element); } // 循环出栈 memset(num_base, 0, len); int i = 0; while (!stack_empty(&stack)) { if (i == len){ return -1; } stack_pop(&stack, &element); num_base[i++] = element.data + 48; // 将数字转化为 ASCII码 } // 销毁栈 destroy_stack(&stack); return 0; } // int main(int argc, char const *argv[]) // { // // num_8_conversion(10); // char num[32] = {}; // num_8_conversion(1348, num, 32); // printf("n:%s\n", num); // num_8_conversion(3457, num, 32); // printf("n:%s\n", num); // num_conversion(1348, 2, num, 32); // printf("n:%s\n", num); // num_conversion(1348, 4, num, 32); // printf("n:%s\n", num); // return 0; // } #define CTEST_MAIN #include "ctest.h" CTEST(num_converson, conversion_10to8_test) { char num[32] = {}; ASSERT_STR("2504", (num_8_conversion(1348, num, 32), num)); ASSERT_STR("6601", (num_8_conversion(3457, num, 32), num)); } CTEST(num_converson, conversion_10toX_test) { char num[32] = {}; ASSERT_STR("2504", (num_conversion(1348, 8, num, 32), num)); ASSERT_STR("6601", (num_conversion(3457, 8, num, 32), num)); ASSERT_STR("111010", (num_conversion(1348, 4, num, 32), num)); ASSERT_STR("10101000100", (num_conversion(1348, 2, num, 32), num)); } int main(int argc, char const *argv[]) { int result = ctest_main(argc, argv); return result; }
21.267717
71
0.531285
4d01a6070a98012dfa95de638aa39f7c3ada31a5
2,960
h
C
code/libssh/tests/pkd/pkd_client.h
timkingh/FFmpeg_VS
993b14dc146731d782cf4b5fffc6a0f4b9aeea0c
[ "MIT" ]
null
null
null
code/libssh/tests/pkd/pkd_client.h
timkingh/FFmpeg_VS
993b14dc146731d782cf4b5fffc6a0f4b9aeea0c
[ "MIT" ]
null
null
null
code/libssh/tests/pkd/pkd_client.h
timkingh/FFmpeg_VS
993b14dc146731d782cf4b5fffc6a0f4b9aeea0c
[ "MIT" ]
null
null
null
/* * pkd_client.h -- macros for generating client-specific command * invocations for use with pkd testing * * (c) 2014, 2018 Jon Simons <jon@jonsimons.org> */ #ifndef __PKD_CLIENT_H__ #define __PKD_CLIENT_H__ #include "config.h" /* OpenSSH */ #define OPENSSH_BINARY "ssh" #define OPENSSH_KEYGEN "ssh-keygen" #define OPENSSH_HOSTKEY_ALGOS_DEFAULT "ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa" #define OPENSSH_PKACCEPTED_DEFAULT "ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa" #if HAVE_ECC #define OPENSSH_HOSTKEY_ALGOS_ECDSA ",ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521" #define OPENSSH_PKACCEPTED_ECDSA ",ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521" #else /* HAVE_ECC */ #define OPENSSH_HOSTKEY_ALGOS_ECDSA "" #define OPENSSH_PKACCEPTED_ECDSA "" #endif /* HAVE_ECC */ #if HAVE_DSA #define OPENSSH_HOSTKEY_ALGOS_DSA ",ssh-dss" #define OPENSSH_PKACCEPTED_DSA ",ssh-dss" #else /* HAVE_DSA */ #define OPENSSH_HOSTKEY_ALGOS_DSA "" #define OPENSSH_PKACCEPTED_DSA "" #endif /* HAVE_DSA */ #define OPENSSH_HOSTKEY_ALGOS \ "-o HostKeyAlgorithms=" \ OPENSSH_HOSTKEY_ALGOS_DEFAULT \ OPENSSH_HOSTKEY_ALGOS_ECDSA \ OPENSSH_HOSTKEY_ALGOS_DSA #define OPENSSH_PKACCEPTED_TYPES \ "-o PubkeyAcceptedKeyTypes=" \ OPENSSH_PKACCEPTED_DEFAULT \ OPENSSH_PKACCEPTED_ECDSA \ OPENSSH_PKACCEPTED_DSA #define OPENSSH_CMD_START \ OPENSSH_BINARY " " \ "-o UserKnownHostsFile=/dev/null " \ "-o StrictHostKeyChecking=no " \ "-F /dev/null " \ OPENSSH_HOSTKEY_ALGOS " " \ OPENSSH_PKACCEPTED_TYPES " " \ "-i " CLIENT_ID_FILE " " \ "1> %s.out " \ "2> %s.err " \ "-vvv " #define OPENSSH_CMD_END "-p 1234 localhost ls" #define OPENSSH_CMD \ OPENSSH_CMD_START OPENSSH_CMD_END #define OPENSSH_KEX_CMD(kexalgo) \ OPENSSH_CMD_START "-o KexAlgorithms=" kexalgo " " OPENSSH_CMD_END #define OPENSSH_CIPHER_CMD(ciphers) \ OPENSSH_CMD_START "-c " ciphers " " OPENSSH_CMD_END #define OPENSSH_MAC_CMD(macs) \ OPENSSH_CMD_START "-o MACs=" macs " " OPENSSH_CMD_END /* Dropbear */ #define DROPBEAR_BINARY "dbclient" #define DROPBEAR_KEYGEN "dropbearkey" #define DROPBEAR_CMD_START \ DROPBEAR_BINARY " " \ "-y -y " \ "-i " CLIENT_ID_FILE " " \ "1> %s.out " \ "2> %s.err " #define DROPBEAR_CMD_END "-p 1234 localhost ls" #define DROPBEAR_CMD \ DROPBEAR_CMD_START DROPBEAR_CMD_END #if 0 /* dbclient does not expose control over kex algo */ #define DROPBEAR_KEX_CMD(kexalgo) \ DROPBEAR_CMD #endif #define DROPBEAR_CIPHER_CMD(ciphers) \ DROPBEAR_CMD_START "-c " ciphers " " DROPBEAR_CMD_END #define DROPBEAR_MAC_CMD(macs) \ DROPBEAR_CMD_START "-m " macs " " DROPBEAR_CMD_END #endif /* __PKD_CLIENT_H__ */
28.190476
100
0.673986
3100b4412bb0a04aebb85aa89992b8ff022ffa74
1,218
h
C
wov/ribbonemitter.h
Refuge89/CreatureScripter
37a66ba2763bf6a48271577dd5ca6bb363f23948
[ "MIT" ]
null
null
null
wov/ribbonemitter.h
Refuge89/CreatureScripter
37a66ba2763bf6a48271577dd5ca6bb363f23948
[ "MIT" ]
null
null
null
wov/ribbonemitter.h
Refuge89/CreatureScripter
37a66ba2763bf6a48271577dd5ca6bb363f23948
[ "MIT" ]
1
2020-03-14T12:12:55.000Z
2020-03-14T12:12:55.000Z
#ifndef RIBBON_EMITTER_H #define RIBBON_EMITTER_H #include <QObject> #include <QOpenGLShaderProgram> #include <QOpenGLBuffer> #include <QOpenGLFunctions> #include "m2structures.h" #include "animatedvalue.h" #include "mvp.h" #include "particleemitter.h" struct Ribbon { QVector3D position; QVector3D up; }; class RibbonEmitter : public QObject { Q_OBJECT public: RibbonEmitter(const M2RibbonEmitter &emitter, const quint32 *sequences, const QByteArray &data, QOpenGLFunctions* funcs); void update(quint32 animation, quint32 time, QMatrix4x4 boneMatrix); void render(QOpenGLShaderProgram *program, MVP viewProjection); qint32 getBoneId() const; qint32 getTextureId() const; private: void initialize(); qint32 m_bone; QVector3D m_position; QList<qint32> m_textures; QList<qint32> m_blending; AnimatedValue<QVector3D> m_color; AnimatedValue<qint16> m_opacity; AnimatedValue<float> m_above; AnimatedValue<float> m_below; float m_segments; float m_length; float m_angle; QList<Ribbon> m_ribbons; ParticleVertex *m_vertices; QOpenGLBuffer *m_vertexBuffer; bool m_initialized; QOpenGLFunctions* m_funcs; }; #endif
21.368421
125
0.738916
d9762739818dd961e5099d93672881696cc07edd
4,273
h
C
bp/src/PrivateHeaders/XCTAutomationSupport/XCTElementQuery.h
izinga/bluepill
d9f99803ce32d9f4cfa7a8e31936c15bccbed8d0
[ "BSD-2-Clause" ]
3,189
2017-01-13T00:55:54.000Z
2021-05-23T09:55:35.000Z
bp/src/PrivateHeaders/XCTAutomationSupport/XCTElementQuery.h
izinga/bluepill
d9f99803ce32d9f4cfa7a8e31936c15bccbed8d0
[ "BSD-2-Clause" ]
346
2017-01-13T06:23:02.000Z
2021-05-18T23:51:10.000Z
bp/src/PrivateHeaders/XCTAutomationSupport/XCTElementQuery.h
izinga/bluepill
d9f99803ce32d9f4cfa7a8e31936c15bccbed8d0
[ "BSD-2-Clause" ]
262
2017-01-13T02:42:21.000Z
2021-05-17T11:45:30.000Z
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled May 11 2021 09:30:43). // // Copyright (C) 1997-2019 Steve Nygard. // #import <objc/NSObject.h> #import <XCTAutomationSupport/NSSecureCoding-Protocol.h> #import <XCTAutomationSupport/XCTCapabilitiesProviding-Protocol.h> @class NSArray, NSDictionary, NSSet, NSString, XCAccessibilityElement, XCElementSnapshot, XCTTimeoutControls; @protocol XCTElementSnapshotAttributeDataSource, XCTElementSnapshotProvider; @interface XCTElementQuery : NSObject <NSSecureCoding, XCTCapabilitiesProviding> { _Bool _isMacOS; _Bool _suppressAttributeKeyPathAnalysis; _Bool _useLegacyElementType; XCAccessibilityElement *_rootElement; unsigned long long _options; XCTTimeoutControls *_timeoutControls; id <XCTElementSnapshotProvider> _snapshotProvider; id <XCTElementSnapshotAttributeDataSource> _elementSnapshotAttributeDataSource; XCElementSnapshot *_rootElementSnapshot; CDUnknownBlockType _evaluationContext; NSArray *_transformers; } + (id)_firstMatchTransformerSubarraysFromArray:(id)arg1 trailingMatchAllTransformers:(id *)arg2; + (void)provideCapabilitiesToBuilder:(id)arg1; + (id)_descriptionForTransformerArray:(id)arg1; + (_Bool)supportsSecureCoding; - (void).cxx_destruct; @property _Bool useLegacyElementType; // @synthesize useLegacyElementType=_useLegacyElementType; @property(readonly, copy) NSArray *transformers; // @synthesize transformers=_transformers; @property(copy, nonatomic) CDUnknownBlockType evaluationContext; // @synthesize evaluationContext=_evaluationContext; @property(retain) XCElementSnapshot *rootElementSnapshot; // @synthesize rootElementSnapshot=_rootElementSnapshot; @property _Bool suppressAttributeKeyPathAnalysis; // @synthesize suppressAttributeKeyPathAnalysis=_suppressAttributeKeyPathAnalysis; @property __weak id <XCTElementSnapshotAttributeDataSource> elementSnapshotAttributeDataSource; // @synthesize elementSnapshotAttributeDataSource=_elementSnapshotAttributeDataSource; @property(retain) id <XCTElementSnapshotProvider> snapshotProvider; // @synthesize snapshotProvider=_snapshotProvider; @property(retain) XCTTimeoutControls *timeoutControls; // @synthesize timeoutControls=_timeoutControls; @property(readonly) _Bool isMacOS; // @synthesize isMacOS=_isMacOS; @property(readonly) unsigned long long options; // @synthesize options=_options; @property(readonly, copy) XCAccessibilityElement *rootElement; // @synthesize rootElement=_rootElement; - (id)_allMatchingSnapshotsForInput:(id)arg1 transformers:(id)arg2 relatedElements:(id *)arg3 noMatchesMessage:(id *)arg4 error:(id *)arg5; - (id)_firstMatchingSnapshotForInput:(id)arg1 transformers:(id)arg2 relatedElements:(id *)arg3 noMatchesMessage:(id *)arg4 error:(id *)arg5; - (id)_firstMatchingSnapshotForInput:(id)arg1 transformersSubarrays:(id)arg2 relatedElements:(id *)arg3 noMatchesMessage:(id *)arg4 error:(id *)arg5; - (id)matchingSnapshotsInSnapshotTree:(id)arg1 relatedElements:(id *)arg2 noMatchesMessage:(id *)arg3 error:(id *)arg4; - (id)matchingSnapshotsWithRelatedElements:(id *)arg1 noMatchesMessage:(id *)arg2 error:(id *)arg3; - (id)_snapshotForElement:(id)arg1 error:(id *)arg2; - (id)_rootElementSnapshot:(id *)arg1; @property(readonly, copy) NSDictionary *snapshotParameters; @property(readonly, copy) NSArray *snapshotAttributes; @property(readonly, copy) NSSet *elementTypes; - (_Bool)hasTransformerWithStopsOnFirstMatch; @property(readonly) _Bool supportsAttributeKeyPathAnalysis; - (_Bool)canBeRemotelyEvaluatedWithCapabilities:(id)arg1; @property(readonly, copy) NSString *description; - (_Bool)isEqual:(id)arg1; @property(readonly) unsigned long long hash; - (void)encodeWithCoder:(id)arg1; - (id)initWithCoder:(id)arg1; - (id)initWithRootElement:(id)arg1 transformers:(id)arg2 options:(unsigned long long)arg3 isMacOS:(_Bool)arg4 timeoutControls:(id)arg5; - (id)initWithRootElement:(id)arg1 transformers:(id)arg2 options:(unsigned long long)arg3 isMacOS:(_Bool)arg4; - (id)initWithRootElement:(id)arg1 transformers:(id)arg2 options:(unsigned long long)arg3; - (id)initWithRootElement:(id)arg1 transformers:(id)arg2; // Remaining properties @property(readonly, copy) NSString *debugDescription; @property(readonly) Class superclass; @end
56.973333
182
0.811608
143f51d2153ecb93579708517649ec3e4ac46b25
241
c
C
src/tests/function-calls/20.c
arminnh/c-to-p-compilers
2c649e1d3643471bac681c2656c1c7d6249be4d7
[ "MIT" ]
1
2021-04-29T06:40:54.000Z
2021-04-29T06:40:54.000Z
src/tests/function-calls/20.c
arminnh/ba3-c-to-p-compiler
2c649e1d3643471bac681c2656c1c7d6249be4d7
[ "MIT" ]
null
null
null
src/tests/function-calls/20.c
arminnh/ba3-c-to-p-compiler
2c649e1d3643471bac681c2656c1c7d6249be4d7
[ "MIT" ]
1
2017-01-30T19:19:31.000Z
2017-01-30T19:19:31.000Z
int f1(int q[][3]) { return 0; } int f2(int (*q[][3])[5]) { return 0; } int f3(int (*(**q[])[])[][2]) { return 0; } int main(void) { int q[1][3]; f1(q); int (*r[2][3])[5]; f2(r); int (*(**s[3])[])[][2]; f3(s); }
10.478261
31
0.377593
6c45c842473c2092683894c6fc6350a7488e5c4f
1,097
h
C
include/processor.h
naru94/CppND-System-Monitor-Project-Updated
7701bb4e198b0f72d4f42533cd774c21437c949c
[ "MIT" ]
null
null
null
include/processor.h
naru94/CppND-System-Monitor-Project-Updated
7701bb4e198b0f72d4f42533cd774c21437c949c
[ "MIT" ]
null
null
null
include/processor.h
naru94/CppND-System-Monitor-Project-Updated
7701bb4e198b0f72d4f42533cd774c21437c949c
[ "MIT" ]
null
null
null
#ifndef PROCESSOR_H #define PROCESSOR_H #include <vector> #include <string> #include <fstream> #include <sstream> class Processor { public: float Utilization(); void set_prev_values(std::vector<int> cpu_stats) { prevuser = cpu_stats[0]; prevnice = cpu_stats[1]; prevsystem = cpu_stats[2]; previdle = cpu_stats[3]; previowait = cpu_stats[4]; previrq = cpu_stats[5]; prevsoftirq = cpu_stats[6]; prevsteal = cpu_stats[7]; } void get_cpu_stats(std::vector<int> &cpu_stats) { std::string cpu_name; std::string line; std::ifstream stream("/proc/stat"); if (stream.is_open()) { std::getline(stream, line); std::istringstream linestream(line); linestream >> cpu_name; for (int i=0; i<8; i++) { linestream >> cpu_stats[i]; } } } private: int previdle; int previowait; int prevuser; int prevnice; int prevsystem; int previrq; int prevsoftirq; int prevsteal; }; #endif
22.854167
54
0.573382
e7e90dc531c5e4023923ece1a7fdfa5cbc6ad477
6,720
h
C
ref_code/cjdns/util/Bits.h
krattai/noo-ebs
00f67fd8f25b7c1eadf7348245670cb0ac911184
[ "BSD-2-Clause" ]
2
2015-04-07T14:37:24.000Z
2015-11-06T00:31:01.000Z
ref_code/cjdns/util/Bits.h
krattai/noo-ebs
00f67fd8f25b7c1eadf7348245670cb0ac911184
[ "BSD-2-Clause" ]
null
null
null
ref_code/cjdns/util/Bits.h
krattai/noo-ebs
00f67fd8f25b7c1eadf7348245670cb0ac911184
[ "BSD-2-Clause" ]
null
null
null
/* vim: set expandtab ts=4 sw=4: */ /* * You may redistribute this program and/or modify it under the terms of * the GNU General Public License as published by the Free Software Foundation, * either version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef Bits_H #define Bits_H #include "util/Assert.h" #include "util/Endian.h" #include "util/Gcc.h" #include <stdint.h> #include <stddef.h> /** * Find first set bit in a 64 bit integer. */ static inline int Bits_ffs64(uint64_t number) { if (!number) { return 0; } int out = 1; while (!(number & 1)) { number >>= 1; out++; } return out; } static inline int Bits_popCountx64(uint64_t number) { int out = 0; for (int i = 0; i < 64; i++) { out += ((number >> i) & 1); } return out; } static inline int Bits_popCountx32(uint32_t number) { int out = 0; for (int i = 0; i < 32; i++) { out += ((number >> i) & 1); } return out; } // TODO(cjd): this is hot, optimize this to use the ASM instruction. static inline int Bits_log2x64(uint64_t number) { int out = 0; while (number >>= 1) { out++; } return out; } /** Largest possible number whose log2 is bitCount. */ static inline uint64_t Bits_maxBits64(uint32_t bitCount) { Assert_ifParanoid(bitCount < 64); return (((uint64_t)1) << bitCount) - 1; } static inline int Bits_log2x32(uint32_t number) { int out = 0; while (number >>= 1) { out++; } return out; } static inline int Bits_log2x64_be(uint64_t number) { return Bits_log2x64(Endian_bigEndianToHost64(number)); } /** * Bitwise reversal of the a number. * This is endian safe. */ static inline uint64_t Bits_bitReverse64(uint64_t toReverse) { #define Bits_rotateAndMask(mask, rotateBits) \ toReverse = ((toReverse >> rotateBits) & mask) | ((toReverse & mask) << rotateBits) Bits_rotateAndMask(0x5555555555555555ull, 1); Bits_rotateAndMask(0x3333333333333333ull, 2); Bits_rotateAndMask(0x0F0F0F0F0F0F0F0Full, 4); Bits_rotateAndMask(0x00FF00FF00FF00FFull, 8); Bits_rotateAndMask(0x0000FFFF0000FFFFull, 16); Bits_rotateAndMask(0x00000000FFFFFFFFull, 32); return toReverse; #undef Bits_rotateAndMask } /** * @param buffer the space of check if it's zero. * @length the nuber of bytes to check for zero'd-ness. * @return true if all bytes checked are zero. */ static inline int Bits_isZero(void* buffer, size_t length) { uint8_t* buff = (uint8_t*) buffer; for (size_t i = 0; i < length; i++) { if (buff[i]) { return 0; } } return 1; } static inline void* Bits_memmove(void* dest, const void* src, size_t length) { #ifndef memmove void* memmove(void* dest, const void* src, size_t length); #endif return memmove(dest, src, length); } static inline void* Bits_memset(void* location, int byte, size_t count) { #ifndef memset void* memset(void* location, int byte, size_t count); #endif return memset(location, byte, count); } static inline int Bits_memcmp(const void* loc1, const void* loc2, size_t length) { #ifndef memcmp int memcmp(const void* loc1, const void* loc2, size_t length); #endif return memcmp(loc1, loc2, length); } static inline void* Bits_memcpyNoDebug(void* restrict out, const void* restrict in, size_t length) { #ifndef memcpy void* memcpy(void* restrict out, const void* restrict in, size_t length); #endif return memcpy(out, in, length); } /** * @param out buffer to write to. * @param in buffer to read from. * @param length number of bytes to copy. * @param file name of the file calling this, for logging. * @param line the line number of the calling file, for logging. * @param constant true if the length should be checked for being constant. * @return out */ static inline void* Bits_memcpyDebug(void* out, const void* in, size_t length, char* file, int line) { const char* inc = in; const char* outc = out; // Check that pointers don't alias. if (outc >= inc && outc < inc + length) { Assert_failure(file, line, "memcpy() pointers alias each other"); } return Bits_memcpyNoDebug(out, in, length); } /** * Bits_memcpy() * Alias to POSIX memcpy(), allows for extra debugging checks. * * @param out the buffer to write to. * @param in the buffer to read from. * @param length the number of bytes to copy. */ #ifdef PARANOIA #define Bits_memcpy(a, b, c) Bits_memcpyDebug(a, b, c, Gcc_SHORT_FILE, Gcc_LINE) #else #define Bits_memcpy(a,b,c) Bits_memcpyNoDebug(a,b,c) #endif /** * Bits_memcpyConst() * Alias to POSIX memcpy(), will not compile unless the number of bytes to be copied * is known at compile time. This allows for defensive development by declaring intent to copy * either a static number of bytes of an unknown number of bytes. * * @param out the buffer to write to. * @param in the buffer to read from. * @param length the number of bytes to copy. */ #ifdef HAS_BUILTIN_CONSTANT_P #define Bits_memcpyConst(a, b, c) \ Assert_compileTime(__builtin_constant_p(c) == 1); \ Bits_memcpy(a, b, c) #define Bits_memmoveConst(a,b,c) \ Assert_compileTime(__builtin_constant_p(c) == 1); \ Bits_memmove(a,b,c) #else #define Bits_memcpyConst(a, b, c) Bits_memcpy(a, b, c) #endif static inline void* Bits_memmem(const void* haystack, const void* needle, size_t haystackLen, size_t needleLen) { uint8_t* needleC = (uint8_t*) needle; uint8_t* haystackC = (uint8_t*) haystack; uint8_t* stopAt = haystackC + haystackLen - needleLen; if (!(haystack && needle && haystackLen && needleLen)) { return NULL; } while (haystackC <= stopAt) { if (*haystackC == *needleC && !__builtin_memcmp(haystackC, needleC, needleLen)) { return haystackC; } haystackC++; } return NULL; } #endif
27.317073
98
0.631696
bb2a55df12c3635bbfe4709bdc930fe502661efe
5,391
c
C
src/wasm/wasm_reader.c
fourtf/wasm
3b5c0acdae996b78bf8c9ca4b0d590657cbb059f
[ "MIT" ]
10
2019-09-27T20:26:25.000Z
2019-12-02T20:53:43.000Z
src/wasm/wasm_reader.c
fourtf/wasm
3b5c0acdae996b78bf8c9ca4b0d590657cbb059f
[ "MIT" ]
null
null
null
src/wasm/wasm_reader.c
fourtf/wasm
3b5c0acdae996b78bf8c9ca4b0d590657cbb059f
[ "MIT" ]
null
null
null
#include "wasm/wasm_reader.h" #include "wasm/wasm_common.h" #include <assert.h> #include <limits.h> #include <stdbool.h> #include <stdio.h> #include <string.h> bool wasm_file_reader_read(wasm_reader *reader, void *buffer, size_t amount) { if (buffer) { // Read. return 1 == fread(buffer, amount, 1, (FILE *)reader->device); } else { // Seek. if (amount > INT_MAX) { fprintf(stderr, "wasm_file_reader_read: amount > INT_MAX\n"); return false; } else { return fseek((FILE *)reader->device, amount, SEEK_CUR) == 0; } } } bool wasm_memory_reader_read(wasm_reader *reader, void *buffer, size_t amount) { if (amount > reader->size) { return false; } else { if (buffer != NULL) { memcpy(buffer, reader->device, amount); } reader->device += amount; reader->size -= amount; return true; } } void wasm_init_file_reader(wasm_reader *reader, FILE *file) { reader->device = file; reader->size = 0; // Size is ignored in file reader. reader->read = &wasm_file_reader_read; } void wasm_init_memory_reader(wasm_reader *reader, const void *data, size_t size) { reader->device = (void *)data; reader->size = size; reader->read = &wasm_memory_reader_read; } _Bool wasm_read(wasm_reader *reader, void *buffer, size_t amount) { return reader->read(reader, buffer, amount); } _Bool wasm_seek(wasm_reader *reader, size_t amount) { return reader->read(reader, NULL, amount); } // Int are encoded as LEB128 https://en.wikipedia.org/wiki/LEB128 // XXX: handling reader errors? // XXX: handle max // XXX: check if unsigned char is required in other places uint32_t wasm_read_leb_u32(wasm_reader *reader) { uint32_t out; wasm_read_leb_u32_2(reader, &out); return out; } bool wasm_read_leb_u32_2(wasm_reader *reader, uint32_t *out) { uint32_t result = 0; // We set it to 128 initially so the loop doesn't end immediately. unsigned char c = 128; // Here we check if the last bit is 1 (& 128). // Per spec it has at most ceil(32 / 7) = 5 bytes. for (int i = 0; c & 128 && i < 5; i++) { if (!wasm_read_obj(reader, &c)) { return false; } // Input: // Byte 0: 1aaaaaaa // Byte 1: 1bbbbbbb // Byte 2: 1ccccccc // Byte 3: 1ddddddd // Byte 4: xxxxeeee // // Output: // < 32 bits > // eeeedddddddcccccccbbbbbbbaaaaaaa // // => xxxx needs to be 0 if (i == 4 && c & (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4)) { return false; } result = result + ((uint32_t)(c & 127) << (i * 7)); } return *out = result, true; } bool wasm_read_f32(wasm_reader *reader, float *out) { char data[4]; if (!wasm_read(reader, data, 4)) { return false; } if (!wasm_is_little_endian()) { char swapped[4]; swapped[0] = data[3]; swapped[1] = data[2]; swapped[2] = data[1]; swapped[3] = data[0]; *out = *((float *)swapped); } else { *out = *((float *)data); } return true; } bool wasm_read_f64(wasm_reader *reader, double *out) { char data[8]; if (!wasm_read(reader, data, 4)) { return false; } if (!wasm_is_little_endian()) { char swapped[8]; swapped[0] = data[7]; swapped[1] = data[6]; swapped[2] = data[5]; swapped[3] = data[4]; swapped[4] = data[3]; swapped[5] = data[2]; swapped[6] = data[1]; swapped[7] = data[0]; *out = *((double *)swapped); } else { *out = *((double *)data); } return true; } // XXX: This code has never been tested and is just assumed to be working. bool wasm_validate_utf8(char *str) { while (*str) { if ((*str & (1 << 7)) == 0) { // 1 byte str++; } else if ((*str & (1 << 7 | 1 << 6 | 1 << 5)) == (1 << 7 | 1 << 6)) { // 2 bytes if (str[1] == '\0') { return false; } if ((str[1] & (1 << 7 | 1 << 6)) != (1 << 7)) { return false; } str += 2; } else if ((*str & (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4)) == (1 << 7 | 1 << 6 | 1 << 5)) { // 3 bytes if (str[1] == '\0' || str[2] == '\0') { return false; } if ((str[1] & (1 << 7 | 1 << 6)) != (1 << 7)) { return false; } if ((str[2] & (1 << 7 | 1 << 6)) != (1 << 7)) { return false; } str += 3; } else if ((*str & (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 3)) == (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4)) { // 4 bytes if (str[1] == '\0' || str[2] == '\0' || str[3] == '\0') { return false; } if ((str[1] & (1 << 7 | 1 << 6)) != (1 << 7)) { return false; } if ((str[2] & (1 << 7 | 1 << 6)) != (1 << 7)) { return false; } if ((str[3] & (1 << 7 | 1 << 6)) != (1 << 7)) { return false; } str += 4; } else { puts("uffka"); return false; } } return true; } bool wasm_read_string(wasm_reader *reader, char **out) { uint32_t length = wasm_read_leb_u32(reader); char *str = wasm_alloc_array(char, length + 1); if (!wasm_read(reader, str, length)) { wasm_free(str); return false; } str[length] = '\0'; if (!wasm_validate_utf8(str)) { fprintf(stderr, "Looks like invalid utf8 but maybe the function is wrong.\n"); wasm_free(str); return false; } *out = str; return true; }
23.853982
80
0.529772
9ba60587873f9559abc9097527cca6a2a47485f2
489
h
C
Mouse Fix/PrefPaneDelegate.h
divadretlaw/mac-mouse-fix
a2ac25fb38cd1f126aa9c4d63e6f9cbc61a4c16f
[ "MIT" ]
1
2019-11-03T19:00:18.000Z
2019-11-03T19:00:18.000Z
Mouse Fix/PrefPaneDelegate.h
divadretlaw/mac-mouse-fix
a2ac25fb38cd1f126aa9c4d63e6f9cbc61a4c16f
[ "MIT" ]
null
null
null
Mouse Fix/PrefPaneDelegate.h
divadretlaw/mac-mouse-fix
a2ac25fb38cd1f126aa9c4d63e6f9cbc61a4c16f
[ "MIT" ]
null
null
null
// // -------------------------------------------------------------------------- // PrefPaneDelegate.h // Created for: Mac Mouse Fix (https://github.com/noah-nuebling/mac-mouse-fix) // Created by: Noah Nuebling in 2019 // Licensed under MIT // -------------------------------------------------------------------------- // #import <PreferencePanes/PreferencePanes.h> @interface PrefPaneDelegate : NSPreferencePane @property (class, strong) NSView *mainView; - (void)mainViewDidLoad; @end
30.5625
78
0.513292
29ff52e33862eab34124457232290b0c331743eb
541
h
C
Sensor.h
Teagan42/ArduinoHoodie
4dce80aaccd112557a4efc9e93544c2bdd9c2430
[ "Apache-2.0" ]
null
null
null
Sensor.h
Teagan42/ArduinoHoodie
4dce80aaccd112557a4efc9e93544c2bdd9c2430
[ "Apache-2.0" ]
null
null
null
Sensor.h
Teagan42/ArduinoHoodie
4dce80aaccd112557a4efc9e93544c2bdd9c2430
[ "Apache-2.0" ]
null
null
null
#ifndef __SENSOR_H__ #define __SENSOR_H__ #include <MPU6050_tockn.h> #include <Wire.h> #include "Point.h" class Sensor { public: Sensor(MPU6050& sensor, int pinAd0); Sensor(TwoWire& w, int pinAd0); void setup(bool calculateOffsets); void setup(); void calculateOffsets(); void loop(); private: void initializePoints(); MPU6050* mpuSensor; int pinAd0; Point* lastAngle; Point* lastAccel; Point* lastGryo; Point* currAngle; Point* currAccel; Point* currGyro; }; #endif
15.027778
40
0.656192
afccfcaa9ea9228d0c744d371815266d7afe0233
1,634
h
C
linux-2.6.16-unmod/include/asm-um/unistd.h
ut-osa/syncchar
eba20da163260b6ae1ef3e334ad2137873a8d625
[ "BSD-3-Clause" ]
null
null
null
linux-2.6.16-unmod/include/asm-um/unistd.h
ut-osa/syncchar
eba20da163260b6ae1ef3e334ad2137873a8d625
[ "BSD-3-Clause" ]
null
null
null
linux-2.6.16-unmod/include/asm-um/unistd.h
ut-osa/syncchar
eba20da163260b6ae1ef3e334ad2137873a8d625
[ "BSD-3-Clause" ]
1
2019-05-14T16:36:45.000Z
2019-05-14T16:36:45.000Z
/* * Copyright (C) 2000 - 2004 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ #ifndef _UM_UNISTD_H_ #define _UM_UNISTD_H_ #include <linux/syscalls.h> #include "linux/resource.h" #include "asm/uaccess.h" extern int um_execve(const char *file, char *const argv[], char *const env[]); #ifdef __KERNEL__ /* We get __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 from the base arch */ #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR #define __ARCH_WANT_SYS_ALARM #define __ARCH_WANT_SYS_GETHOSTNAME #define __ARCH_WANT_SYS_PAUSE #define __ARCH_WANT_SYS_SGETMASK #define __ARCH_WANT_SYS_SIGNAL #define __ARCH_WANT_SYS_TIME #define __ARCH_WANT_SYS_UTIME #define __ARCH_WANT_SYS_WAITPID #define __ARCH_WANT_SYS_SOCKETCALL #define __ARCH_WANT_SYS_FADVISE64 #define __ARCH_WANT_SYS_GETPGRP #define __ARCH_WANT_SYS_LLSEEK #define __ARCH_WANT_SYS_NICE #define __ARCH_WANT_SYS_OLD_GETRLIMIT #define __ARCH_WANT_SYS_OLDUMOUNT #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND #endif #ifdef __KERNEL_SYSCALLS__ #include <linux/compiler.h> #include <linux/types.h> static inline int execve(const char *filename, char *const argv[], char *const envp[]) { mm_segment_t fs; int ret; fs = get_fs(); set_fs(KERNEL_DS); ret = um_execve(filename, argv, envp); set_fs(fs); if (ret >= 0) return ret; errno = -(long)ret; return -1; } int sys_execve(char *file, char **argv, char **env); #endif /* __KERNEL_SYSCALLS__ */ #undef __KERNEL_SYSCALLS__ #include "asm/arch/unistd.h" #endif /* _UM_UNISTD_H_*/
23.014085
78
0.791922
49e0b5638386e31a9cac1f6170ff7d9b2f145cc4
755
h
C
ui/views/controls/table/group_table_model.h
Scopetta197/chromium
b7bf8e39baadfd9089de2ebdc0c5d982de4a9820
[ "BSD-3-Clause" ]
212
2015-01-31T11:55:58.000Z
2022-02-22T06:35:11.000Z
ui/views/controls/table/group_table_model.h
1065672644894730302/Chromium
239dd49e906be4909e293d8991e998c9816eaa35
[ "BSD-3-Clause" ]
5
2015-03-27T14:29:23.000Z
2019-09-25T13:23:12.000Z
ui/views/controls/table/group_table_model.h
1065672644894730302/Chromium
239dd49e906be4909e293d8991e998c9816eaa35
[ "BSD-3-Clause" ]
221
2015-01-07T06:21:24.000Z
2022-02-11T02:51:12.000Z
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_VIEWS_CONTROLS_TABLE_GROUP_TABLE_MODEL_H_ #define UI_VIEWS_CONTROLS_TABLE_GROUP_TABLE_MODEL_H_ #pragma once #include "ui/base/models/table_model.h" namespace views { struct GroupRange { int start; int length; }; // The model driving the GroupTableView. class GroupTableModel : public ui::TableModel { public: // Populates the passed range with the first row/last row (included) // that this item belongs to. virtual void GetGroupRangeForItem(int item, GroupRange* range) = 0; }; } // namespace views #endif // UI_VIEWS_CONTROLS_TABLE_GROUP_TABLE_MODEL_H_
26.034483
73
0.769536
17fffb42f5cec60cfc8d5f5d030f9027082c0ea5
2,724
c
C
server.c
LiuRuili/sigma-dut
c2493f83f190537baa81c0bc97446db6bdbd2654
[ "Unlicense" ]
null
null
null
server.c
LiuRuili/sigma-dut
c2493f83f190537baa81c0bc97446db6bdbd2654
[ "Unlicense" ]
null
null
null
server.c
LiuRuili/sigma-dut
c2493f83f190537baa81c0bc97446db6bdbd2654
[ "Unlicense" ]
null
null
null
/* * Sigma Control API DUT (server) * Copyright (c) 2014, Qualcomm Atheros, Inc. * All Rights Reserved. * Licensed under the Clear BSD license. See README for more details. */ #include "sigma_dut.h" static int cmd_server_reset_default(struct sigma_dut *dut, struct sigma_conn *conn, struct sigma_cmd *cmd) { const char *var; var = get_param(cmd, "Program"); if (var == NULL || strcasecmp(var, "HS2-R2") != 0) { send_resp(dut, conn, SIGMA_ERROR, "errorCode,Unsupported program"); return 0; } var = get_param(cmd, "UserName"); if (var) { sigma_dut_print(dut, DUT_MSG_DEBUG, "Reset user %s", var); /* TODO */ } var = get_param(cmd, "SerialNo"); if (var) { sigma_dut_print(dut, DUT_MSG_DEBUG, "Reset serial number %s", var); /* TODO */ } return 1; } static int cmd_server_request_status(struct sigma_dut *dut, struct sigma_conn *conn, struct sigma_cmd *cmd) { const char *var, *username, *serialno, *imsi, *addr, *status; int osu, timeout; char resp[500]; var = get_param(cmd, "Program"); if (var == NULL || strcasecmp(var, "HS2-R2") != 0) { send_resp(dut, conn, SIGMA_ERROR, "errorCode,Unsupported program"); return 0; } var = get_param(cmd, "Device"); if (!var || (strcasecmp(var, "AAAServer") != 0 && strcasecmp(var, "OSUServer") != 0)) { send_resp(dut, conn, SIGMA_ERROR, "errorCode,Unsupported device type"); return 0; } osu = strcasecmp(var, "OSUServer") == 0; var = get_param(cmd, "Timeout"); if (!var) { send_resp(dut, conn, SIGMA_ERROR, "errorCode,Missing timeout"); return 0; } timeout = atoi(var); sigma_dut_print(dut, DUT_MSG_DEBUG, "timeout: %d", timeout); username = get_param(cmd, "UserName"); if (username) sigma_dut_print(dut, DUT_MSG_DEBUG, "UserName: %s", username); serialno = get_param(cmd, "SerialNo"); if (serialno) sigma_dut_print(dut, DUT_MSG_DEBUG, "SerialNo: %s", serialno); imsi = get_param(cmd, "imsi_val"); if (imsi) sigma_dut_print(dut, DUT_MSG_DEBUG, "imsi_val: %s", imsi); addr = get_param(cmd, "ClientMACAddr"); if (addr) sigma_dut_print(dut, DUT_MSG_DEBUG, "ClientMACAddr: %s", addr); status = get_param(cmd, "Status"); if (status) sigma_dut_print(dut, DUT_MSG_DEBUG, "Status: %s", status); if (osu && status && strcasecmp(status, "Remediation") == 0) { /* TODO */ sleep(1); snprintf(resp, sizeof(resp), "RemediationStatus,Remediation Complete"); send_resp(dut, conn, SIGMA_COMPLETE, resp); return 0; } return 1; } void server_register_cmds(void) { sigma_dut_reg_cmd("server_reset_default", NULL, cmd_server_reset_default); sigma_dut_reg_cmd("server_request_status", NULL, cmd_server_request_status); }
24.540541
69
0.667034
ebc872fe13ef755232b10066c56149d8cd58fa39
85
c
C
clang_study/simple_printf.c
jiamo/pcc
fde1173e3ba81a41b4f901780711cffb7934107e
[ "Unlicense" ]
4
2018-06-20T16:32:30.000Z
2018-09-15T15:12:38.000Z
clang_study/simple_printf.c
jiamo/pcc
fde1173e3ba81a41b4f901780711cffb7934107e
[ "Unlicense" ]
5
2018-05-19T08:35:06.000Z
2021-10-13T05:23:57.000Z
clang_study/simple_printf.c
jiamo/pcc
fde1173e3ba81a41b4f901780711cffb7934107e
[ "Unlicense" ]
null
null
null
int main(){ printf("helloworld"); return 0; }
21.25
33
0.352941
8d20c6107b801ce63eb4eb3099753344df0cf3d1
3,821
c
C
nes/src/controller_nes.c
nvgrw/piNES
60237db7dae399e62acfa0ca2484594a4eece0cf
[ "MIT" ]
1
2021-04-04T19:33:32.000Z
2021-04-04T19:33:32.000Z
nes/src/controller_nes.c
nvgrw/piNES
60237db7dae399e62acfa0ca2484594a4eece0cf
[ "MIT" ]
null
null
null
nes/src/controller_nes.c
nvgrw/piNES
60237db7dae399e62acfa0ca2484594a4eece0cf
[ "MIT" ]
null
null
null
/** * MIT License * * Copyright (c) 2017 * Aurel Bily, Alexis I. Marinoiu, Andrei V. Serbanescu, Niklas Vangerow * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include <stdbool.h> #include <stdlib.h> #ifdef IS_PI #include <pigpio.h> #endif #include "controller.h" #include "controller_nes.h" #include "error.h" /** * controller_nes.c */ /** * GPIO pin numbers connected to the NES controllers. */ #define PIN_CTRL1_DATA 17 #define PIN_CTRL2_DATA 22 #define PIN_LATCH 18 #define PIN_PULSE 27 #define LATCH_DURATION 12 // us (microseconds) #define PULSE_HALF_CYCLE 6 // us // #define LATCH_WAIT 1667 - LATCH_DURATION - PULSE_HALF_CYCLE * 8 // us #ifdef IS_PI static void controller_pulse(void) { gpioWrite(PIN_PULSE, 1); gpioDelay(PULSE_HALF_CYCLE); gpioWrite(PIN_PULSE, 0); } #endif /** * Public functions */ int controller_nes_init(void) { // TODO: This may need further modification to trigger on sigint. #ifdef IS_PI if (gpioInitialise() < 0) { return EXIT_FAILURE; } gpioSetMode(PIN_CTRL1_DATA, PI_INPUT); gpioSetMode(PIN_CTRL2_DATA, PI_INPUT); gpioSetMode(PIN_LATCH, PI_OUTPUT); gpioSetMode(PIN_PULSE, PI_OUTPUT); #endif return EXIT_SUCCESS; } void controller_nes_poll(controller_t* ctrl) { #ifdef IS_PI // Set latch for 12us gpioWrite(PIN_LATCH, 1); gpioDelay(LATCH_DURATION); gpioWrite(PIN_LATCH, 0); // Poll A ctrl->pressed1.a |= !gpioRead(PIN_CTRL1_DATA); ctrl->pressed2.a |= !gpioRead(22); gpioDelay(PULSE_HALF_CYCLE); // Poll B controller_pulse(); ctrl->pressed1.b |= !gpioRead(PIN_CTRL1_DATA); ctrl->pressed2.b |= !gpioRead(PIN_CTRL2_DATA); gpioDelay(PULSE_HALF_CYCLE); // Poll SELECT controller_pulse(); ctrl->pressed1.select |= !gpioRead(PIN_CTRL1_DATA); ctrl->pressed2.select |= !gpioRead(PIN_CTRL2_DATA); gpioDelay(PULSE_HALF_CYCLE); // Poll START controller_pulse(); ctrl->pressed1.start |= !gpioRead(PIN_CTRL1_DATA); ctrl->pressed2.start |= !gpioRead(PIN_CTRL2_DATA); gpioDelay(PULSE_HALF_CYCLE); // Poll UP controller_pulse(); ctrl->pressed1.up |= !gpioRead(PIN_CTRL1_DATA); ctrl->pressed2.up |= !gpioRead(PIN_CTRL2_DATA); gpioDelay(PULSE_HALF_CYCLE); // Poll DOWN controller_pulse(); ctrl->pressed1.down |= !gpioRead(PIN_CTRL1_DATA); ctrl->pressed2.down |= !gpioRead(PIN_CTRL2_DATA); gpioDelay(PULSE_HALF_CYCLE); // Poll LEFT controller_pulse(); ctrl->pressed1.left |= !gpioRead(PIN_CTRL1_DATA); ctrl->pressed2.left |= !gpioRead(PIN_CTRL2_DATA); gpioDelay(PULSE_HALF_CYCLE); // Poll RIGHT controller_pulse(); ctrl->pressed1.right |= !gpioRead(PIN_CTRL1_DATA); ctrl->pressed2.right |= !gpioRead(PIN_CTRL2_DATA); gpioDelay(PULSE_HALF_CYCLE); #endif } void controller_nes_deinit(void) { #ifdef IS_PI gpioTerminate(); #endif }
27.099291
80
0.733839
e49a31e0235a49d0aece8d4d02522abb9ec920de
99
c
C
tests.c/ralloc0000.c
sisnkemp/compiler
aa4ef7b69272aafb3d87371b128545baffc67160
[ "0BSD" ]
null
null
null
tests.c/ralloc0000.c
sisnkemp/compiler
aa4ef7b69272aafb3d87371b128545baffc67160
[ "0BSD" ]
null
null
null
tests.c/ralloc0000.c
sisnkemp/compiler
aa4ef7b69272aafb3d87371b128545baffc67160
[ "0BSD" ]
null
null
null
static void foo(void) { } int main(int argc, char **argv) { int i; i = 0; foo(); return i; }
6.6
27
0.555556
ae5452c1933fc63ccd23a58bb66ab49da6e1f406
2,779
h
C
orchagent/label.h
minionatwork/sonic-swss
544a45c906a73738c951f373f0b2b9e4133586ee
[ "Apache-2.0" ]
132
2016-03-10T00:48:36.000Z
2022-03-10T14:09:50.000Z
orchagent/label.h
minionatwork/sonic-swss
544a45c906a73738c951f373f0b2b9e4133586ee
[ "Apache-2.0" ]
1,644
2016-03-15T19:53:10.000Z
2022-03-31T20:51:06.000Z
orchagent/label.h
minionatwork/sonic-swss
544a45c906a73738c951f373f0b2b9e4133586ee
[ "Apache-2.0" ]
432
2016-03-09T18:10:28.000Z
2022-03-30T14:39:15.000Z
#ifndef __LABEL__ #define __LABEL__ #include <stdint.h> #include <vector> #include <string> #include "converter.h" #include "tokenize.h" namespace swss { typedef uint32_t Label; #define LABEL_DELIMITER '/' #define LABEL_VALUE_MIN 0 #define LABEL_VALUE_MAX 0xFFFFF struct LabelStack { std::vector<Label> m_labelstack; sai_outseg_type_t m_outseg_type; LabelStack() : m_outseg_type(SAI_OUTSEG_TYPE_SWAP) {} // A list of Labels separated by '/' LabelStack(const std::string &str) { // Expected MPLS format = "<outsegtype><labelstack>+<non-mpls-str>" // <outsegtype> = "swap" | "push" // <labelstack> = "<label0>/<label1>/../<labelN>" // <non-mpls-str> = returned to caller and not parsed here // Example = "push10100/10101+10.0.0.3@Ethernet4" if (str.find("swap") == 0) { m_outseg_type = SAI_OUTSEG_TYPE_SWAP; } else if (str.find("push") == 0) { m_outseg_type = SAI_OUTSEG_TYPE_PUSH; } else { // Malformed string std::string err = "Error converting " + str + " to MPLS NextHop"; throw std::invalid_argument(err); } auto labels = swss::tokenize(str.substr(4), LABEL_DELIMITER); for (const auto &i : labels) m_labelstack.emplace_back(to_uint<uint32_t>(i, LABEL_VALUE_MIN, LABEL_VALUE_MAX)); } inline const std::vector<Label> &getLabelStack() const { return m_labelstack; } inline size_t getSize() const { return m_labelstack.size(); } inline bool empty() const { return m_labelstack.empty(); } inline bool operator<(const LabelStack &o) const { return tie(m_labelstack, m_outseg_type) < tie(o.m_labelstack, o.m_outseg_type); } inline bool operator==(const LabelStack &o) const { return (m_labelstack == o.m_labelstack) && (m_outseg_type == o.m_outseg_type); } inline bool operator!=(const LabelStack &o) const { return !(*this == o); } const std::string to_string() const { std::string str; if (m_labelstack.empty()) { return str; } if (m_outseg_type == SAI_OUTSEG_TYPE_SWAP) { str += "swap"; } else if (m_outseg_type == SAI_OUTSEG_TYPE_PUSH) { str += "push"; } for (auto it = m_labelstack.begin(); it != m_labelstack.end(); ++it) { if (it != m_labelstack.begin()) { str += LABEL_DELIMITER; } str += std::to_string(*it); } return str; } }; } #endif /* __LABEL__ */
24.377193
94
0.556675
85ee332702f43158a345c9f9aa5b164da7137bd2
2,080
h
C
src/lib/nhtty/Preferences/Preferences.h
neonkingfr/netzhaut
d4fc9b23cbc531f0f1397ff9a83514661df458d9
[ "MIT" ]
null
null
null
src/lib/nhtty/Preferences/Preferences.h
neonkingfr/netzhaut
d4fc9b23cbc531f0f1397ff9a83514661df458d9
[ "MIT" ]
1
2022-03-14T09:58:30.000Z
2022-03-14T09:58:30.000Z
src/lib/nhtty/Preferences/Preferences.h
netzdevs/netzhaut
d4fc9b23cbc531f0f1397ff9a83514661df458d9
[ "MIT" ]
null
null
null
#ifndef NH_TTY_PREFERENCES_H #define NH_TTY_PREFERENCES_H #ifndef DOXYGEN_SHOULD_SKIP_THIS /** * netzhaut - Web Browser Engine * Copyright (C) 2020 The netzhaut Authors * Published under MIT */ #include "../TTY/Program.h" #include "../Common/Types/Private.h" #include "../../nhcore/Util/String.h" #include "../../nhcore/Util/Time.h" #endif /** @addtogroup lib_nhtty_enums * @{ */ typedef enum NH_TTY_PREFERENCES_COMMAND { NH_TTY_PREFERENCES_COMMAND_BORDERS, NH_TTY_PREFERENCES_COMMAND_TOPBARS, } NH_TTY_PREFERENCES_COMMAND; /** @} */ /** @addtogroup lib_nhtty_structs * @{ */ typedef struct nh_tty_PreferencesView { nh_List FileViews; int helpScroll; int height; int filePreferencesWidth; int treeListingWidth; int treeListingOffset; int treeListingCurrent; } nh_tty_PreferencesView; typedef struct nh_tty_Preferences { int focus; NH_BOOL insertMode; NH_BOOL treeListing; nh_SystemTime LastUpdate; double updateIntervalInSeconds; } nh_tty_Preferences; /** @} */ /** @addtogroup lib_nhtty_vars * @{ */ extern NH_BYTE *NH_TTY_PREFERENCES_COMMANDS_PP[]; extern int NH_TTY_PREFERENCES_COMMANDS_PP_SIZE; /** @} */ /** @addtogroup lib_nhtty_functions * @{ */ void *nh_tty_createPreferencesView( ); void nh_tty_destroyPreferencesView( void *p ); void *nh_tty_initPreferences( ); NH_TTY_RESULT nh_tty_updatePreferences( nh_tty_Program *Program_p ); NH_TTY_RESULT nh_tty_handlePreferencesInput( nh_tty_Program *Program_p, nh_tty_Event Event ); NH_TTY_RESULT nh_tty_drawPreferencesRow( nh_tty_Program *Program_p, nh_encoding_UTF8String *Row_p, int width, int height, int row ); NH_TTY_RESULT nh_tty_getPreferencesCursor( nh_tty_Program *Program_p, int *x_p, int *y_p ); NH_TTY_RESULT nh_tty_executePreferencesCommand( nh_tty_Program *Program_p, nh_List *Arguments_p ); /** @} */ #endif
20.594059
97
0.677885
12a371687cf3dcb635bd0ec73d51ebfe9f3e1bf8
200
h
C
include/time_helpers.h
tschiemer/rme-totalmix-midi-adapter
4673a0aa927f69f8cc5a526198c84baf9acd72ce
[ "MIT" ]
null
null
null
include/time_helpers.h
tschiemer/rme-totalmix-midi-adapter
4673a0aa927f69f8cc5a526198c84baf9acd72ce
[ "MIT" ]
null
null
null
include/time_helpers.h
tschiemer/rme-totalmix-midi-adapter
4673a0aa927f69f8cc5a526198c84baf9acd72ce
[ "MIT" ]
null
null
null
#ifndef TIME_HELPERS_H #define TIME_HELPERS_H namespace RMETotalMixMidiAdapter { typedef unsigned long long timestamp_t; timestamp_t getMicrosecondTimestamp(); } #endif /* TIME_HELPERS_H */
14.285714
41
0.79
12e926cd33adfd8bab702d6db63082c59648543b
821
h
C
src/lib/pke/square.h
carlzhangweiwen/gazelle_mpc
45818ccf6375100a8fe2680f44f37d713380aa5c
[ "MIT" ]
50
2018-10-05T02:46:53.000Z
2022-03-20T08:47:46.000Z
src/lib/pke/square.h
WeiBenqiang/gazelle_mpc
f4eb3bae09bf4897f2651946eac7dee17e094a6f
[ "MIT" ]
7
2018-10-11T17:19:12.000Z
2022-03-08T16:45:11.000Z
src/lib/pke/square.h
WeiBenqiang/gazelle_mpc
f4eb3bae09bf4897f2651946eac7dee17e094a6f
[ "MIT" ]
20
2018-12-09T17:44:11.000Z
2022-03-01T12:13:21.000Z
/* * mat_mul.h * * Created on: Sep 1, 2017 * Author: chiraag */ #ifndef SRC_LIB_PKE_SQUARE_H_ #define SRC_LIB_PKE_SQUARE_H_ #include "utils/backend.h" #include "pke/layers.h" #include "pke_types.h" namespace lbcrypto{ CTVec preprocess_client_share(const SecretKey& sk, const uv64& vec, const FVParams& params); std::tuple<std::vector<uv64>, uv64> preprocess_server_share(const uv64& vec, const FVParams& params); Ciphertext square_online(const CTVec& ct_vec_c, const std::vector<uv64>& pt_vec_s, const FVParams& params); uv64 postprocess_client_share(const SecretKey& sk, const Ciphertext& ct, const ui32 vec_size, const FVParams& params); uv64 square_pt(const uv64& vec_c, const uv64& vec_s, const uv64& vec_s_f, const ui64 p); } #endif /* SRC_LIB_PKE_MAT_MUL_H_ */
25.65625
111
0.723508
3f1af064a3d23edb2f6a843c420b74d537cdc593
1,589
h
C
unit_test/mock_util.h
zli12/reinforcement_learning
58a21389105c6f7b77e8a6e378b4ca64c806183e
[ "MIT" ]
1
2020-02-20T22:53:37.000Z
2020-02-20T22:53:37.000Z
unit_test/mock_util.h
KonstantinKlepikov/reinforcement_learning
df162dc0f4c927bac03833966debc7d4fd0ef4de
[ "MIT" ]
null
null
null
unit_test/mock_util.h
KonstantinKlepikov/reinforcement_learning
df162dc0f4c927bac03833966debc7d4fd0ef4de
[ "MIT" ]
null
null
null
#pragma once #include "factory_resolver.h" #include "sender.h" #include <memory> #ifdef __GNUG__ // Fakeit does not work with GCC's devirtualization // which is enabled with -O2 (the default) or higher. #pragma GCC optimize("no-devirtualize") #endif #include <fakeit/fakeit.hpp> using buffer_t = std::shared_ptr <reinforcement_learning::utility::data_buffer>; std::unique_ptr<fakeit::Mock<reinforcement_learning::i_sender>> get_mock_sender(int send_return_code); std::unique_ptr<fakeit::Mock<reinforcement_learning::i_sender>> get_mock_sender(std::vector<buffer_t>& recorded_messages); std::unique_ptr<fakeit::Mock<reinforcement_learning::model_management::i_data_transport>> get_mock_data_transport(); std::unique_ptr<fakeit::Mock<reinforcement_learning::model_management::i_data_transport>> get_mock_failing_data_transport(); std::unique_ptr<fakeit::Mock<reinforcement_learning::model_management::i_model>> get_mock_model(); std::unique_ptr<reinforcement_learning::sender_factory_t> get_mock_sender_factory(fakeit::Mock<reinforcement_learning::i_sender>* mock_observation_sender, fakeit::Mock<reinforcement_learning::i_sender>* mock_interaction_sender, fakeit::Mock<reinforcement_learning::i_sender>* mock_decision_sender); std::unique_ptr<reinforcement_learning::data_transport_factory_t> get_mock_data_transport_factory(fakeit::Mock<reinforcement_learning::model_management::i_data_transport>* mock_data_transport); std::unique_ptr<reinforcement_learning::model_factory_t> get_mock_model_factory(fakeit::Mock<reinforcement_learning::model_management::i_model>* mock_model);
52.966667
193
0.834487
8bb661b3416785c49c44a89f434a76fcd2e1eb35
531
h
C
Sources/swift-weather/WeatherHelper.h
iballistic/swift-weather
95a50ffd6e92796c04d2378ff6c5314cdb44208a
[ "BSD-3-Clause" ]
null
null
null
Sources/swift-weather/WeatherHelper.h
iballistic/swift-weather
95a50ffd6e92796c04d2378ff6c5314cdb44208a
[ "BSD-3-Clause" ]
null
null
null
Sources/swift-weather/WeatherHelper.h
iballistic/swift-weather
95a50ffd6e92796c04d2378ff6c5314cdb44208a
[ "BSD-3-Clause" ]
null
null
null
// // WeatherHelper.h // WeatherHelper // // Created by Telman Rustam on 2018-08-02. // Copyright © 2018 com.iballistic. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for WeatherHelper. FOUNDATION_EXPORT double WeatherHelperVersionNumber; //! Project version string for WeatherHelper. FOUNDATION_EXPORT const unsigned char WeatherHelperVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <WeatherHelper/PublicHeader.h>
26.55
138
0.774011
6bbf7ba035574f774e8cdc3c1aa4da2e982e0a07
888
h
C
src/simulator.h
SpectralCascade/LudumDare45
1e95e772763955ae08cf0dd4069a54fb871fc3ce
[ "MIT" ]
null
null
null
src/simulator.h
SpectralCascade/LudumDare45
1e95e772763955ae08cf0dd4069a54fb871fc3ce
[ "MIT" ]
null
null
null
src/simulator.h
SpectralCascade/LudumDare45
1e95e772763955ae08cf0dd4069a54fb871fc3ce
[ "MIT" ]
null
null
null
#ifndef SIMULATOR_H #define SIMULATOR_H #include "Ossium.h" using namespace Ossium; // Forward declarations class GameController; class GameSim; class Automaton : public GraphicComponent { public: DECLARE_COMPONENT(GraphicComponent, Automaton); virtual void Simulate(GameSim& sim, GameController& game, int stage); virtual void Render(Renderer& renderer); }; class GameSim : public Component { public: DECLARE_COMPONENT(Component, GameSim); void UpdateSim(GameController& game); unsigned int GetTimeStep(); // // GAME LOGIC VARIABLES // int daysSinceHackers = 0; inline static const int hackerInterval = 100; int money = 550; inline static const int purge_cost = 500; inline static const int server_cost = 200; inline static const int repairs_cost = 50; private: unsigned int timeStep = 0; }; #endif // SIMULATOR_H
16.444444
73
0.719595
6a6002bcfb05e34a519cd488a42ca434cfba24fe
2,959
h
C
demo/mcu/stm32h747/stm32h747i-disco/CM7/Inc/stm32h747i_discovery_conf.h
laves/porcupine
48ee5e7060308d6ea861bbdd1a47eef1ce43a016
[ "Apache-2.0" ]
1,034
2019-08-31T19:23:52.000Z
2022-03-31T06:55:35.000Z
demo/mcu/stm32h747/stm32h747i-disco/CM7/Inc/stm32h747i_discovery_conf.h
ErosMLima/porcupine
bba7ac950656a1169977b670e7421695624ee972
[ "Apache-2.0" ]
246
2019-08-31T18:23:17.000Z
2022-03-30T19:33:49.000Z
demo/mcu/stm32h747/stm32h747i-disco/CM7/Inc/stm32h747i_discovery_conf.h
ErosMLima/porcupine
bba7ac950656a1169977b670e7421695624ee972
[ "Apache-2.0" ]
236
2019-09-02T06:24:54.000Z
2022-03-30T01:17:06.000Z
/** ****************************************************************************** * @file stm32H747i_discovery_conf.h * @author MCD Application Team * @brief STM32H747I_Discovery board configuration file. ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2018 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under BSD 3-Clause license, * the "License"; You may not use this file except in compliance with the * License. You may obtain a copy of the License at: * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef STM32H747I_DISCO_CONF_H #define STM32H747I_DISCO_CONF_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "stm32h7xx_hal.h" /* COM define */ #define USE_COM_LOG 0U #define USE_BSP_COM_FEATURE 1U /* LCD controllers defines */ #define USE_LCD_CTRL_OTM8009A 1U #define USE_LCD_CTRL_ADV7533 1U #define LCD_LAYER_0_ADDRESS 0xD0000000U #define LCD_LAYER_1_ADDRESS 0xD0200000U #define USE_DMA2D_TO_FILL_RGB_RECT 0U /* Camera sensors defines */ #define USE_CAMERA_SENSOR_OV5640 1U #define USE_CAMERA_SENSOR_S5K5CAG 1U /* Audio codecs defines */ #define USE_AUDIO_CODEC_WM8994 1U /* Default Audio IN internal buffer size */ #define DEFAULT_AUDIO_IN_BUFFER_SIZE 64U /* TS supported features defines */ #define USE_TS_GESTURE 1U #define USE_TS_MULTI_TOUCH 1U /* Default TS touch number */ #define TS_TOUCH_NBR 2U #define CAMERA_FRAME_BUFFER ((uint32_t)0xD0600000) /* IRQ priorities */ #define BSP_SDRAM_IT_PRIORITY 15U #define BSP_CAMERA_IT_PRIORITY 15U #define BSP_BUTTON_WAKEUP_IT_PRIORITY 15U #define BSP_AUDIO_OUT_IT_PRIORITY 14U #define BSP_AUDIO_IN_IT_PRIORITY 15U #define BSP_SD_IT_PRIORITY 14U #define BSP_SD_RX_IT_PRIORITY 14U #define BSP_SD_TX_IT_PRIORITY 15U #define BSP_TS_IT_PRIORITY 15U #define BSP_JOY1_SEL_IT_PRIORITY 15U #define BSP_JOY1_DOWN_IT_PRIORITY 15U #define BSP_JOY1_LEFT_IT_PRIORITY 15U #define BSP_JOY1_RIGHT_IT_PRIORITY 15U #define BSP_JOY1_UP_IT_PRIORITY 15U #ifdef __cplusplus } #endif #endif /* STM32H747I_DISCO_CONF_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
36.530864
81
0.558635
ac10cdecf0870b95622feef97d88d657c575669d
2,127
h
C
PrivateFrameworks/UserNotificationsKit.framework/NCNotificationDestinationsRegistry.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
36
2016-04-20T04:19:04.000Z
2018-10-08T04:12:25.000Z
PrivateFrameworks/UserNotificationsKit.framework/NCNotificationDestinationsRegistry.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
null
null
null
PrivateFrameworks/UserNotificationsKit.framework/NCNotificationDestinationsRegistry.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
10
2016-06-16T02:40:44.000Z
2019-01-15T03:31:45.000Z
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/UserNotificationsKit.framework/UserNotificationsKit */ @interface NCNotificationDestinationsRegistry : NSObject <NCDebugInfoProvider> { struct NSMutableDictionary { Class x1; } * _activeDestinations; struct NSMutableDictionary { Class x1; } * _destinations; struct NSMutableDictionary { Class x1; } * _readyDestinations; } @property (nonatomic, copy) NSMutableDictionary *activeDestinations; @property (nonatomic, readonly) unsigned long long count; @property (readonly, copy) NSString *debugDescription; @property (readonly, copy) NSString *description; @property (nonatomic, copy) NSMutableDictionary *destinations; @property (readonly) unsigned long long hash; @property (nonatomic, copy) NSMutableDictionary *readyDestinations; @property (nonatomic, readonly) NSArray *registeredDestinations; @property (readonly) Class superclass; - (void).cxx_destruct; - (id)_activeDestinationsDebugInfo; - (id)_destinationsForRequestDestinations:(id)arg1 inDestinationDict:(struct NSMutableDictionary { Class x1; }*)arg2; - (id)_registeredDestinationsDebugInfo; - (struct NSMutableDictionary { Class x1; }*)activeDestinations; - (unsigned long long)count; - (id)debugInfoPlist; - (struct NSMutableDictionary { Class x1; }*)destinations; - (id)destinationsForRequestDestinations:(id)arg1; - (bool)hasActiveDestinationsForRequest:(id)arg1; - (id)init; - (bool)isRegisteredDestination:(id)arg1; - (struct NSMutableDictionary { Class x1; }*)readyDestinations; - (id)readyDestinationsForRequestDestinations:(id)arg1; - (void)registerDestination:(id)arg1; - (void)registerDestination:(id)arg1 forIdentifier:(id)arg2; - (id)registeredDestinations; - (void)setActiveDestinations:(struct NSMutableDictionary { Class x1; }*)arg1; - (void)setDestination:(id)arg1 enabled:(bool)arg2; - (void)setDestination:(id)arg1 ready:(bool)arg2; - (void)setDestinationWithIdentifier:(id)arg1 enabled:(bool)arg2; - (void)setDestinations:(struct NSMutableDictionary { Class x1; }*)arg1; - (void)setReadyDestinations:(struct NSMutableDictionary { Class x1; }*)arg1; @end
46.23913
117
0.787964
feee40885b77757a8039a3409c5084e317af803a
1,634
h
C
CallTraceForWeChat/CallTraceForWeChat/WeChat_Headers/WCPayEntrustPayInfo.h
ceekay1991/CallTraceForWeChat
5767cb6f781821b6bf9facc8c87e58e15fa88541
[ "MIT" ]
30
2020-03-22T12:30:21.000Z
2022-02-09T08:49:13.000Z
CallTraceForWeChat/CallTraceForWeChat/WeChat_Headers/WCPayEntrustPayInfo.h
ceekay1991/CallTraceForWeChat
5767cb6f781821b6bf9facc8c87e58e15fa88541
[ "MIT" ]
null
null
null
CallTraceForWeChat/CallTraceForWeChat/WeChat_Headers/WCPayEntrustPayInfo.h
ceekay1991/CallTraceForWeChat
5767cb6f781821b6bf9facc8c87e58e15fa88541
[ "MIT" ]
8
2020-03-22T12:30:23.000Z
2020-09-22T04:01:47.000Z
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <objc/NSObject.h> @class NSArray, NSString; @interface WCPayEntrustPayInfo : NSObject { _Bool _isAutoDeduct; _Bool _isSelectPayWay; unsigned int _uiDeductShowType; NSString *_contractTitle; NSArray *_showInfo; NSString *_contractUrl; NSString *_buttonWording; NSString *_deductRuleWording; NSString *_openDeductWording; NSString *_open_deduct_wording_color; } @property(retain, nonatomic) NSString *open_deduct_wording_color; // @synthesize open_deduct_wording_color=_open_deduct_wording_color; @property(retain, nonatomic) NSString *openDeductWording; // @synthesize openDeductWording=_openDeductWording; @property(retain, nonatomic) NSString *deductRuleWording; // @synthesize deductRuleWording=_deductRuleWording; @property(retain, nonatomic) NSString *buttonWording; // @synthesize buttonWording=_buttonWording; @property(nonatomic) unsigned int uiDeductShowType; // @synthesize uiDeductShowType=_uiDeductShowType; @property(nonatomic) _Bool isSelectPayWay; // @synthesize isSelectPayWay=_isSelectPayWay; @property(retain, nonatomic) NSString *contractUrl; // @synthesize contractUrl=_contractUrl; @property(retain, nonatomic) NSArray *showInfo; // @synthesize showInfo=_showInfo; @property(nonatomic) _Bool isAutoDeduct; // @synthesize isAutoDeduct=_isAutoDeduct; @property(retain, nonatomic) NSString *contractTitle; // @synthesize contractTitle=_contractTitle; - (void).cxx_destruct; @end
41.897436
134
0.784578
3a2073ad2eea3ad6eb09021f714f8cb7f0ddd9bb
4,456
c
C
src/sound.c
Dexter245/gb_framework
0019ba6c98eff7a3a0bf20f7b3e5776542e09a1c
[ "MIT" ]
null
null
null
src/sound.c
Dexter245/gb_framework
0019ba6c98eff7a3a0bf20f7b3e5776542e09a1c
[ "MIT" ]
null
null
null
src/sound.c
Dexter245/gb_framework
0019ba6c98eff7a3a0bf20f7b3e5776542e09a1c
[ "MIT" ]
null
null
null
#include "sound.h" void initialize_sound(){ NR50_REG = 0x77;//enable sound on both speakers NR51_REG = 0xFF;//enable all sound channels on both speakers NR52_REG = 0x80;//enable sound in general } //sound 2 void sound2(UINT8 volume, UINT16 frequency){ sound2_envelope_length(volume, frequency, 0, 0, 64); } void sound2_envelope(UINT8 volume, UINT16 frequency, UINT8 envInc, UINT8 envIntensity){ sound2_envelope_length(volume, frequency, envInc, envIntensity, 64); } void sound2_length(UINT8 volume, UINT16 frequency, UINT8 length){ sound2_envelope_length(volume, frequency, 0, 0, length); } void sound2_envelope_length(UINT8 volume, UINT16 frequency, UINT8 envInc, UINT8 envIntensity, UINT8 length){ UINT16 freqNum = (UINT16) ( 2048-(131072 / frequency) ); if(length < 64) NR21_REG = 0x80 | (63 - length); else NR21_REG = 0x80; NR22_REG = (volume << 4) | (envInc << 3) | (envIntensity); NR23_REG = (UINT8) freqNum; if(length < 64) NR24_REG = 0x80 | 0x40 | (freqNum >> 8 ); else NR24_REG = 0x80 | 0x00 | (freqNum >> 8 ); } //sound 1 void sound1(UINT8 volume, UINT16 frequency){ sound1_envelope_length_swee(volume, frequency, 0, 0, 64, 0, 0, 0); } void sound1_sweep(UINT8 volume, UINT16 frequency, UINT8 sweepTime, UINT8 freqDec, UINT8 sweepIntensity){ sound1_envelope_length_swee(volume, frequency, 0, 0, 64, sweepTime, freqDec, sweepIntensity); } void sound1_envelope(UINT8 volume, UINT16 frequency, UINT8 envInc, UINT8 envIntensity){ sound1_envelope_length_swee(volume, frequency, envInc, envIntensity, 64, 0, 0, 0); } void sound1_envelope_sweep(UINT8 volume, UINT16 frequency, UINT8 envInc, UINT8 envIntensity, UINT8 sweepTime, UINT8 freqDec, UINT8 sweepIntensity){ sound1_envelope_length_swee(volume, frequency, envInc, envIntensity, 64, sweepTime, freqDec, sweepIntensity); } void sound1_length(UINT8 volume, UINT16 frequency, UINT8 length){ sound1_envelope_length_swee(volume, frequency, 0, 0, length, 0, 0, 0); } void sound1_length_sweep(UINT8 volume, UINT16 frequency, UINT8 length, UINT8 sweepTime, UINT8 freqDec, UINT8 sweepIntensity){ sound1_envelope_length_swee(volume, frequency, 0, 0, length, sweepTime, freqDec, sweepIntensity); } void sound1_envelope_length(UINT8 volume, UINT16 frequency, UINT8 envInc, UINT8 envIntensity, UINT8 length){ sound1_envelope_length_swee(volume, frequency, envInc, envIntensity, length, 0, 0, 0); } void sound1_envelope_length_swee(UINT8 volume, UINT16 frequency, UINT8 envInc, UINT8 envIntensity, UINT8 length, UINT8 sweepTime, UINT8 freqDec, UINT8 sweepIntensity){ UINT16 freqNum = (UINT16) ( 2048-(131072 / frequency) ); NR10_REG = (sweepTime << 4) | (freqDec << 3) | sweepIntensity; if(length < 64) NR11_REG = 0x80 | (63 - length); else NR11_REG = 0x80; NR12_REG = (volume << 4) | (envInc << 3) | (envIntensity); NR13_REG = (UINT8) freqNum; if(length < 64) NR14_REG = 0x80 | 0x40 | (freqNum >> 8 ); else NR14_REG = 0x80 | 0x00 | (freqNum >> 8 ); } //sound 4 void sound4(UINT8 volume, UINT8 shiftClFreq, UINT8 counterStepWidth, UINT8 divRatio){ sound4_envelope_length(volume, shiftClFreq, counterStepWidth, divRatio, 0, 0, 64); } void sound4_length(UINT8 volume, UINT8 shiftClFreq, UINT8 counterStepWidth, UINT8 divRatio, UINT8 length){ sound4_envelope_length(volume, shiftClFreq, counterStepWidth, divRatio, 0, 0, length); } void sound4_envelope(UINT8 volume, UINT8 shiftClFreq, UINT8 counterStepWidth, UINT8 divRatio, UINT8 envInc, UINT8 envIntensity){ sound4_envelope_length(volume, shiftClFreq, counterStepWidth, divRatio, envInc, envIntensity, 64); } void sound4_envelope_length(UINT8 volume, UINT8 shiftClFreq, UINT8 counterStepWidth, UINT8 divRatio, UINT8 envInc, UINT8 envIntensity, UINT8 length){ NR41_REG = 63 - length; NR42_REG = (volume << 4) | (envInc << 3) | envIntensity; NR43_REG = (shiftClFreq << 4) | (counterStepWidth << 3) | divRatio; if(length < 64) NR44_REG = 0xC0; else NR44_REG = 0x80; }
28.025157
77
0.66158
3a5c2d08767fa369d15fb7912f33873ddaedb81e
189,986
h
C
include/sensorycloud/generated/v1/video/video.pb.h
Sensory-Cloud/cpp-sdk
9bd5171c529f6a5d6fa6b8ff58994a1709212709
[ "Apache-2.0" ]
3
2022-01-04T20:03:24.000Z
2022-01-10T19:12:59.000Z
include/sensorycloud/generated/v1/video/video.pb.h
Sensory-Cloud/cpp-sdk
9bd5171c529f6a5d6fa6b8ff58994a1709212709
[ "Apache-2.0" ]
null
null
null
include/sensorycloud/generated/v1/video/video.pb.h
Sensory-Cloud/cpp-sdk
9bd5171c529f6a5d6fa6b8ff58994a1709212709
[ "Apache-2.0" ]
null
null
null
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: v1/video/video.proto #ifndef GOOGLE_PROTOBUF_INCLUDED_v1_2fvideo_2fvideo_2eproto #define GOOGLE_PROTOBUF_INCLUDED_v1_2fvideo_2fvideo_2eproto #include <limits> #include <string> #include <google/protobuf/port_def.inc> #if PROTOBUF_VERSION < 3018000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif #if 3018001 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif #include <google/protobuf/port_undef.inc> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/arena.h> #include <google/protobuf/arenastring.h> #include <google/protobuf/generated_message_bases.h> #include <google/protobuf/generated_message_table_driven.h> #include <google/protobuf/generated_message_util.h> #include <google/protobuf/metadata_lite.h> #include <google/protobuf/generated_message_reflection.h> #include <google/protobuf/message.h> #include <google/protobuf/repeated_field.h> // IWYU pragma: export #include <google/protobuf/extension_set.h> // IWYU pragma: export #include <google/protobuf/generated_enum_reflection.h> #include <google/protobuf/unknown_field_set.h> #include "validate/validate.pb.h" #include "common/common.pb.h" // @@protoc_insertion_point(includes) #include <google/protobuf/port_def.inc> #define PROTOBUF_INTERNAL_EXPORT_v1_2fvideo_2fvideo_2eproto PROTOBUF_NAMESPACE_OPEN namespace internal { class AnyMetadata; } // namespace internal PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct TableStruct_v1_2fvideo_2fvideo_2eproto { static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[12] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_v1_2fvideo_2fvideo_2eproto; namespace sensory { namespace api { namespace v1 { namespace video { class AuthenticateConfig; struct AuthenticateConfigDefaultTypeInternal; extern AuthenticateConfigDefaultTypeInternal _AuthenticateConfig_default_instance_; class AuthenticateRequest; struct AuthenticateRequestDefaultTypeInternal; extern AuthenticateRequestDefaultTypeInternal _AuthenticateRequest_default_instance_; class AuthenticateResponse; struct AuthenticateResponseDefaultTypeInternal; extern AuthenticateResponseDefaultTypeInternal _AuthenticateResponse_default_instance_; class CreateEnrollmentConfig; struct CreateEnrollmentConfigDefaultTypeInternal; extern CreateEnrollmentConfigDefaultTypeInternal _CreateEnrollmentConfig_default_instance_; class CreateEnrollmentRequest; struct CreateEnrollmentRequestDefaultTypeInternal; extern CreateEnrollmentRequestDefaultTypeInternal _CreateEnrollmentRequest_default_instance_; class CreateEnrollmentResponse; struct CreateEnrollmentResponseDefaultTypeInternal; extern CreateEnrollmentResponseDefaultTypeInternal _CreateEnrollmentResponse_default_instance_; class GetModelsRequest; struct GetModelsRequestDefaultTypeInternal; extern GetModelsRequestDefaultTypeInternal _GetModelsRequest_default_instance_; class GetModelsResponse; struct GetModelsResponseDefaultTypeInternal; extern GetModelsResponseDefaultTypeInternal _GetModelsResponse_default_instance_; class LivenessRecognitionResponse; struct LivenessRecognitionResponseDefaultTypeInternal; extern LivenessRecognitionResponseDefaultTypeInternal _LivenessRecognitionResponse_default_instance_; class ValidateRecognitionConfig; struct ValidateRecognitionConfigDefaultTypeInternal; extern ValidateRecognitionConfigDefaultTypeInternal _ValidateRecognitionConfig_default_instance_; class ValidateRecognitionRequest; struct ValidateRecognitionRequestDefaultTypeInternal; extern ValidateRecognitionRequestDefaultTypeInternal _ValidateRecognitionRequest_default_instance_; class VideoModel; struct VideoModelDefaultTypeInternal; extern VideoModelDefaultTypeInternal _VideoModel_default_instance_; } // namespace video } // namespace v1 } // namespace api } // namespace sensory PROTOBUF_NAMESPACE_OPEN template<> ::sensory::api::v1::video::AuthenticateConfig* Arena::CreateMaybeMessage<::sensory::api::v1::video::AuthenticateConfig>(Arena*); template<> ::sensory::api::v1::video::AuthenticateRequest* Arena::CreateMaybeMessage<::sensory::api::v1::video::AuthenticateRequest>(Arena*); template<> ::sensory::api::v1::video::AuthenticateResponse* Arena::CreateMaybeMessage<::sensory::api::v1::video::AuthenticateResponse>(Arena*); template<> ::sensory::api::v1::video::CreateEnrollmentConfig* Arena::CreateMaybeMessage<::sensory::api::v1::video::CreateEnrollmentConfig>(Arena*); template<> ::sensory::api::v1::video::CreateEnrollmentRequest* Arena::CreateMaybeMessage<::sensory::api::v1::video::CreateEnrollmentRequest>(Arena*); template<> ::sensory::api::v1::video::CreateEnrollmentResponse* Arena::CreateMaybeMessage<::sensory::api::v1::video::CreateEnrollmentResponse>(Arena*); template<> ::sensory::api::v1::video::GetModelsRequest* Arena::CreateMaybeMessage<::sensory::api::v1::video::GetModelsRequest>(Arena*); template<> ::sensory::api::v1::video::GetModelsResponse* Arena::CreateMaybeMessage<::sensory::api::v1::video::GetModelsResponse>(Arena*); template<> ::sensory::api::v1::video::LivenessRecognitionResponse* Arena::CreateMaybeMessage<::sensory::api::v1::video::LivenessRecognitionResponse>(Arena*); template<> ::sensory::api::v1::video::ValidateRecognitionConfig* Arena::CreateMaybeMessage<::sensory::api::v1::video::ValidateRecognitionConfig>(Arena*); template<> ::sensory::api::v1::video::ValidateRecognitionRequest* Arena::CreateMaybeMessage<::sensory::api::v1::video::ValidateRecognitionRequest>(Arena*); template<> ::sensory::api::v1::video::VideoModel* Arena::CreateMaybeMessage<::sensory::api::v1::video::VideoModel>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace sensory { namespace api { namespace v1 { namespace video { enum RecognitionThreshold : int { LOW = 0, MEDIUM = 1, HIGH = 2, HIGHEST = 3, RecognitionThreshold_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), RecognitionThreshold_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; bool RecognitionThreshold_IsValid(int value); constexpr RecognitionThreshold RecognitionThreshold_MIN = LOW; constexpr RecognitionThreshold RecognitionThreshold_MAX = HIGHEST; constexpr int RecognitionThreshold_ARRAYSIZE = RecognitionThreshold_MAX + 1; const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RecognitionThreshold_descriptor(); template<typename T> inline const std::string& RecognitionThreshold_Name(T enum_t_value) { static_assert(::std::is_same<T, RecognitionThreshold>::value || ::std::is_integral<T>::value, "Incorrect type passed to function RecognitionThreshold_Name."); return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( RecognitionThreshold_descriptor(), enum_t_value); } inline bool RecognitionThreshold_Parse( ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, RecognitionThreshold* value) { return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<RecognitionThreshold>( RecognitionThreshold_descriptor(), name, value); } // =================================================================== class VideoModel final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.VideoModel) */ { public: inline VideoModel() : VideoModel(nullptr) {} ~VideoModel() override; explicit constexpr VideoModel(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); VideoModel(const VideoModel& from); VideoModel(VideoModel&& from) noexcept : VideoModel() { *this = ::std::move(from); } inline VideoModel& operator=(const VideoModel& from) { CopyFrom(from); return *this; } inline VideoModel& operator=(VideoModel&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const VideoModel& default_instance() { return *internal_default_instance(); } static inline const VideoModel* internal_default_instance() { return reinterpret_cast<const VideoModel*>( &_VideoModel_default_instance_); } static constexpr int kIndexInFileMessages = 0; friend void swap(VideoModel& a, VideoModel& b) { a.Swap(&b); } inline void Swap(VideoModel* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(VideoModel* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline VideoModel* New() const final { return new VideoModel(); } VideoModel* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<VideoModel>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const VideoModel& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const VideoModel& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(VideoModel* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.VideoModel"; } protected: explicit VideoModel(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kVersionsFieldNumber = 5, kNameFieldNumber = 1, kFixedObjectFieldNumber = 4, kModelTypeFieldNumber = 3, kIsEnrollableFieldNumber = 2, kIsLivenessSupportedFieldNumber = 7, kTechnologyFieldNumber = 6, }; // repeated string versions = 5; int versions_size() const; private: int _internal_versions_size() const; public: void clear_versions(); const std::string& versions(int index) const; std::string* mutable_versions(int index); void set_versions(int index, const std::string& value); void set_versions(int index, std::string&& value); void set_versions(int index, const char* value); void set_versions(int index, const char* value, size_t size); std::string* add_versions(); void add_versions(const std::string& value); void add_versions(std::string&& value); void add_versions(const char* value); void add_versions(const char* value, size_t size); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& versions() const; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_versions(); private: const std::string& _internal_versions(int index) const; std::string* _internal_add_versions(); public: // string name = 1; void clear_name(); const std::string& name() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_name(ArgT0&& arg0, ArgT... args); std::string* mutable_name(); PROTOBUF_MUST_USE_RESULT std::string* release_name(); void set_allocated_name(std::string* name); private: const std::string& _internal_name() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); std::string* _internal_mutable_name(); public: // string fixedObject = 4; void clear_fixedobject(); const std::string& fixedobject() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_fixedobject(ArgT0&& arg0, ArgT... args); std::string* mutable_fixedobject(); PROTOBUF_MUST_USE_RESULT std::string* release_fixedobject(); void set_allocated_fixedobject(std::string* fixedobject); private: const std::string& _internal_fixedobject() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_fixedobject(const std::string& value); std::string* _internal_mutable_fixedobject(); public: // .sensory.api.common.ModelType modelType = 3; void clear_modeltype(); ::sensory::api::common::ModelType modeltype() const; void set_modeltype(::sensory::api::common::ModelType value); private: ::sensory::api::common::ModelType _internal_modeltype() const; void _internal_set_modeltype(::sensory::api::common::ModelType value); public: // bool isEnrollable = 2; void clear_isenrollable(); bool isenrollable() const; void set_isenrollable(bool value); private: bool _internal_isenrollable() const; void _internal_set_isenrollable(bool value); public: // bool isLivenessSupported = 7; void clear_islivenesssupported(); bool islivenesssupported() const; void set_islivenesssupported(bool value); private: bool _internal_islivenesssupported() const; void _internal_set_islivenesssupported(bool value); public: // .sensory.api.common.TechnologyType technology = 6; void clear_technology(); ::sensory::api::common::TechnologyType technology() const; void set_technology(::sensory::api::common::TechnologyType value); private: ::sensory::api::common::TechnologyType _internal_technology() const; void _internal_set_technology(::sensory::api::common::TechnologyType value); public: // @@protoc_insertion_point(class_scope:sensory.api.v1.video.VideoModel) private: class _Internal; template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> versions_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr fixedobject_; int modeltype_; bool isenrollable_; bool islivenesssupported_; int technology_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class GetModelsRequest final : public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.GetModelsRequest) */ { public: inline GetModelsRequest() : GetModelsRequest(nullptr) {} explicit constexpr GetModelsRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); GetModelsRequest(const GetModelsRequest& from); GetModelsRequest(GetModelsRequest&& from) noexcept : GetModelsRequest() { *this = ::std::move(from); } inline GetModelsRequest& operator=(const GetModelsRequest& from) { CopyFrom(from); return *this; } inline GetModelsRequest& operator=(GetModelsRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const GetModelsRequest& default_instance() { return *internal_default_instance(); } static inline const GetModelsRequest* internal_default_instance() { return reinterpret_cast<const GetModelsRequest*>( &_GetModelsRequest_default_instance_); } static constexpr int kIndexInFileMessages = 1; friend void swap(GetModelsRequest& a, GetModelsRequest& b) { a.Swap(&b); } inline void Swap(GetModelsRequest* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(GetModelsRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline GetModelsRequest* New() const final { return new GetModelsRequest(); } GetModelsRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<GetModelsRequest>(arena); } using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; inline void CopyFrom(const GetModelsRequest& from) { ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(this, from); } using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; void MergeFrom(const GetModelsRequest& from) { ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(this, from); } public: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.GetModelsRequest"; } protected: explicit GetModelsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // @@protoc_insertion_point(class_scope:sensory.api.v1.video.GetModelsRequest) private: class _Internal; template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class GetModelsResponse final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.GetModelsResponse) */ { public: inline GetModelsResponse() : GetModelsResponse(nullptr) {} ~GetModelsResponse() override; explicit constexpr GetModelsResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); GetModelsResponse(const GetModelsResponse& from); GetModelsResponse(GetModelsResponse&& from) noexcept : GetModelsResponse() { *this = ::std::move(from); } inline GetModelsResponse& operator=(const GetModelsResponse& from) { CopyFrom(from); return *this; } inline GetModelsResponse& operator=(GetModelsResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const GetModelsResponse& default_instance() { return *internal_default_instance(); } static inline const GetModelsResponse* internal_default_instance() { return reinterpret_cast<const GetModelsResponse*>( &_GetModelsResponse_default_instance_); } static constexpr int kIndexInFileMessages = 2; friend void swap(GetModelsResponse& a, GetModelsResponse& b) { a.Swap(&b); } inline void Swap(GetModelsResponse* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(GetModelsResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline GetModelsResponse* New() const final { return new GetModelsResponse(); } GetModelsResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<GetModelsResponse>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const GetModelsResponse& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const GetModelsResponse& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(GetModelsResponse* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.GetModelsResponse"; } protected: explicit GetModelsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kModelsFieldNumber = 1, }; // repeated .sensory.api.v1.video.VideoModel models = 1; int models_size() const; private: int _internal_models_size() const; public: void clear_models(); ::sensory::api::v1::video::VideoModel* mutable_models(int index); ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sensory::api::v1::video::VideoModel >* mutable_models(); private: const ::sensory::api::v1::video::VideoModel& _internal_models(int index) const; ::sensory::api::v1::video::VideoModel* _internal_add_models(); public: const ::sensory::api::v1::video::VideoModel& models(int index) const; ::sensory::api::v1::video::VideoModel* add_models(); const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sensory::api::v1::video::VideoModel >& models() const; // @@protoc_insertion_point(class_scope:sensory.api.v1.video.GetModelsResponse) private: class _Internal; template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sensory::api::v1::video::VideoModel > models_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class CreateEnrollmentRequest final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.CreateEnrollmentRequest) */ { public: inline CreateEnrollmentRequest() : CreateEnrollmentRequest(nullptr) {} ~CreateEnrollmentRequest() override; explicit constexpr CreateEnrollmentRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); CreateEnrollmentRequest(const CreateEnrollmentRequest& from); CreateEnrollmentRequest(CreateEnrollmentRequest&& from) noexcept : CreateEnrollmentRequest() { *this = ::std::move(from); } inline CreateEnrollmentRequest& operator=(const CreateEnrollmentRequest& from) { CopyFrom(from); return *this; } inline CreateEnrollmentRequest& operator=(CreateEnrollmentRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const CreateEnrollmentRequest& default_instance() { return *internal_default_instance(); } enum StreamingRequestCase { kConfig = 1, kImageContent = 2, STREAMINGREQUEST_NOT_SET = 0, }; static inline const CreateEnrollmentRequest* internal_default_instance() { return reinterpret_cast<const CreateEnrollmentRequest*>( &_CreateEnrollmentRequest_default_instance_); } static constexpr int kIndexInFileMessages = 3; friend void swap(CreateEnrollmentRequest& a, CreateEnrollmentRequest& b) { a.Swap(&b); } inline void Swap(CreateEnrollmentRequest* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(CreateEnrollmentRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline CreateEnrollmentRequest* New() const final { return new CreateEnrollmentRequest(); } CreateEnrollmentRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<CreateEnrollmentRequest>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const CreateEnrollmentRequest& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const CreateEnrollmentRequest& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(CreateEnrollmentRequest* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.CreateEnrollmentRequest"; } protected: explicit CreateEnrollmentRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kConfigFieldNumber = 1, kImageContentFieldNumber = 2, }; // .sensory.api.v1.video.CreateEnrollmentConfig config = 1; bool has_config() const; private: bool _internal_has_config() const; public: void clear_config(); const ::sensory::api::v1::video::CreateEnrollmentConfig& config() const; PROTOBUF_MUST_USE_RESULT ::sensory::api::v1::video::CreateEnrollmentConfig* release_config(); ::sensory::api::v1::video::CreateEnrollmentConfig* mutable_config(); void set_allocated_config(::sensory::api::v1::video::CreateEnrollmentConfig* config); private: const ::sensory::api::v1::video::CreateEnrollmentConfig& _internal_config() const; ::sensory::api::v1::video::CreateEnrollmentConfig* _internal_mutable_config(); public: void unsafe_arena_set_allocated_config( ::sensory::api::v1::video::CreateEnrollmentConfig* config); ::sensory::api::v1::video::CreateEnrollmentConfig* unsafe_arena_release_config(); // bytes imageContent = 2; bool has_imagecontent() const; private: bool _internal_has_imagecontent() const; public: void clear_imagecontent(); const std::string& imagecontent() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_imagecontent(ArgT0&& arg0, ArgT... args); std::string* mutable_imagecontent(); PROTOBUF_MUST_USE_RESULT std::string* release_imagecontent(); void set_allocated_imagecontent(std::string* imagecontent); private: const std::string& _internal_imagecontent() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_imagecontent(const std::string& value); std::string* _internal_mutable_imagecontent(); public: void clear_streamingRequest(); StreamingRequestCase streamingRequest_case() const; // @@protoc_insertion_point(class_scope:sensory.api.v1.video.CreateEnrollmentRequest) private: class _Internal; void set_has_config(); void set_has_imagecontent(); inline bool has_streamingRequest() const; inline void clear_has_streamingRequest(); template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; union StreamingRequestUnion { constexpr StreamingRequestUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; ::sensory::api::v1::video::CreateEnrollmentConfig* config_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr imagecontent_; } streamingRequest_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class AuthenticateRequest final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.AuthenticateRequest) */ { public: inline AuthenticateRequest() : AuthenticateRequest(nullptr) {} ~AuthenticateRequest() override; explicit constexpr AuthenticateRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); AuthenticateRequest(const AuthenticateRequest& from); AuthenticateRequest(AuthenticateRequest&& from) noexcept : AuthenticateRequest() { *this = ::std::move(from); } inline AuthenticateRequest& operator=(const AuthenticateRequest& from) { CopyFrom(from); return *this; } inline AuthenticateRequest& operator=(AuthenticateRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const AuthenticateRequest& default_instance() { return *internal_default_instance(); } enum StreamingRequestCase { kConfig = 1, kImageContent = 2, STREAMINGREQUEST_NOT_SET = 0, }; static inline const AuthenticateRequest* internal_default_instance() { return reinterpret_cast<const AuthenticateRequest*>( &_AuthenticateRequest_default_instance_); } static constexpr int kIndexInFileMessages = 4; friend void swap(AuthenticateRequest& a, AuthenticateRequest& b) { a.Swap(&b); } inline void Swap(AuthenticateRequest* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(AuthenticateRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline AuthenticateRequest* New() const final { return new AuthenticateRequest(); } AuthenticateRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<AuthenticateRequest>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const AuthenticateRequest& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const AuthenticateRequest& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(AuthenticateRequest* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.AuthenticateRequest"; } protected: explicit AuthenticateRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kConfigFieldNumber = 1, kImageContentFieldNumber = 2, }; // .sensory.api.v1.video.AuthenticateConfig config = 1; bool has_config() const; private: bool _internal_has_config() const; public: void clear_config(); const ::sensory::api::v1::video::AuthenticateConfig& config() const; PROTOBUF_MUST_USE_RESULT ::sensory::api::v1::video::AuthenticateConfig* release_config(); ::sensory::api::v1::video::AuthenticateConfig* mutable_config(); void set_allocated_config(::sensory::api::v1::video::AuthenticateConfig* config); private: const ::sensory::api::v1::video::AuthenticateConfig& _internal_config() const; ::sensory::api::v1::video::AuthenticateConfig* _internal_mutable_config(); public: void unsafe_arena_set_allocated_config( ::sensory::api::v1::video::AuthenticateConfig* config); ::sensory::api::v1::video::AuthenticateConfig* unsafe_arena_release_config(); // bytes imageContent = 2; bool has_imagecontent() const; private: bool _internal_has_imagecontent() const; public: void clear_imagecontent(); const std::string& imagecontent() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_imagecontent(ArgT0&& arg0, ArgT... args); std::string* mutable_imagecontent(); PROTOBUF_MUST_USE_RESULT std::string* release_imagecontent(); void set_allocated_imagecontent(std::string* imagecontent); private: const std::string& _internal_imagecontent() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_imagecontent(const std::string& value); std::string* _internal_mutable_imagecontent(); public: void clear_streamingRequest(); StreamingRequestCase streamingRequest_case() const; // @@protoc_insertion_point(class_scope:sensory.api.v1.video.AuthenticateRequest) private: class _Internal; void set_has_config(); void set_has_imagecontent(); inline bool has_streamingRequest() const; inline void clear_has_streamingRequest(); template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; union StreamingRequestUnion { constexpr StreamingRequestUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; ::sensory::api::v1::video::AuthenticateConfig* config_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr imagecontent_; } streamingRequest_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class ValidateRecognitionRequest final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.ValidateRecognitionRequest) */ { public: inline ValidateRecognitionRequest() : ValidateRecognitionRequest(nullptr) {} ~ValidateRecognitionRequest() override; explicit constexpr ValidateRecognitionRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); ValidateRecognitionRequest(const ValidateRecognitionRequest& from); ValidateRecognitionRequest(ValidateRecognitionRequest&& from) noexcept : ValidateRecognitionRequest() { *this = ::std::move(from); } inline ValidateRecognitionRequest& operator=(const ValidateRecognitionRequest& from) { CopyFrom(from); return *this; } inline ValidateRecognitionRequest& operator=(ValidateRecognitionRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const ValidateRecognitionRequest& default_instance() { return *internal_default_instance(); } enum StreamingRequestCase { kConfig = 1, kImageContent = 2, STREAMINGREQUEST_NOT_SET = 0, }; static inline const ValidateRecognitionRequest* internal_default_instance() { return reinterpret_cast<const ValidateRecognitionRequest*>( &_ValidateRecognitionRequest_default_instance_); } static constexpr int kIndexInFileMessages = 5; friend void swap(ValidateRecognitionRequest& a, ValidateRecognitionRequest& b) { a.Swap(&b); } inline void Swap(ValidateRecognitionRequest* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(ValidateRecognitionRequest* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline ValidateRecognitionRequest* New() const final { return new ValidateRecognitionRequest(); } ValidateRecognitionRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<ValidateRecognitionRequest>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const ValidateRecognitionRequest& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const ValidateRecognitionRequest& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ValidateRecognitionRequest* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.ValidateRecognitionRequest"; } protected: explicit ValidateRecognitionRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kConfigFieldNumber = 1, kImageContentFieldNumber = 2, }; // .sensory.api.v1.video.ValidateRecognitionConfig config = 1; bool has_config() const; private: bool _internal_has_config() const; public: void clear_config(); const ::sensory::api::v1::video::ValidateRecognitionConfig& config() const; PROTOBUF_MUST_USE_RESULT ::sensory::api::v1::video::ValidateRecognitionConfig* release_config(); ::sensory::api::v1::video::ValidateRecognitionConfig* mutable_config(); void set_allocated_config(::sensory::api::v1::video::ValidateRecognitionConfig* config); private: const ::sensory::api::v1::video::ValidateRecognitionConfig& _internal_config() const; ::sensory::api::v1::video::ValidateRecognitionConfig* _internal_mutable_config(); public: void unsafe_arena_set_allocated_config( ::sensory::api::v1::video::ValidateRecognitionConfig* config); ::sensory::api::v1::video::ValidateRecognitionConfig* unsafe_arena_release_config(); // bytes imageContent = 2; bool has_imagecontent() const; private: bool _internal_has_imagecontent() const; public: void clear_imagecontent(); const std::string& imagecontent() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_imagecontent(ArgT0&& arg0, ArgT... args); std::string* mutable_imagecontent(); PROTOBUF_MUST_USE_RESULT std::string* release_imagecontent(); void set_allocated_imagecontent(std::string* imagecontent); private: const std::string& _internal_imagecontent() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_imagecontent(const std::string& value); std::string* _internal_mutable_imagecontent(); public: void clear_streamingRequest(); StreamingRequestCase streamingRequest_case() const; // @@protoc_insertion_point(class_scope:sensory.api.v1.video.ValidateRecognitionRequest) private: class _Internal; void set_has_config(); void set_has_imagecontent(); inline bool has_streamingRequest() const; inline void clear_has_streamingRequest(); template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; union StreamingRequestUnion { constexpr StreamingRequestUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; ::sensory::api::v1::video::ValidateRecognitionConfig* config_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr imagecontent_; } streamingRequest_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class CreateEnrollmentResponse final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.CreateEnrollmentResponse) */ { public: inline CreateEnrollmentResponse() : CreateEnrollmentResponse(nullptr) {} ~CreateEnrollmentResponse() override; explicit constexpr CreateEnrollmentResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); CreateEnrollmentResponse(const CreateEnrollmentResponse& from); CreateEnrollmentResponse(CreateEnrollmentResponse&& from) noexcept : CreateEnrollmentResponse() { *this = ::std::move(from); } inline CreateEnrollmentResponse& operator=(const CreateEnrollmentResponse& from) { CopyFrom(from); return *this; } inline CreateEnrollmentResponse& operator=(CreateEnrollmentResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const CreateEnrollmentResponse& default_instance() { return *internal_default_instance(); } static inline const CreateEnrollmentResponse* internal_default_instance() { return reinterpret_cast<const CreateEnrollmentResponse*>( &_CreateEnrollmentResponse_default_instance_); } static constexpr int kIndexInFileMessages = 6; friend void swap(CreateEnrollmentResponse& a, CreateEnrollmentResponse& b) { a.Swap(&b); } inline void Swap(CreateEnrollmentResponse* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(CreateEnrollmentResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline CreateEnrollmentResponse* New() const final { return new CreateEnrollmentResponse(); } CreateEnrollmentResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<CreateEnrollmentResponse>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const CreateEnrollmentResponse& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const CreateEnrollmentResponse& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(CreateEnrollmentResponse* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.CreateEnrollmentResponse"; } protected: explicit CreateEnrollmentResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kEnrollmentIdFieldNumber = 3, kModelNameFieldNumber = 4, kModelVersionFieldNumber = 5, kPercentCompleteFieldNumber = 1, kIsAliveFieldNumber = 2, kScoreFieldNumber = 6, }; // string enrollmentId = 3; void clear_enrollmentid(); const std::string& enrollmentid() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_enrollmentid(ArgT0&& arg0, ArgT... args); std::string* mutable_enrollmentid(); PROTOBUF_MUST_USE_RESULT std::string* release_enrollmentid(); void set_allocated_enrollmentid(std::string* enrollmentid); private: const std::string& _internal_enrollmentid() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_enrollmentid(const std::string& value); std::string* _internal_mutable_enrollmentid(); public: // string modelName = 4; void clear_modelname(); const std::string& modelname() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_modelname(ArgT0&& arg0, ArgT... args); std::string* mutable_modelname(); PROTOBUF_MUST_USE_RESULT std::string* release_modelname(); void set_allocated_modelname(std::string* modelname); private: const std::string& _internal_modelname() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_modelname(const std::string& value); std::string* _internal_mutable_modelname(); public: // string modelVersion = 5; void clear_modelversion(); const std::string& modelversion() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_modelversion(ArgT0&& arg0, ArgT... args); std::string* mutable_modelversion(); PROTOBUF_MUST_USE_RESULT std::string* release_modelversion(); void set_allocated_modelversion(std::string* modelversion); private: const std::string& _internal_modelversion() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_modelversion(const std::string& value); std::string* _internal_mutable_modelversion(); public: // int64 percentComplete = 1; void clear_percentcomplete(); ::PROTOBUF_NAMESPACE_ID::int64 percentcomplete() const; void set_percentcomplete(::PROTOBUF_NAMESPACE_ID::int64 value); private: ::PROTOBUF_NAMESPACE_ID::int64 _internal_percentcomplete() const; void _internal_set_percentcomplete(::PROTOBUF_NAMESPACE_ID::int64 value); public: // bool isAlive = 2; void clear_isalive(); bool isalive() const; void set_isalive(bool value); private: bool _internal_isalive() const; void _internal_set_isalive(bool value); public: // float score = 6; void clear_score(); float score() const; void set_score(float value); private: float _internal_score() const; void _internal_set_score(float value); public: // @@protoc_insertion_point(class_scope:sensory.api.v1.video.CreateEnrollmentResponse) private: class _Internal; template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr enrollmentid_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr modelname_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr modelversion_; ::PROTOBUF_NAMESPACE_ID::int64 percentcomplete_; bool isalive_; float score_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class AuthenticateResponse final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.AuthenticateResponse) */ { public: inline AuthenticateResponse() : AuthenticateResponse(nullptr) {} ~AuthenticateResponse() override; explicit constexpr AuthenticateResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); AuthenticateResponse(const AuthenticateResponse& from); AuthenticateResponse(AuthenticateResponse&& from) noexcept : AuthenticateResponse() { *this = ::std::move(from); } inline AuthenticateResponse& operator=(const AuthenticateResponse& from) { CopyFrom(from); return *this; } inline AuthenticateResponse& operator=(AuthenticateResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const AuthenticateResponse& default_instance() { return *internal_default_instance(); } static inline const AuthenticateResponse* internal_default_instance() { return reinterpret_cast<const AuthenticateResponse*>( &_AuthenticateResponse_default_instance_); } static constexpr int kIndexInFileMessages = 7; friend void swap(AuthenticateResponse& a, AuthenticateResponse& b) { a.Swap(&b); } inline void Swap(AuthenticateResponse* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(AuthenticateResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline AuthenticateResponse* New() const final { return new AuthenticateResponse(); } AuthenticateResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<AuthenticateResponse>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const AuthenticateResponse& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const AuthenticateResponse& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(AuthenticateResponse* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.AuthenticateResponse"; } protected: explicit AuthenticateResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kUserIdFieldNumber = 5, kEnrollmentIdFieldNumber = 6, kTokenFieldNumber = 4, kScoreFieldNumber = 2, kSuccessFieldNumber = 1, kIsAliveFieldNumber = 3, }; // string userId = 5; void clear_userid(); const std::string& userid() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_userid(ArgT0&& arg0, ArgT... args); std::string* mutable_userid(); PROTOBUF_MUST_USE_RESULT std::string* release_userid(); void set_allocated_userid(std::string* userid); private: const std::string& _internal_userid() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_userid(const std::string& value); std::string* _internal_mutable_userid(); public: // string enrollmentId = 6; void clear_enrollmentid(); const std::string& enrollmentid() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_enrollmentid(ArgT0&& arg0, ArgT... args); std::string* mutable_enrollmentid(); PROTOBUF_MUST_USE_RESULT std::string* release_enrollmentid(); void set_allocated_enrollmentid(std::string* enrollmentid); private: const std::string& _internal_enrollmentid() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_enrollmentid(const std::string& value); std::string* _internal_mutable_enrollmentid(); public: // .sensory.api.common.TokenResponse token = 4; bool has_token() const; private: bool _internal_has_token() const; public: void clear_token(); const ::sensory::api::common::TokenResponse& token() const; PROTOBUF_MUST_USE_RESULT ::sensory::api::common::TokenResponse* release_token(); ::sensory::api::common::TokenResponse* mutable_token(); void set_allocated_token(::sensory::api::common::TokenResponse* token); private: const ::sensory::api::common::TokenResponse& _internal_token() const; ::sensory::api::common::TokenResponse* _internal_mutable_token(); public: void unsafe_arena_set_allocated_token( ::sensory::api::common::TokenResponse* token); ::sensory::api::common::TokenResponse* unsafe_arena_release_token(); // float score = 2; void clear_score(); float score() const; void set_score(float value); private: float _internal_score() const; void _internal_set_score(float value); public: // bool success = 1; void clear_success(); bool success() const; void set_success(bool value); private: bool _internal_success() const; void _internal_set_success(bool value); public: // bool isAlive = 3; void clear_isalive(); bool isalive() const; void set_isalive(bool value); private: bool _internal_isalive() const; void _internal_set_isalive(bool value); public: // @@protoc_insertion_point(class_scope:sensory.api.v1.video.AuthenticateResponse) private: class _Internal; template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr userid_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr enrollmentid_; ::sensory::api::common::TokenResponse* token_; float score_; bool success_; bool isalive_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class LivenessRecognitionResponse final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.LivenessRecognitionResponse) */ { public: inline LivenessRecognitionResponse() : LivenessRecognitionResponse(nullptr) {} ~LivenessRecognitionResponse() override; explicit constexpr LivenessRecognitionResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); LivenessRecognitionResponse(const LivenessRecognitionResponse& from); LivenessRecognitionResponse(LivenessRecognitionResponse&& from) noexcept : LivenessRecognitionResponse() { *this = ::std::move(from); } inline LivenessRecognitionResponse& operator=(const LivenessRecognitionResponse& from) { CopyFrom(from); return *this; } inline LivenessRecognitionResponse& operator=(LivenessRecognitionResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const LivenessRecognitionResponse& default_instance() { return *internal_default_instance(); } static inline const LivenessRecognitionResponse* internal_default_instance() { return reinterpret_cast<const LivenessRecognitionResponse*>( &_LivenessRecognitionResponse_default_instance_); } static constexpr int kIndexInFileMessages = 8; friend void swap(LivenessRecognitionResponse& a, LivenessRecognitionResponse& b) { a.Swap(&b); } inline void Swap(LivenessRecognitionResponse* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(LivenessRecognitionResponse* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline LivenessRecognitionResponse* New() const final { return new LivenessRecognitionResponse(); } LivenessRecognitionResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<LivenessRecognitionResponse>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const LivenessRecognitionResponse& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const LivenessRecognitionResponse& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(LivenessRecognitionResponse* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.LivenessRecognitionResponse"; } protected: explicit LivenessRecognitionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kIsAliveFieldNumber = 1, kScoreFieldNumber = 2, }; // bool isAlive = 1; void clear_isalive(); bool isalive() const; void set_isalive(bool value); private: bool _internal_isalive() const; void _internal_set_isalive(bool value); public: // float score = 2; void clear_score(); float score() const; void set_score(float value); private: float _internal_score() const; void _internal_set_score(float value); public: // @@protoc_insertion_point(class_scope:sensory.api.v1.video.LivenessRecognitionResponse) private: class _Internal; template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; bool isalive_; float score_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class CreateEnrollmentConfig final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.CreateEnrollmentConfig) */ { public: inline CreateEnrollmentConfig() : CreateEnrollmentConfig(nullptr) {} ~CreateEnrollmentConfig() override; explicit constexpr CreateEnrollmentConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); CreateEnrollmentConfig(const CreateEnrollmentConfig& from); CreateEnrollmentConfig(CreateEnrollmentConfig&& from) noexcept : CreateEnrollmentConfig() { *this = ::std::move(from); } inline CreateEnrollmentConfig& operator=(const CreateEnrollmentConfig& from) { CopyFrom(from); return *this; } inline CreateEnrollmentConfig& operator=(CreateEnrollmentConfig&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const CreateEnrollmentConfig& default_instance() { return *internal_default_instance(); } static inline const CreateEnrollmentConfig* internal_default_instance() { return reinterpret_cast<const CreateEnrollmentConfig*>( &_CreateEnrollmentConfig_default_instance_); } static constexpr int kIndexInFileMessages = 9; friend void swap(CreateEnrollmentConfig& a, CreateEnrollmentConfig& b) { a.Swap(&b); } inline void Swap(CreateEnrollmentConfig* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(CreateEnrollmentConfig* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline CreateEnrollmentConfig* New() const final { return new CreateEnrollmentConfig(); } CreateEnrollmentConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<CreateEnrollmentConfig>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const CreateEnrollmentConfig& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const CreateEnrollmentConfig& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(CreateEnrollmentConfig* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.CreateEnrollmentConfig"; } protected: explicit CreateEnrollmentConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kUserIdFieldNumber = 1, kDeviceIdFieldNumber = 2, kModelNameFieldNumber = 3, kDescriptionFieldNumber = 4, kReferenceIdFieldNumber = 8, kCompressionFieldNumber = 7, kIsLivenessEnabledFieldNumber = 5, kLivenessThresholdFieldNumber = 6, kNumLivenessFramesRequiredFieldNumber = 9, }; // string userId = 1 [(.validate.rules) = { void clear_userid(); const std::string& userid() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_userid(ArgT0&& arg0, ArgT... args); std::string* mutable_userid(); PROTOBUF_MUST_USE_RESULT std::string* release_userid(); void set_allocated_userid(std::string* userid); private: const std::string& _internal_userid() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_userid(const std::string& value); std::string* _internal_mutable_userid(); public: // string deviceId = 2 [(.validate.rules) = { void clear_deviceid(); const std::string& deviceid() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_deviceid(ArgT0&& arg0, ArgT... args); std::string* mutable_deviceid(); PROTOBUF_MUST_USE_RESULT std::string* release_deviceid(); void set_allocated_deviceid(std::string* deviceid); private: const std::string& _internal_deviceid() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_deviceid(const std::string& value); std::string* _internal_mutable_deviceid(); public: // string modelName = 3 [(.validate.rules) = { void clear_modelname(); const std::string& modelname() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_modelname(ArgT0&& arg0, ArgT... args); std::string* mutable_modelname(); PROTOBUF_MUST_USE_RESULT std::string* release_modelname(); void set_allocated_modelname(std::string* modelname); private: const std::string& _internal_modelname() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_modelname(const std::string& value); std::string* _internal_mutable_modelname(); public: // string description = 4 [(.validate.rules) = { void clear_description(); const std::string& description() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_description(ArgT0&& arg0, ArgT... args); std::string* mutable_description(); PROTOBUF_MUST_USE_RESULT std::string* release_description(); void set_allocated_description(std::string* description); private: const std::string& _internal_description() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_description(const std::string& value); std::string* _internal_mutable_description(); public: // string referenceId = 8 [(.validate.rules) = { void clear_referenceid(); const std::string& referenceid() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_referenceid(ArgT0&& arg0, ArgT... args); std::string* mutable_referenceid(); PROTOBUF_MUST_USE_RESULT std::string* release_referenceid(); void set_allocated_referenceid(std::string* referenceid); private: const std::string& _internal_referenceid() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_referenceid(const std::string& value); std::string* _internal_mutable_referenceid(); public: // .sensory.api.common.CompressionConfiguration compression = 7; bool has_compression() const; private: bool _internal_has_compression() const; public: void clear_compression(); const ::sensory::api::common::CompressionConfiguration& compression() const; PROTOBUF_MUST_USE_RESULT ::sensory::api::common::CompressionConfiguration* release_compression(); ::sensory::api::common::CompressionConfiguration* mutable_compression(); void set_allocated_compression(::sensory::api::common::CompressionConfiguration* compression); private: const ::sensory::api::common::CompressionConfiguration& _internal_compression() const; ::sensory::api::common::CompressionConfiguration* _internal_mutable_compression(); public: void unsafe_arena_set_allocated_compression( ::sensory::api::common::CompressionConfiguration* compression); ::sensory::api::common::CompressionConfiguration* unsafe_arena_release_compression(); // bool isLivenessEnabled = 5; void clear_islivenessenabled(); bool islivenessenabled() const; void set_islivenessenabled(bool value); private: bool _internal_islivenessenabled() const; void _internal_set_islivenessenabled(bool value); public: // .sensory.api.v1.video.RecognitionThreshold livenessThreshold = 6 [(.validate.rules) = { void clear_livenessthreshold(); ::sensory::api::v1::video::RecognitionThreshold livenessthreshold() const; void set_livenessthreshold(::sensory::api::v1::video::RecognitionThreshold value); private: ::sensory::api::v1::video::RecognitionThreshold _internal_livenessthreshold() const; void _internal_set_livenessthreshold(::sensory::api::v1::video::RecognitionThreshold value); public: // int32 numLivenessFramesRequired = 9; void clear_numlivenessframesrequired(); ::PROTOBUF_NAMESPACE_ID::int32 numlivenessframesrequired() const; void set_numlivenessframesrequired(::PROTOBUF_NAMESPACE_ID::int32 value); private: ::PROTOBUF_NAMESPACE_ID::int32 _internal_numlivenessframesrequired() const; void _internal_set_numlivenessframesrequired(::PROTOBUF_NAMESPACE_ID::int32 value); public: // @@protoc_insertion_point(class_scope:sensory.api.v1.video.CreateEnrollmentConfig) private: class _Internal; template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr userid_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deviceid_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr modelname_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr description_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr referenceid_; ::sensory::api::common::CompressionConfiguration* compression_; bool islivenessenabled_; int livenessthreshold_; ::PROTOBUF_NAMESPACE_ID::int32 numlivenessframesrequired_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class AuthenticateConfig final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.AuthenticateConfig) */ { public: inline AuthenticateConfig() : AuthenticateConfig(nullptr) {} ~AuthenticateConfig() override; explicit constexpr AuthenticateConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); AuthenticateConfig(const AuthenticateConfig& from); AuthenticateConfig(AuthenticateConfig&& from) noexcept : AuthenticateConfig() { *this = ::std::move(from); } inline AuthenticateConfig& operator=(const AuthenticateConfig& from) { CopyFrom(from); return *this; } inline AuthenticateConfig& operator=(AuthenticateConfig&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const AuthenticateConfig& default_instance() { return *internal_default_instance(); } enum AuthIdCase { kEnrollmentId = 1, kEnrollmentGroupId = 2, AUTHID_NOT_SET = 0, }; static inline const AuthenticateConfig* internal_default_instance() { return reinterpret_cast<const AuthenticateConfig*>( &_AuthenticateConfig_default_instance_); } static constexpr int kIndexInFileMessages = 10; friend void swap(AuthenticateConfig& a, AuthenticateConfig& b) { a.Swap(&b); } inline void Swap(AuthenticateConfig* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(AuthenticateConfig* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline AuthenticateConfig* New() const final { return new AuthenticateConfig(); } AuthenticateConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<AuthenticateConfig>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const AuthenticateConfig& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const AuthenticateConfig& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(AuthenticateConfig* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.AuthenticateConfig"; } protected: explicit AuthenticateConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kCompressionFieldNumber = 5, kLivenessThresholdFieldNumber = 4, kIsLivenessEnabledFieldNumber = 3, kDoIncludeTokenFieldNumber = 6, kEnrollmentIdFieldNumber = 1, kEnrollmentGroupIdFieldNumber = 2, }; // .sensory.api.common.CompressionConfiguration compression = 5; bool has_compression() const; private: bool _internal_has_compression() const; public: void clear_compression(); const ::sensory::api::common::CompressionConfiguration& compression() const; PROTOBUF_MUST_USE_RESULT ::sensory::api::common::CompressionConfiguration* release_compression(); ::sensory::api::common::CompressionConfiguration* mutable_compression(); void set_allocated_compression(::sensory::api::common::CompressionConfiguration* compression); private: const ::sensory::api::common::CompressionConfiguration& _internal_compression() const; ::sensory::api::common::CompressionConfiguration* _internal_mutable_compression(); public: void unsafe_arena_set_allocated_compression( ::sensory::api::common::CompressionConfiguration* compression); ::sensory::api::common::CompressionConfiguration* unsafe_arena_release_compression(); // .sensory.api.v1.video.RecognitionThreshold livenessThreshold = 4 [(.validate.rules) = { void clear_livenessthreshold(); ::sensory::api::v1::video::RecognitionThreshold livenessthreshold() const; void set_livenessthreshold(::sensory::api::v1::video::RecognitionThreshold value); private: ::sensory::api::v1::video::RecognitionThreshold _internal_livenessthreshold() const; void _internal_set_livenessthreshold(::sensory::api::v1::video::RecognitionThreshold value); public: // bool isLivenessEnabled = 3; void clear_islivenessenabled(); bool islivenessenabled() const; void set_islivenessenabled(bool value); private: bool _internal_islivenessenabled() const; void _internal_set_islivenessenabled(bool value); public: // bool doIncludeToken = 6; void clear_doincludetoken(); bool doincludetoken() const; void set_doincludetoken(bool value); private: bool _internal_doincludetoken() const; void _internal_set_doincludetoken(bool value); public: // string enrollmentId = 1 [(.validate.rules) = { bool has_enrollmentid() const; private: bool _internal_has_enrollmentid() const; public: void clear_enrollmentid(); const std::string& enrollmentid() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_enrollmentid(ArgT0&& arg0, ArgT... args); std::string* mutable_enrollmentid(); PROTOBUF_MUST_USE_RESULT std::string* release_enrollmentid(); void set_allocated_enrollmentid(std::string* enrollmentid); private: const std::string& _internal_enrollmentid() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_enrollmentid(const std::string& value); std::string* _internal_mutable_enrollmentid(); public: // string enrollmentGroupId = 2; bool has_enrollmentgroupid() const; private: bool _internal_has_enrollmentgroupid() const; public: void clear_enrollmentgroupid(); const std::string& enrollmentgroupid() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_enrollmentgroupid(ArgT0&& arg0, ArgT... args); std::string* mutable_enrollmentgroupid(); PROTOBUF_MUST_USE_RESULT std::string* release_enrollmentgroupid(); void set_allocated_enrollmentgroupid(std::string* enrollmentgroupid); private: const std::string& _internal_enrollmentgroupid() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_enrollmentgroupid(const std::string& value); std::string* _internal_mutable_enrollmentgroupid(); public: void clear_authId(); AuthIdCase authId_case() const; // @@protoc_insertion_point(class_scope:sensory.api.v1.video.AuthenticateConfig) private: class _Internal; void set_has_enrollmentid(); void set_has_enrollmentgroupid(); inline bool has_authId() const; inline void clear_has_authId(); template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::sensory::api::common::CompressionConfiguration* compression_; int livenessthreshold_; bool islivenessenabled_; bool doincludetoken_; union AuthIdUnion { constexpr AuthIdUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr enrollmentid_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr enrollmentgroupid_; } authId_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // ------------------------------------------------------------------- class ValidateRecognitionConfig final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sensory.api.v1.video.ValidateRecognitionConfig) */ { public: inline ValidateRecognitionConfig() : ValidateRecognitionConfig(nullptr) {} ~ValidateRecognitionConfig() override; explicit constexpr ValidateRecognitionConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); ValidateRecognitionConfig(const ValidateRecognitionConfig& from); ValidateRecognitionConfig(ValidateRecognitionConfig&& from) noexcept : ValidateRecognitionConfig() { *this = ::std::move(from); } inline ValidateRecognitionConfig& operator=(const ValidateRecognitionConfig& from) { CopyFrom(from); return *this; } inline ValidateRecognitionConfig& operator=(ValidateRecognitionConfig&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE && GetOwningArena() != nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { InternalSwap(&from); } else { CopyFrom(from); } return *this; } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { return GetDescriptor(); } static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { return default_instance().GetMetadata().descriptor; } static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } static const ValidateRecognitionConfig& default_instance() { return *internal_default_instance(); } static inline const ValidateRecognitionConfig* internal_default_instance() { return reinterpret_cast<const ValidateRecognitionConfig*>( &_ValidateRecognitionConfig_default_instance_); } static constexpr int kIndexInFileMessages = 11; friend void swap(ValidateRecognitionConfig& a, ValidateRecognitionConfig& b) { a.Swap(&b); } inline void Swap(ValidateRecognitionConfig* other) { if (other == this) return; if (GetOwningArena() == other->GetOwningArena()) { InternalSwap(other); } else { ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); } } void UnsafeArenaSwap(ValidateRecognitionConfig* other) { if (other == this) return; GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); } // implements Message ---------------------------------------------- inline ValidateRecognitionConfig* New() const final { return new ValidateRecognitionConfig(); } ValidateRecognitionConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage<ValidateRecognitionConfig>(arena); } using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; void CopyFrom(const ValidateRecognitionConfig& from); using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const ValidateRecognitionConfig& from); private: static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ValidateRecognitionConfig* other); friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "sensory.api.v1.video.ValidateRecognitionConfig"; } protected: explicit ValidateRecognitionConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); private: static void ArenaDtor(void* object); inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: static const ClassData _class_data_; const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { kModelNameFieldNumber = 1, kUserIdFieldNumber = 2, kThresholdFieldNumber = 3, }; // string modelName = 1 [(.validate.rules) = { void clear_modelname(); const std::string& modelname() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_modelname(ArgT0&& arg0, ArgT... args); std::string* mutable_modelname(); PROTOBUF_MUST_USE_RESULT std::string* release_modelname(); void set_allocated_modelname(std::string* modelname); private: const std::string& _internal_modelname() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_modelname(const std::string& value); std::string* _internal_mutable_modelname(); public: // string userId = 2 [(.validate.rules) = { void clear_userid(); const std::string& userid() const; template <typename ArgT0 = const std::string&, typename... ArgT> void set_userid(ArgT0&& arg0, ArgT... args); std::string* mutable_userid(); PROTOBUF_MUST_USE_RESULT std::string* release_userid(); void set_allocated_userid(std::string* userid); private: const std::string& _internal_userid() const; inline PROTOBUF_ALWAYS_INLINE void _internal_set_userid(const std::string& value); std::string* _internal_mutable_userid(); public: // .sensory.api.v1.video.RecognitionThreshold threshold = 3 [(.validate.rules) = { void clear_threshold(); ::sensory::api::v1::video::RecognitionThreshold threshold() const; void set_threshold(::sensory::api::v1::video::RecognitionThreshold value); private: ::sensory::api::v1::video::RecognitionThreshold _internal_threshold() const; void _internal_set_threshold(::sensory::api::v1::video::RecognitionThreshold value); public: // @@protoc_insertion_point(class_scope:sensory.api.v1.video.ValidateRecognitionConfig) private: class _Internal; template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr modelname_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr userid_; int threshold_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_v1_2fvideo_2fvideo_2eproto; }; // =================================================================== // =================================================================== #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ // VideoModel // string name = 1; inline void VideoModel::clear_name() { name_.ClearToEmpty(); } inline const std::string& VideoModel::name() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.VideoModel.name) return _internal_name(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void VideoModel::set_name(ArgT0&& arg0, ArgT... args) { name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.VideoModel.name) } inline std::string* VideoModel::mutable_name() { std::string* _s = _internal_mutable_name(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.VideoModel.name) return _s; } inline const std::string& VideoModel::_internal_name() const { return name_.Get(); } inline void VideoModel::_internal_set_name(const std::string& value) { name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* VideoModel::_internal_mutable_name() { return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* VideoModel::release_name() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.VideoModel.name) return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void VideoModel::set_allocated_name(std::string* name) { if (name != nullptr) { } else { } name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.VideoModel.name) } // bool isEnrollable = 2; inline void VideoModel::clear_isenrollable() { isenrollable_ = false; } inline bool VideoModel::_internal_isenrollable() const { return isenrollable_; } inline bool VideoModel::isenrollable() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.VideoModel.isEnrollable) return _internal_isenrollable(); } inline void VideoModel::_internal_set_isenrollable(bool value) { isenrollable_ = value; } inline void VideoModel::set_isenrollable(bool value) { _internal_set_isenrollable(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.VideoModel.isEnrollable) } // .sensory.api.common.ModelType modelType = 3; inline void VideoModel::clear_modeltype() { modeltype_ = 0; } inline ::sensory::api::common::ModelType VideoModel::_internal_modeltype() const { return static_cast< ::sensory::api::common::ModelType >(modeltype_); } inline ::sensory::api::common::ModelType VideoModel::modeltype() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.VideoModel.modelType) return _internal_modeltype(); } inline void VideoModel::_internal_set_modeltype(::sensory::api::common::ModelType value) { modeltype_ = value; } inline void VideoModel::set_modeltype(::sensory::api::common::ModelType value) { _internal_set_modeltype(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.VideoModel.modelType) } // string fixedObject = 4; inline void VideoModel::clear_fixedobject() { fixedobject_.ClearToEmpty(); } inline const std::string& VideoModel::fixedobject() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.VideoModel.fixedObject) return _internal_fixedobject(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void VideoModel::set_fixedobject(ArgT0&& arg0, ArgT... args) { fixedobject_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.VideoModel.fixedObject) } inline std::string* VideoModel::mutable_fixedobject() { std::string* _s = _internal_mutable_fixedobject(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.VideoModel.fixedObject) return _s; } inline const std::string& VideoModel::_internal_fixedobject() const { return fixedobject_.Get(); } inline void VideoModel::_internal_set_fixedobject(const std::string& value) { fixedobject_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* VideoModel::_internal_mutable_fixedobject() { return fixedobject_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* VideoModel::release_fixedobject() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.VideoModel.fixedObject) return fixedobject_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void VideoModel::set_allocated_fixedobject(std::string* fixedobject) { if (fixedobject != nullptr) { } else { } fixedobject_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), fixedobject, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.VideoModel.fixedObject) } // repeated string versions = 5; inline int VideoModel::_internal_versions_size() const { return versions_.size(); } inline int VideoModel::versions_size() const { return _internal_versions_size(); } inline void VideoModel::clear_versions() { versions_.Clear(); } inline std::string* VideoModel::add_versions() { std::string* _s = _internal_add_versions(); // @@protoc_insertion_point(field_add_mutable:sensory.api.v1.video.VideoModel.versions) return _s; } inline const std::string& VideoModel::_internal_versions(int index) const { return versions_.Get(index); } inline const std::string& VideoModel::versions(int index) const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.VideoModel.versions) return _internal_versions(index); } inline std::string* VideoModel::mutable_versions(int index) { // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.VideoModel.versions) return versions_.Mutable(index); } inline void VideoModel::set_versions(int index, const std::string& value) { versions_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.VideoModel.versions) } inline void VideoModel::set_versions(int index, std::string&& value) { versions_.Mutable(index)->assign(std::move(value)); // @@protoc_insertion_point(field_set:sensory.api.v1.video.VideoModel.versions) } inline void VideoModel::set_versions(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); versions_.Mutable(index)->assign(value); // @@protoc_insertion_point(field_set_char:sensory.api.v1.video.VideoModel.versions) } inline void VideoModel::set_versions(int index, const char* value, size_t size) { versions_.Mutable(index)->assign( reinterpret_cast<const char*>(value), size); // @@protoc_insertion_point(field_set_pointer:sensory.api.v1.video.VideoModel.versions) } inline std::string* VideoModel::_internal_add_versions() { return versions_.Add(); } inline void VideoModel::add_versions(const std::string& value) { versions_.Add()->assign(value); // @@protoc_insertion_point(field_add:sensory.api.v1.video.VideoModel.versions) } inline void VideoModel::add_versions(std::string&& value) { versions_.Add(std::move(value)); // @@protoc_insertion_point(field_add:sensory.api.v1.video.VideoModel.versions) } inline void VideoModel::add_versions(const char* value) { GOOGLE_DCHECK(value != nullptr); versions_.Add()->assign(value); // @@protoc_insertion_point(field_add_char:sensory.api.v1.video.VideoModel.versions) } inline void VideoModel::add_versions(const char* value, size_t size) { versions_.Add()->assign(reinterpret_cast<const char*>(value), size); // @@protoc_insertion_point(field_add_pointer:sensory.api.v1.video.VideoModel.versions) } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& VideoModel::versions() const { // @@protoc_insertion_point(field_list:sensory.api.v1.video.VideoModel.versions) return versions_; } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* VideoModel::mutable_versions() { // @@protoc_insertion_point(field_mutable_list:sensory.api.v1.video.VideoModel.versions) return &versions_; } // .sensory.api.common.TechnologyType technology = 6; inline void VideoModel::clear_technology() { technology_ = 0; } inline ::sensory::api::common::TechnologyType VideoModel::_internal_technology() const { return static_cast< ::sensory::api::common::TechnologyType >(technology_); } inline ::sensory::api::common::TechnologyType VideoModel::technology() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.VideoModel.technology) return _internal_technology(); } inline void VideoModel::_internal_set_technology(::sensory::api::common::TechnologyType value) { technology_ = value; } inline void VideoModel::set_technology(::sensory::api::common::TechnologyType value) { _internal_set_technology(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.VideoModel.technology) } // bool isLivenessSupported = 7; inline void VideoModel::clear_islivenesssupported() { islivenesssupported_ = false; } inline bool VideoModel::_internal_islivenesssupported() const { return islivenesssupported_; } inline bool VideoModel::islivenesssupported() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.VideoModel.isLivenessSupported) return _internal_islivenesssupported(); } inline void VideoModel::_internal_set_islivenesssupported(bool value) { islivenesssupported_ = value; } inline void VideoModel::set_islivenesssupported(bool value) { _internal_set_islivenesssupported(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.VideoModel.isLivenessSupported) } // ------------------------------------------------------------------- // GetModelsRequest // ------------------------------------------------------------------- // GetModelsResponse // repeated .sensory.api.v1.video.VideoModel models = 1; inline int GetModelsResponse::_internal_models_size() const { return models_.size(); } inline int GetModelsResponse::models_size() const { return _internal_models_size(); } inline void GetModelsResponse::clear_models() { models_.Clear(); } inline ::sensory::api::v1::video::VideoModel* GetModelsResponse::mutable_models(int index) { // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.GetModelsResponse.models) return models_.Mutable(index); } inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sensory::api::v1::video::VideoModel >* GetModelsResponse::mutable_models() { // @@protoc_insertion_point(field_mutable_list:sensory.api.v1.video.GetModelsResponse.models) return &models_; } inline const ::sensory::api::v1::video::VideoModel& GetModelsResponse::_internal_models(int index) const { return models_.Get(index); } inline const ::sensory::api::v1::video::VideoModel& GetModelsResponse::models(int index) const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.GetModelsResponse.models) return _internal_models(index); } inline ::sensory::api::v1::video::VideoModel* GetModelsResponse::_internal_add_models() { return models_.Add(); } inline ::sensory::api::v1::video::VideoModel* GetModelsResponse::add_models() { ::sensory::api::v1::video::VideoModel* _add = _internal_add_models(); // @@protoc_insertion_point(field_add:sensory.api.v1.video.GetModelsResponse.models) return _add; } inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sensory::api::v1::video::VideoModel >& GetModelsResponse::models() const { // @@protoc_insertion_point(field_list:sensory.api.v1.video.GetModelsResponse.models) return models_; } // ------------------------------------------------------------------- // CreateEnrollmentRequest // .sensory.api.v1.video.CreateEnrollmentConfig config = 1; inline bool CreateEnrollmentRequest::_internal_has_config() const { return streamingRequest_case() == kConfig; } inline bool CreateEnrollmentRequest::has_config() const { return _internal_has_config(); } inline void CreateEnrollmentRequest::set_has_config() { _oneof_case_[0] = kConfig; } inline void CreateEnrollmentRequest::clear_config() { if (_internal_has_config()) { if (GetArenaForAllocation() == nullptr) { delete streamingRequest_.config_; } clear_has_streamingRequest(); } } inline ::sensory::api::v1::video::CreateEnrollmentConfig* CreateEnrollmentRequest::release_config() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentRequest.config) if (_internal_has_config()) { clear_has_streamingRequest(); ::sensory::api::v1::video::CreateEnrollmentConfig* temp = streamingRequest_.config_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } streamingRequest_.config_ = nullptr; return temp; } else { return nullptr; } } inline const ::sensory::api::v1::video::CreateEnrollmentConfig& CreateEnrollmentRequest::_internal_config() const { return _internal_has_config() ? *streamingRequest_.config_ : reinterpret_cast< ::sensory::api::v1::video::CreateEnrollmentConfig&>(::sensory::api::v1::video::_CreateEnrollmentConfig_default_instance_); } inline const ::sensory::api::v1::video::CreateEnrollmentConfig& CreateEnrollmentRequest::config() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentRequest.config) return _internal_config(); } inline ::sensory::api::v1::video::CreateEnrollmentConfig* CreateEnrollmentRequest::unsafe_arena_release_config() { // @@protoc_insertion_point(field_unsafe_arena_release:sensory.api.v1.video.CreateEnrollmentRequest.config) if (_internal_has_config()) { clear_has_streamingRequest(); ::sensory::api::v1::video::CreateEnrollmentConfig* temp = streamingRequest_.config_; streamingRequest_.config_ = nullptr; return temp; } else { return nullptr; } } inline void CreateEnrollmentRequest::unsafe_arena_set_allocated_config(::sensory::api::v1::video::CreateEnrollmentConfig* config) { clear_streamingRequest(); if (config) { set_has_config(); streamingRequest_.config_ = config; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:sensory.api.v1.video.CreateEnrollmentRequest.config) } inline ::sensory::api::v1::video::CreateEnrollmentConfig* CreateEnrollmentRequest::_internal_mutable_config() { if (!_internal_has_config()) { clear_streamingRequest(); set_has_config(); streamingRequest_.config_ = CreateMaybeMessage< ::sensory::api::v1::video::CreateEnrollmentConfig >(GetArenaForAllocation()); } return streamingRequest_.config_; } inline ::sensory::api::v1::video::CreateEnrollmentConfig* CreateEnrollmentRequest::mutable_config() { ::sensory::api::v1::video::CreateEnrollmentConfig* _msg = _internal_mutable_config(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentRequest.config) return _msg; } // bytes imageContent = 2; inline bool CreateEnrollmentRequest::_internal_has_imagecontent() const { return streamingRequest_case() == kImageContent; } inline bool CreateEnrollmentRequest::has_imagecontent() const { return _internal_has_imagecontent(); } inline void CreateEnrollmentRequest::set_has_imagecontent() { _oneof_case_[0] = kImageContent; } inline void CreateEnrollmentRequest::clear_imagecontent() { if (_internal_has_imagecontent()) { streamingRequest_.imagecontent_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); clear_has_streamingRequest(); } } inline const std::string& CreateEnrollmentRequest::imagecontent() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentRequest.imageContent) return _internal_imagecontent(); } template <typename ArgT0, typename... ArgT> inline void CreateEnrollmentRequest::set_imagecontent(ArgT0&& arg0, ArgT... args) { if (!_internal_has_imagecontent()) { clear_streamingRequest(); set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } streamingRequest_.imagecontent_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentRequest.imageContent) } inline std::string* CreateEnrollmentRequest::mutable_imagecontent() { std::string* _s = _internal_mutable_imagecontent(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentRequest.imageContent) return _s; } inline const std::string& CreateEnrollmentRequest::_internal_imagecontent() const { if (_internal_has_imagecontent()) { return streamingRequest_.imagecontent_.Get(); } return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void CreateEnrollmentRequest::_internal_set_imagecontent(const std::string& value) { if (!_internal_has_imagecontent()) { clear_streamingRequest(); set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } streamingRequest_.imagecontent_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* CreateEnrollmentRequest::_internal_mutable_imagecontent() { if (!_internal_has_imagecontent()) { clear_streamingRequest(); set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } return streamingRequest_.imagecontent_.Mutable( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* CreateEnrollmentRequest::release_imagecontent() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentRequest.imageContent) if (_internal_has_imagecontent()) { clear_has_streamingRequest(); return streamingRequest_.imagecontent_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } else { return nullptr; } } inline void CreateEnrollmentRequest::set_allocated_imagecontent(std::string* imagecontent) { if (has_streamingRequest()) { clear_streamingRequest(); } if (imagecontent != nullptr) { set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(imagecontent); ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaForAllocation(); if (arena != nullptr) { arena->Own(imagecontent); } } // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.CreateEnrollmentRequest.imageContent) } inline bool CreateEnrollmentRequest::has_streamingRequest() const { return streamingRequest_case() != STREAMINGREQUEST_NOT_SET; } inline void CreateEnrollmentRequest::clear_has_streamingRequest() { _oneof_case_[0] = STREAMINGREQUEST_NOT_SET; } inline CreateEnrollmentRequest::StreamingRequestCase CreateEnrollmentRequest::streamingRequest_case() const { return CreateEnrollmentRequest::StreamingRequestCase(_oneof_case_[0]); } // ------------------------------------------------------------------- // AuthenticateRequest // .sensory.api.v1.video.AuthenticateConfig config = 1; inline bool AuthenticateRequest::_internal_has_config() const { return streamingRequest_case() == kConfig; } inline bool AuthenticateRequest::has_config() const { return _internal_has_config(); } inline void AuthenticateRequest::set_has_config() { _oneof_case_[0] = kConfig; } inline void AuthenticateRequest::clear_config() { if (_internal_has_config()) { if (GetArenaForAllocation() == nullptr) { delete streamingRequest_.config_; } clear_has_streamingRequest(); } } inline ::sensory::api::v1::video::AuthenticateConfig* AuthenticateRequest::release_config() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.AuthenticateRequest.config) if (_internal_has_config()) { clear_has_streamingRequest(); ::sensory::api::v1::video::AuthenticateConfig* temp = streamingRequest_.config_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } streamingRequest_.config_ = nullptr; return temp; } else { return nullptr; } } inline const ::sensory::api::v1::video::AuthenticateConfig& AuthenticateRequest::_internal_config() const { return _internal_has_config() ? *streamingRequest_.config_ : reinterpret_cast< ::sensory::api::v1::video::AuthenticateConfig&>(::sensory::api::v1::video::_AuthenticateConfig_default_instance_); } inline const ::sensory::api::v1::video::AuthenticateConfig& AuthenticateRequest::config() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateRequest.config) return _internal_config(); } inline ::sensory::api::v1::video::AuthenticateConfig* AuthenticateRequest::unsafe_arena_release_config() { // @@protoc_insertion_point(field_unsafe_arena_release:sensory.api.v1.video.AuthenticateRequest.config) if (_internal_has_config()) { clear_has_streamingRequest(); ::sensory::api::v1::video::AuthenticateConfig* temp = streamingRequest_.config_; streamingRequest_.config_ = nullptr; return temp; } else { return nullptr; } } inline void AuthenticateRequest::unsafe_arena_set_allocated_config(::sensory::api::v1::video::AuthenticateConfig* config) { clear_streamingRequest(); if (config) { set_has_config(); streamingRequest_.config_ = config; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:sensory.api.v1.video.AuthenticateRequest.config) } inline ::sensory::api::v1::video::AuthenticateConfig* AuthenticateRequest::_internal_mutable_config() { if (!_internal_has_config()) { clear_streamingRequest(); set_has_config(); streamingRequest_.config_ = CreateMaybeMessage< ::sensory::api::v1::video::AuthenticateConfig >(GetArenaForAllocation()); } return streamingRequest_.config_; } inline ::sensory::api::v1::video::AuthenticateConfig* AuthenticateRequest::mutable_config() { ::sensory::api::v1::video::AuthenticateConfig* _msg = _internal_mutable_config(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.AuthenticateRequest.config) return _msg; } // bytes imageContent = 2; inline bool AuthenticateRequest::_internal_has_imagecontent() const { return streamingRequest_case() == kImageContent; } inline bool AuthenticateRequest::has_imagecontent() const { return _internal_has_imagecontent(); } inline void AuthenticateRequest::set_has_imagecontent() { _oneof_case_[0] = kImageContent; } inline void AuthenticateRequest::clear_imagecontent() { if (_internal_has_imagecontent()) { streamingRequest_.imagecontent_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); clear_has_streamingRequest(); } } inline const std::string& AuthenticateRequest::imagecontent() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateRequest.imageContent) return _internal_imagecontent(); } template <typename ArgT0, typename... ArgT> inline void AuthenticateRequest::set_imagecontent(ArgT0&& arg0, ArgT... args) { if (!_internal_has_imagecontent()) { clear_streamingRequest(); set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } streamingRequest_.imagecontent_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateRequest.imageContent) } inline std::string* AuthenticateRequest::mutable_imagecontent() { std::string* _s = _internal_mutable_imagecontent(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.AuthenticateRequest.imageContent) return _s; } inline const std::string& AuthenticateRequest::_internal_imagecontent() const { if (_internal_has_imagecontent()) { return streamingRequest_.imagecontent_.Get(); } return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void AuthenticateRequest::_internal_set_imagecontent(const std::string& value) { if (!_internal_has_imagecontent()) { clear_streamingRequest(); set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } streamingRequest_.imagecontent_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* AuthenticateRequest::_internal_mutable_imagecontent() { if (!_internal_has_imagecontent()) { clear_streamingRequest(); set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } return streamingRequest_.imagecontent_.Mutable( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* AuthenticateRequest::release_imagecontent() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.AuthenticateRequest.imageContent) if (_internal_has_imagecontent()) { clear_has_streamingRequest(); return streamingRequest_.imagecontent_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } else { return nullptr; } } inline void AuthenticateRequest::set_allocated_imagecontent(std::string* imagecontent) { if (has_streamingRequest()) { clear_streamingRequest(); } if (imagecontent != nullptr) { set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(imagecontent); ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaForAllocation(); if (arena != nullptr) { arena->Own(imagecontent); } } // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.AuthenticateRequest.imageContent) } inline bool AuthenticateRequest::has_streamingRequest() const { return streamingRequest_case() != STREAMINGREQUEST_NOT_SET; } inline void AuthenticateRequest::clear_has_streamingRequest() { _oneof_case_[0] = STREAMINGREQUEST_NOT_SET; } inline AuthenticateRequest::StreamingRequestCase AuthenticateRequest::streamingRequest_case() const { return AuthenticateRequest::StreamingRequestCase(_oneof_case_[0]); } // ------------------------------------------------------------------- // ValidateRecognitionRequest // .sensory.api.v1.video.ValidateRecognitionConfig config = 1; inline bool ValidateRecognitionRequest::_internal_has_config() const { return streamingRequest_case() == kConfig; } inline bool ValidateRecognitionRequest::has_config() const { return _internal_has_config(); } inline void ValidateRecognitionRequest::set_has_config() { _oneof_case_[0] = kConfig; } inline void ValidateRecognitionRequest::clear_config() { if (_internal_has_config()) { if (GetArenaForAllocation() == nullptr) { delete streamingRequest_.config_; } clear_has_streamingRequest(); } } inline ::sensory::api::v1::video::ValidateRecognitionConfig* ValidateRecognitionRequest::release_config() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.ValidateRecognitionRequest.config) if (_internal_has_config()) { clear_has_streamingRequest(); ::sensory::api::v1::video::ValidateRecognitionConfig* temp = streamingRequest_.config_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } streamingRequest_.config_ = nullptr; return temp; } else { return nullptr; } } inline const ::sensory::api::v1::video::ValidateRecognitionConfig& ValidateRecognitionRequest::_internal_config() const { return _internal_has_config() ? *streamingRequest_.config_ : reinterpret_cast< ::sensory::api::v1::video::ValidateRecognitionConfig&>(::sensory::api::v1::video::_ValidateRecognitionConfig_default_instance_); } inline const ::sensory::api::v1::video::ValidateRecognitionConfig& ValidateRecognitionRequest::config() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.ValidateRecognitionRequest.config) return _internal_config(); } inline ::sensory::api::v1::video::ValidateRecognitionConfig* ValidateRecognitionRequest::unsafe_arena_release_config() { // @@protoc_insertion_point(field_unsafe_arena_release:sensory.api.v1.video.ValidateRecognitionRequest.config) if (_internal_has_config()) { clear_has_streamingRequest(); ::sensory::api::v1::video::ValidateRecognitionConfig* temp = streamingRequest_.config_; streamingRequest_.config_ = nullptr; return temp; } else { return nullptr; } } inline void ValidateRecognitionRequest::unsafe_arena_set_allocated_config(::sensory::api::v1::video::ValidateRecognitionConfig* config) { clear_streamingRequest(); if (config) { set_has_config(); streamingRequest_.config_ = config; } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:sensory.api.v1.video.ValidateRecognitionRequest.config) } inline ::sensory::api::v1::video::ValidateRecognitionConfig* ValidateRecognitionRequest::_internal_mutable_config() { if (!_internal_has_config()) { clear_streamingRequest(); set_has_config(); streamingRequest_.config_ = CreateMaybeMessage< ::sensory::api::v1::video::ValidateRecognitionConfig >(GetArenaForAllocation()); } return streamingRequest_.config_; } inline ::sensory::api::v1::video::ValidateRecognitionConfig* ValidateRecognitionRequest::mutable_config() { ::sensory::api::v1::video::ValidateRecognitionConfig* _msg = _internal_mutable_config(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.ValidateRecognitionRequest.config) return _msg; } // bytes imageContent = 2; inline bool ValidateRecognitionRequest::_internal_has_imagecontent() const { return streamingRequest_case() == kImageContent; } inline bool ValidateRecognitionRequest::has_imagecontent() const { return _internal_has_imagecontent(); } inline void ValidateRecognitionRequest::set_has_imagecontent() { _oneof_case_[0] = kImageContent; } inline void ValidateRecognitionRequest::clear_imagecontent() { if (_internal_has_imagecontent()) { streamingRequest_.imagecontent_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); clear_has_streamingRequest(); } } inline const std::string& ValidateRecognitionRequest::imagecontent() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.ValidateRecognitionRequest.imageContent) return _internal_imagecontent(); } template <typename ArgT0, typename... ArgT> inline void ValidateRecognitionRequest::set_imagecontent(ArgT0&& arg0, ArgT... args) { if (!_internal_has_imagecontent()) { clear_streamingRequest(); set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } streamingRequest_.imagecontent_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.ValidateRecognitionRequest.imageContent) } inline std::string* ValidateRecognitionRequest::mutable_imagecontent() { std::string* _s = _internal_mutable_imagecontent(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.ValidateRecognitionRequest.imageContent) return _s; } inline const std::string& ValidateRecognitionRequest::_internal_imagecontent() const { if (_internal_has_imagecontent()) { return streamingRequest_.imagecontent_.Get(); } return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void ValidateRecognitionRequest::_internal_set_imagecontent(const std::string& value) { if (!_internal_has_imagecontent()) { clear_streamingRequest(); set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } streamingRequest_.imagecontent_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* ValidateRecognitionRequest::_internal_mutable_imagecontent() { if (!_internal_has_imagecontent()) { clear_streamingRequest(); set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } return streamingRequest_.imagecontent_.Mutable( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* ValidateRecognitionRequest::release_imagecontent() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.ValidateRecognitionRequest.imageContent) if (_internal_has_imagecontent()) { clear_has_streamingRequest(); return streamingRequest_.imagecontent_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } else { return nullptr; } } inline void ValidateRecognitionRequest::set_allocated_imagecontent(std::string* imagecontent) { if (has_streamingRequest()) { clear_streamingRequest(); } if (imagecontent != nullptr) { set_has_imagecontent(); streamingRequest_.imagecontent_.UnsafeSetDefault(imagecontent); ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaForAllocation(); if (arena != nullptr) { arena->Own(imagecontent); } } // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.ValidateRecognitionRequest.imageContent) } inline bool ValidateRecognitionRequest::has_streamingRequest() const { return streamingRequest_case() != STREAMINGREQUEST_NOT_SET; } inline void ValidateRecognitionRequest::clear_has_streamingRequest() { _oneof_case_[0] = STREAMINGREQUEST_NOT_SET; } inline ValidateRecognitionRequest::StreamingRequestCase ValidateRecognitionRequest::streamingRequest_case() const { return ValidateRecognitionRequest::StreamingRequestCase(_oneof_case_[0]); } // ------------------------------------------------------------------- // CreateEnrollmentResponse // int64 percentComplete = 1; inline void CreateEnrollmentResponse::clear_percentcomplete() { percentcomplete_ = int64_t{0}; } inline ::PROTOBUF_NAMESPACE_ID::int64 CreateEnrollmentResponse::_internal_percentcomplete() const { return percentcomplete_; } inline ::PROTOBUF_NAMESPACE_ID::int64 CreateEnrollmentResponse::percentcomplete() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentResponse.percentComplete) return _internal_percentcomplete(); } inline void CreateEnrollmentResponse::_internal_set_percentcomplete(::PROTOBUF_NAMESPACE_ID::int64 value) { percentcomplete_ = value; } inline void CreateEnrollmentResponse::set_percentcomplete(::PROTOBUF_NAMESPACE_ID::int64 value) { _internal_set_percentcomplete(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentResponse.percentComplete) } // bool isAlive = 2; inline void CreateEnrollmentResponse::clear_isalive() { isalive_ = false; } inline bool CreateEnrollmentResponse::_internal_isalive() const { return isalive_; } inline bool CreateEnrollmentResponse::isalive() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentResponse.isAlive) return _internal_isalive(); } inline void CreateEnrollmentResponse::_internal_set_isalive(bool value) { isalive_ = value; } inline void CreateEnrollmentResponse::set_isalive(bool value) { _internal_set_isalive(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentResponse.isAlive) } // string enrollmentId = 3; inline void CreateEnrollmentResponse::clear_enrollmentid() { enrollmentid_.ClearToEmpty(); } inline const std::string& CreateEnrollmentResponse::enrollmentid() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentResponse.enrollmentId) return _internal_enrollmentid(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void CreateEnrollmentResponse::set_enrollmentid(ArgT0&& arg0, ArgT... args) { enrollmentid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentResponse.enrollmentId) } inline std::string* CreateEnrollmentResponse::mutable_enrollmentid() { std::string* _s = _internal_mutable_enrollmentid(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentResponse.enrollmentId) return _s; } inline const std::string& CreateEnrollmentResponse::_internal_enrollmentid() const { return enrollmentid_.Get(); } inline void CreateEnrollmentResponse::_internal_set_enrollmentid(const std::string& value) { enrollmentid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* CreateEnrollmentResponse::_internal_mutable_enrollmentid() { return enrollmentid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* CreateEnrollmentResponse::release_enrollmentid() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentResponse.enrollmentId) return enrollmentid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void CreateEnrollmentResponse::set_allocated_enrollmentid(std::string* enrollmentid) { if (enrollmentid != nullptr) { } else { } enrollmentid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), enrollmentid, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.CreateEnrollmentResponse.enrollmentId) } // string modelName = 4; inline void CreateEnrollmentResponse::clear_modelname() { modelname_.ClearToEmpty(); } inline const std::string& CreateEnrollmentResponse::modelname() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentResponse.modelName) return _internal_modelname(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void CreateEnrollmentResponse::set_modelname(ArgT0&& arg0, ArgT... args) { modelname_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentResponse.modelName) } inline std::string* CreateEnrollmentResponse::mutable_modelname() { std::string* _s = _internal_mutable_modelname(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentResponse.modelName) return _s; } inline const std::string& CreateEnrollmentResponse::_internal_modelname() const { return modelname_.Get(); } inline void CreateEnrollmentResponse::_internal_set_modelname(const std::string& value) { modelname_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* CreateEnrollmentResponse::_internal_mutable_modelname() { return modelname_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* CreateEnrollmentResponse::release_modelname() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentResponse.modelName) return modelname_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void CreateEnrollmentResponse::set_allocated_modelname(std::string* modelname) { if (modelname != nullptr) { } else { } modelname_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), modelname, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.CreateEnrollmentResponse.modelName) } // string modelVersion = 5; inline void CreateEnrollmentResponse::clear_modelversion() { modelversion_.ClearToEmpty(); } inline const std::string& CreateEnrollmentResponse::modelversion() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentResponse.modelVersion) return _internal_modelversion(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void CreateEnrollmentResponse::set_modelversion(ArgT0&& arg0, ArgT... args) { modelversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentResponse.modelVersion) } inline std::string* CreateEnrollmentResponse::mutable_modelversion() { std::string* _s = _internal_mutable_modelversion(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentResponse.modelVersion) return _s; } inline const std::string& CreateEnrollmentResponse::_internal_modelversion() const { return modelversion_.Get(); } inline void CreateEnrollmentResponse::_internal_set_modelversion(const std::string& value) { modelversion_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* CreateEnrollmentResponse::_internal_mutable_modelversion() { return modelversion_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* CreateEnrollmentResponse::release_modelversion() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentResponse.modelVersion) return modelversion_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void CreateEnrollmentResponse::set_allocated_modelversion(std::string* modelversion) { if (modelversion != nullptr) { } else { } modelversion_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), modelversion, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.CreateEnrollmentResponse.modelVersion) } // float score = 6; inline void CreateEnrollmentResponse::clear_score() { score_ = 0; } inline float CreateEnrollmentResponse::_internal_score() const { return score_; } inline float CreateEnrollmentResponse::score() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentResponse.score) return _internal_score(); } inline void CreateEnrollmentResponse::_internal_set_score(float value) { score_ = value; } inline void CreateEnrollmentResponse::set_score(float value) { _internal_set_score(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentResponse.score) } // ------------------------------------------------------------------- // AuthenticateResponse // bool success = 1; inline void AuthenticateResponse::clear_success() { success_ = false; } inline bool AuthenticateResponse::_internal_success() const { return success_; } inline bool AuthenticateResponse::success() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateResponse.success) return _internal_success(); } inline void AuthenticateResponse::_internal_set_success(bool value) { success_ = value; } inline void AuthenticateResponse::set_success(bool value) { _internal_set_success(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateResponse.success) } // float score = 2; inline void AuthenticateResponse::clear_score() { score_ = 0; } inline float AuthenticateResponse::_internal_score() const { return score_; } inline float AuthenticateResponse::score() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateResponse.score) return _internal_score(); } inline void AuthenticateResponse::_internal_set_score(float value) { score_ = value; } inline void AuthenticateResponse::set_score(float value) { _internal_set_score(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateResponse.score) } // bool isAlive = 3; inline void AuthenticateResponse::clear_isalive() { isalive_ = false; } inline bool AuthenticateResponse::_internal_isalive() const { return isalive_; } inline bool AuthenticateResponse::isalive() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateResponse.isAlive) return _internal_isalive(); } inline void AuthenticateResponse::_internal_set_isalive(bool value) { isalive_ = value; } inline void AuthenticateResponse::set_isalive(bool value) { _internal_set_isalive(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateResponse.isAlive) } // .sensory.api.common.TokenResponse token = 4; inline bool AuthenticateResponse::_internal_has_token() const { return this != internal_default_instance() && token_ != nullptr; } inline bool AuthenticateResponse::has_token() const { return _internal_has_token(); } inline const ::sensory::api::common::TokenResponse& AuthenticateResponse::_internal_token() const { const ::sensory::api::common::TokenResponse* p = token_; return p != nullptr ? *p : reinterpret_cast<const ::sensory::api::common::TokenResponse&>( ::sensory::api::common::_TokenResponse_default_instance_); } inline const ::sensory::api::common::TokenResponse& AuthenticateResponse::token() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateResponse.token) return _internal_token(); } inline void AuthenticateResponse::unsafe_arena_set_allocated_token( ::sensory::api::common::TokenResponse* token) { if (GetArenaForAllocation() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(token_); } token_ = token; if (token) { } else { } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:sensory.api.v1.video.AuthenticateResponse.token) } inline ::sensory::api::common::TokenResponse* AuthenticateResponse::release_token() { ::sensory::api::common::TokenResponse* temp = token_; token_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); if (GetArenaForAllocation() == nullptr) { delete old; } #else // PROTOBUF_FORCE_COPY_IN_RELEASE if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } inline ::sensory::api::common::TokenResponse* AuthenticateResponse::unsafe_arena_release_token() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.AuthenticateResponse.token) ::sensory::api::common::TokenResponse* temp = token_; token_ = nullptr; return temp; } inline ::sensory::api::common::TokenResponse* AuthenticateResponse::_internal_mutable_token() { if (token_ == nullptr) { auto* p = CreateMaybeMessage<::sensory::api::common::TokenResponse>(GetArenaForAllocation()); token_ = p; } return token_; } inline ::sensory::api::common::TokenResponse* AuthenticateResponse::mutable_token() { ::sensory::api::common::TokenResponse* _msg = _internal_mutable_token(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.AuthenticateResponse.token) return _msg; } inline void AuthenticateResponse::set_allocated_token(::sensory::api::common::TokenResponse* token) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(token_); } if (token) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper< ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena( reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(token)); if (message_arena != submessage_arena) { token = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, token, submessage_arena); } } else { } token_ = token; // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.AuthenticateResponse.token) } // string userId = 5; inline void AuthenticateResponse::clear_userid() { userid_.ClearToEmpty(); } inline const std::string& AuthenticateResponse::userid() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateResponse.userId) return _internal_userid(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void AuthenticateResponse::set_userid(ArgT0&& arg0, ArgT... args) { userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateResponse.userId) } inline std::string* AuthenticateResponse::mutable_userid() { std::string* _s = _internal_mutable_userid(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.AuthenticateResponse.userId) return _s; } inline const std::string& AuthenticateResponse::_internal_userid() const { return userid_.Get(); } inline void AuthenticateResponse::_internal_set_userid(const std::string& value) { userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* AuthenticateResponse::_internal_mutable_userid() { return userid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* AuthenticateResponse::release_userid() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.AuthenticateResponse.userId) return userid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void AuthenticateResponse::set_allocated_userid(std::string* userid) { if (userid != nullptr) { } else { } userid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), userid, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.AuthenticateResponse.userId) } // string enrollmentId = 6; inline void AuthenticateResponse::clear_enrollmentid() { enrollmentid_.ClearToEmpty(); } inline const std::string& AuthenticateResponse::enrollmentid() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateResponse.enrollmentId) return _internal_enrollmentid(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void AuthenticateResponse::set_enrollmentid(ArgT0&& arg0, ArgT... args) { enrollmentid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateResponse.enrollmentId) } inline std::string* AuthenticateResponse::mutable_enrollmentid() { std::string* _s = _internal_mutable_enrollmentid(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.AuthenticateResponse.enrollmentId) return _s; } inline const std::string& AuthenticateResponse::_internal_enrollmentid() const { return enrollmentid_.Get(); } inline void AuthenticateResponse::_internal_set_enrollmentid(const std::string& value) { enrollmentid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* AuthenticateResponse::_internal_mutable_enrollmentid() { return enrollmentid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* AuthenticateResponse::release_enrollmentid() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.AuthenticateResponse.enrollmentId) return enrollmentid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void AuthenticateResponse::set_allocated_enrollmentid(std::string* enrollmentid) { if (enrollmentid != nullptr) { } else { } enrollmentid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), enrollmentid, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.AuthenticateResponse.enrollmentId) } // ------------------------------------------------------------------- // LivenessRecognitionResponse // bool isAlive = 1; inline void LivenessRecognitionResponse::clear_isalive() { isalive_ = false; } inline bool LivenessRecognitionResponse::_internal_isalive() const { return isalive_; } inline bool LivenessRecognitionResponse::isalive() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.LivenessRecognitionResponse.isAlive) return _internal_isalive(); } inline void LivenessRecognitionResponse::_internal_set_isalive(bool value) { isalive_ = value; } inline void LivenessRecognitionResponse::set_isalive(bool value) { _internal_set_isalive(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.LivenessRecognitionResponse.isAlive) } // float score = 2; inline void LivenessRecognitionResponse::clear_score() { score_ = 0; } inline float LivenessRecognitionResponse::_internal_score() const { return score_; } inline float LivenessRecognitionResponse::score() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.LivenessRecognitionResponse.score) return _internal_score(); } inline void LivenessRecognitionResponse::_internal_set_score(float value) { score_ = value; } inline void LivenessRecognitionResponse::set_score(float value) { _internal_set_score(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.LivenessRecognitionResponse.score) } // ------------------------------------------------------------------- // CreateEnrollmentConfig // string userId = 1 [(.validate.rules) = { inline void CreateEnrollmentConfig::clear_userid() { userid_.ClearToEmpty(); } inline const std::string& CreateEnrollmentConfig::userid() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentConfig.userId) return _internal_userid(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void CreateEnrollmentConfig::set_userid(ArgT0&& arg0, ArgT... args) { userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentConfig.userId) } inline std::string* CreateEnrollmentConfig::mutable_userid() { std::string* _s = _internal_mutable_userid(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentConfig.userId) return _s; } inline const std::string& CreateEnrollmentConfig::_internal_userid() const { return userid_.Get(); } inline void CreateEnrollmentConfig::_internal_set_userid(const std::string& value) { userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* CreateEnrollmentConfig::_internal_mutable_userid() { return userid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* CreateEnrollmentConfig::release_userid() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentConfig.userId) return userid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void CreateEnrollmentConfig::set_allocated_userid(std::string* userid) { if (userid != nullptr) { } else { } userid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), userid, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.CreateEnrollmentConfig.userId) } // string deviceId = 2 [(.validate.rules) = { inline void CreateEnrollmentConfig::clear_deviceid() { deviceid_.ClearToEmpty(); } inline const std::string& CreateEnrollmentConfig::deviceid() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentConfig.deviceId) return _internal_deviceid(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void CreateEnrollmentConfig::set_deviceid(ArgT0&& arg0, ArgT... args) { deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentConfig.deviceId) } inline std::string* CreateEnrollmentConfig::mutable_deviceid() { std::string* _s = _internal_mutable_deviceid(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentConfig.deviceId) return _s; } inline const std::string& CreateEnrollmentConfig::_internal_deviceid() const { return deviceid_.Get(); } inline void CreateEnrollmentConfig::_internal_set_deviceid(const std::string& value) { deviceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* CreateEnrollmentConfig::_internal_mutable_deviceid() { return deviceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* CreateEnrollmentConfig::release_deviceid() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentConfig.deviceId) return deviceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void CreateEnrollmentConfig::set_allocated_deviceid(std::string* deviceid) { if (deviceid != nullptr) { } else { } deviceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deviceid, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.CreateEnrollmentConfig.deviceId) } // string modelName = 3 [(.validate.rules) = { inline void CreateEnrollmentConfig::clear_modelname() { modelname_.ClearToEmpty(); } inline const std::string& CreateEnrollmentConfig::modelname() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentConfig.modelName) return _internal_modelname(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void CreateEnrollmentConfig::set_modelname(ArgT0&& arg0, ArgT... args) { modelname_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentConfig.modelName) } inline std::string* CreateEnrollmentConfig::mutable_modelname() { std::string* _s = _internal_mutable_modelname(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentConfig.modelName) return _s; } inline const std::string& CreateEnrollmentConfig::_internal_modelname() const { return modelname_.Get(); } inline void CreateEnrollmentConfig::_internal_set_modelname(const std::string& value) { modelname_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* CreateEnrollmentConfig::_internal_mutable_modelname() { return modelname_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* CreateEnrollmentConfig::release_modelname() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentConfig.modelName) return modelname_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void CreateEnrollmentConfig::set_allocated_modelname(std::string* modelname) { if (modelname != nullptr) { } else { } modelname_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), modelname, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.CreateEnrollmentConfig.modelName) } // string description = 4 [(.validate.rules) = { inline void CreateEnrollmentConfig::clear_description() { description_.ClearToEmpty(); } inline const std::string& CreateEnrollmentConfig::description() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentConfig.description) return _internal_description(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void CreateEnrollmentConfig::set_description(ArgT0&& arg0, ArgT... args) { description_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentConfig.description) } inline std::string* CreateEnrollmentConfig::mutable_description() { std::string* _s = _internal_mutable_description(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentConfig.description) return _s; } inline const std::string& CreateEnrollmentConfig::_internal_description() const { return description_.Get(); } inline void CreateEnrollmentConfig::_internal_set_description(const std::string& value) { description_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* CreateEnrollmentConfig::_internal_mutable_description() { return description_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* CreateEnrollmentConfig::release_description() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentConfig.description) return description_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void CreateEnrollmentConfig::set_allocated_description(std::string* description) { if (description != nullptr) { } else { } description_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), description, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.CreateEnrollmentConfig.description) } // bool isLivenessEnabled = 5; inline void CreateEnrollmentConfig::clear_islivenessenabled() { islivenessenabled_ = false; } inline bool CreateEnrollmentConfig::_internal_islivenessenabled() const { return islivenessenabled_; } inline bool CreateEnrollmentConfig::islivenessenabled() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentConfig.isLivenessEnabled) return _internal_islivenessenabled(); } inline void CreateEnrollmentConfig::_internal_set_islivenessenabled(bool value) { islivenessenabled_ = value; } inline void CreateEnrollmentConfig::set_islivenessenabled(bool value) { _internal_set_islivenessenabled(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentConfig.isLivenessEnabled) } // .sensory.api.v1.video.RecognitionThreshold livenessThreshold = 6 [(.validate.rules) = { inline void CreateEnrollmentConfig::clear_livenessthreshold() { livenessthreshold_ = 0; } inline ::sensory::api::v1::video::RecognitionThreshold CreateEnrollmentConfig::_internal_livenessthreshold() const { return static_cast< ::sensory::api::v1::video::RecognitionThreshold >(livenessthreshold_); } inline ::sensory::api::v1::video::RecognitionThreshold CreateEnrollmentConfig::livenessthreshold() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentConfig.livenessThreshold) return _internal_livenessthreshold(); } inline void CreateEnrollmentConfig::_internal_set_livenessthreshold(::sensory::api::v1::video::RecognitionThreshold value) { livenessthreshold_ = value; } inline void CreateEnrollmentConfig::set_livenessthreshold(::sensory::api::v1::video::RecognitionThreshold value) { _internal_set_livenessthreshold(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentConfig.livenessThreshold) } // .sensory.api.common.CompressionConfiguration compression = 7; inline bool CreateEnrollmentConfig::_internal_has_compression() const { return this != internal_default_instance() && compression_ != nullptr; } inline bool CreateEnrollmentConfig::has_compression() const { return _internal_has_compression(); } inline const ::sensory::api::common::CompressionConfiguration& CreateEnrollmentConfig::_internal_compression() const { const ::sensory::api::common::CompressionConfiguration* p = compression_; return p != nullptr ? *p : reinterpret_cast<const ::sensory::api::common::CompressionConfiguration&>( ::sensory::api::common::_CompressionConfiguration_default_instance_); } inline const ::sensory::api::common::CompressionConfiguration& CreateEnrollmentConfig::compression() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentConfig.compression) return _internal_compression(); } inline void CreateEnrollmentConfig::unsafe_arena_set_allocated_compression( ::sensory::api::common::CompressionConfiguration* compression) { if (GetArenaForAllocation() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(compression_); } compression_ = compression; if (compression) { } else { } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:sensory.api.v1.video.CreateEnrollmentConfig.compression) } inline ::sensory::api::common::CompressionConfiguration* CreateEnrollmentConfig::release_compression() { ::sensory::api::common::CompressionConfiguration* temp = compression_; compression_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); if (GetArenaForAllocation() == nullptr) { delete old; } #else // PROTOBUF_FORCE_COPY_IN_RELEASE if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } inline ::sensory::api::common::CompressionConfiguration* CreateEnrollmentConfig::unsafe_arena_release_compression() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentConfig.compression) ::sensory::api::common::CompressionConfiguration* temp = compression_; compression_ = nullptr; return temp; } inline ::sensory::api::common::CompressionConfiguration* CreateEnrollmentConfig::_internal_mutable_compression() { if (compression_ == nullptr) { auto* p = CreateMaybeMessage<::sensory::api::common::CompressionConfiguration>(GetArenaForAllocation()); compression_ = p; } return compression_; } inline ::sensory::api::common::CompressionConfiguration* CreateEnrollmentConfig::mutable_compression() { ::sensory::api::common::CompressionConfiguration* _msg = _internal_mutable_compression(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentConfig.compression) return _msg; } inline void CreateEnrollmentConfig::set_allocated_compression(::sensory::api::common::CompressionConfiguration* compression) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(compression_); } if (compression) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper< ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena( reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(compression)); if (message_arena != submessage_arena) { compression = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, compression, submessage_arena); } } else { } compression_ = compression; // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.CreateEnrollmentConfig.compression) } // string referenceId = 8 [(.validate.rules) = { inline void CreateEnrollmentConfig::clear_referenceid() { referenceid_.ClearToEmpty(); } inline const std::string& CreateEnrollmentConfig::referenceid() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentConfig.referenceId) return _internal_referenceid(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void CreateEnrollmentConfig::set_referenceid(ArgT0&& arg0, ArgT... args) { referenceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentConfig.referenceId) } inline std::string* CreateEnrollmentConfig::mutable_referenceid() { std::string* _s = _internal_mutable_referenceid(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.CreateEnrollmentConfig.referenceId) return _s; } inline const std::string& CreateEnrollmentConfig::_internal_referenceid() const { return referenceid_.Get(); } inline void CreateEnrollmentConfig::_internal_set_referenceid(const std::string& value) { referenceid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* CreateEnrollmentConfig::_internal_mutable_referenceid() { return referenceid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* CreateEnrollmentConfig::release_referenceid() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.CreateEnrollmentConfig.referenceId) return referenceid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void CreateEnrollmentConfig::set_allocated_referenceid(std::string* referenceid) { if (referenceid != nullptr) { } else { } referenceid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), referenceid, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.CreateEnrollmentConfig.referenceId) } // int32 numLivenessFramesRequired = 9; inline void CreateEnrollmentConfig::clear_numlivenessframesrequired() { numlivenessframesrequired_ = 0; } inline ::PROTOBUF_NAMESPACE_ID::int32 CreateEnrollmentConfig::_internal_numlivenessframesrequired() const { return numlivenessframesrequired_; } inline ::PROTOBUF_NAMESPACE_ID::int32 CreateEnrollmentConfig::numlivenessframesrequired() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.CreateEnrollmentConfig.numLivenessFramesRequired) return _internal_numlivenessframesrequired(); } inline void CreateEnrollmentConfig::_internal_set_numlivenessframesrequired(::PROTOBUF_NAMESPACE_ID::int32 value) { numlivenessframesrequired_ = value; } inline void CreateEnrollmentConfig::set_numlivenessframesrequired(::PROTOBUF_NAMESPACE_ID::int32 value) { _internal_set_numlivenessframesrequired(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.CreateEnrollmentConfig.numLivenessFramesRequired) } // ------------------------------------------------------------------- // AuthenticateConfig // string enrollmentId = 1 [(.validate.rules) = { inline bool AuthenticateConfig::_internal_has_enrollmentid() const { return authId_case() == kEnrollmentId; } inline bool AuthenticateConfig::has_enrollmentid() const { return _internal_has_enrollmentid(); } inline void AuthenticateConfig::set_has_enrollmentid() { _oneof_case_[0] = kEnrollmentId; } inline void AuthenticateConfig::clear_enrollmentid() { if (_internal_has_enrollmentid()) { authId_.enrollmentid_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); clear_has_authId(); } } inline const std::string& AuthenticateConfig::enrollmentid() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateConfig.enrollmentId) return _internal_enrollmentid(); } template <typename ArgT0, typename... ArgT> inline void AuthenticateConfig::set_enrollmentid(ArgT0&& arg0, ArgT... args) { if (!_internal_has_enrollmentid()) { clear_authId(); set_has_enrollmentid(); authId_.enrollmentid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } authId_.enrollmentid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateConfig.enrollmentId) } inline std::string* AuthenticateConfig::mutable_enrollmentid() { std::string* _s = _internal_mutable_enrollmentid(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.AuthenticateConfig.enrollmentId) return _s; } inline const std::string& AuthenticateConfig::_internal_enrollmentid() const { if (_internal_has_enrollmentid()) { return authId_.enrollmentid_.Get(); } return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void AuthenticateConfig::_internal_set_enrollmentid(const std::string& value) { if (!_internal_has_enrollmentid()) { clear_authId(); set_has_enrollmentid(); authId_.enrollmentid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } authId_.enrollmentid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* AuthenticateConfig::_internal_mutable_enrollmentid() { if (!_internal_has_enrollmentid()) { clear_authId(); set_has_enrollmentid(); authId_.enrollmentid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } return authId_.enrollmentid_.Mutable( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* AuthenticateConfig::release_enrollmentid() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.AuthenticateConfig.enrollmentId) if (_internal_has_enrollmentid()) { clear_has_authId(); return authId_.enrollmentid_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } else { return nullptr; } } inline void AuthenticateConfig::set_allocated_enrollmentid(std::string* enrollmentid) { if (has_authId()) { clear_authId(); } if (enrollmentid != nullptr) { set_has_enrollmentid(); authId_.enrollmentid_.UnsafeSetDefault(enrollmentid); ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaForAllocation(); if (arena != nullptr) { arena->Own(enrollmentid); } } // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.AuthenticateConfig.enrollmentId) } // string enrollmentGroupId = 2; inline bool AuthenticateConfig::_internal_has_enrollmentgroupid() const { return authId_case() == kEnrollmentGroupId; } inline bool AuthenticateConfig::has_enrollmentgroupid() const { return _internal_has_enrollmentgroupid(); } inline void AuthenticateConfig::set_has_enrollmentgroupid() { _oneof_case_[0] = kEnrollmentGroupId; } inline void AuthenticateConfig::clear_enrollmentgroupid() { if (_internal_has_enrollmentgroupid()) { authId_.enrollmentgroupid_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); clear_has_authId(); } } inline const std::string& AuthenticateConfig::enrollmentgroupid() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateConfig.enrollmentGroupId) return _internal_enrollmentgroupid(); } template <typename ArgT0, typename... ArgT> inline void AuthenticateConfig::set_enrollmentgroupid(ArgT0&& arg0, ArgT... args) { if (!_internal_has_enrollmentgroupid()) { clear_authId(); set_has_enrollmentgroupid(); authId_.enrollmentgroupid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } authId_.enrollmentgroupid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateConfig.enrollmentGroupId) } inline std::string* AuthenticateConfig::mutable_enrollmentgroupid() { std::string* _s = _internal_mutable_enrollmentgroupid(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.AuthenticateConfig.enrollmentGroupId) return _s; } inline const std::string& AuthenticateConfig::_internal_enrollmentgroupid() const { if (_internal_has_enrollmentgroupid()) { return authId_.enrollmentgroupid_.Get(); } return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); } inline void AuthenticateConfig::_internal_set_enrollmentgroupid(const std::string& value) { if (!_internal_has_enrollmentgroupid()) { clear_authId(); set_has_enrollmentgroupid(); authId_.enrollmentgroupid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } authId_.enrollmentgroupid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* AuthenticateConfig::_internal_mutable_enrollmentgroupid() { if (!_internal_has_enrollmentgroupid()) { clear_authId(); set_has_enrollmentgroupid(); authId_.enrollmentgroupid_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } return authId_.enrollmentgroupid_.Mutable( ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* AuthenticateConfig::release_enrollmentgroupid() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.AuthenticateConfig.enrollmentGroupId) if (_internal_has_enrollmentgroupid()) { clear_has_authId(); return authId_.enrollmentgroupid_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } else { return nullptr; } } inline void AuthenticateConfig::set_allocated_enrollmentgroupid(std::string* enrollmentgroupid) { if (has_authId()) { clear_authId(); } if (enrollmentgroupid != nullptr) { set_has_enrollmentgroupid(); authId_.enrollmentgroupid_.UnsafeSetDefault(enrollmentgroupid); ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaForAllocation(); if (arena != nullptr) { arena->Own(enrollmentgroupid); } } // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.AuthenticateConfig.enrollmentGroupId) } // bool isLivenessEnabled = 3; inline void AuthenticateConfig::clear_islivenessenabled() { islivenessenabled_ = false; } inline bool AuthenticateConfig::_internal_islivenessenabled() const { return islivenessenabled_; } inline bool AuthenticateConfig::islivenessenabled() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateConfig.isLivenessEnabled) return _internal_islivenessenabled(); } inline void AuthenticateConfig::_internal_set_islivenessenabled(bool value) { islivenessenabled_ = value; } inline void AuthenticateConfig::set_islivenessenabled(bool value) { _internal_set_islivenessenabled(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateConfig.isLivenessEnabled) } // .sensory.api.v1.video.RecognitionThreshold livenessThreshold = 4 [(.validate.rules) = { inline void AuthenticateConfig::clear_livenessthreshold() { livenessthreshold_ = 0; } inline ::sensory::api::v1::video::RecognitionThreshold AuthenticateConfig::_internal_livenessthreshold() const { return static_cast< ::sensory::api::v1::video::RecognitionThreshold >(livenessthreshold_); } inline ::sensory::api::v1::video::RecognitionThreshold AuthenticateConfig::livenessthreshold() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateConfig.livenessThreshold) return _internal_livenessthreshold(); } inline void AuthenticateConfig::_internal_set_livenessthreshold(::sensory::api::v1::video::RecognitionThreshold value) { livenessthreshold_ = value; } inline void AuthenticateConfig::set_livenessthreshold(::sensory::api::v1::video::RecognitionThreshold value) { _internal_set_livenessthreshold(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateConfig.livenessThreshold) } // .sensory.api.common.CompressionConfiguration compression = 5; inline bool AuthenticateConfig::_internal_has_compression() const { return this != internal_default_instance() && compression_ != nullptr; } inline bool AuthenticateConfig::has_compression() const { return _internal_has_compression(); } inline const ::sensory::api::common::CompressionConfiguration& AuthenticateConfig::_internal_compression() const { const ::sensory::api::common::CompressionConfiguration* p = compression_; return p != nullptr ? *p : reinterpret_cast<const ::sensory::api::common::CompressionConfiguration&>( ::sensory::api::common::_CompressionConfiguration_default_instance_); } inline const ::sensory::api::common::CompressionConfiguration& AuthenticateConfig::compression() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateConfig.compression) return _internal_compression(); } inline void AuthenticateConfig::unsafe_arena_set_allocated_compression( ::sensory::api::common::CompressionConfiguration* compression) { if (GetArenaForAllocation() == nullptr) { delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(compression_); } compression_ = compression; if (compression) { } else { } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:sensory.api.v1.video.AuthenticateConfig.compression) } inline ::sensory::api::common::CompressionConfiguration* AuthenticateConfig::release_compression() { ::sensory::api::common::CompressionConfiguration* temp = compression_; compression_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); if (GetArenaForAllocation() == nullptr) { delete old; } #else // PROTOBUF_FORCE_COPY_IN_RELEASE if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } inline ::sensory::api::common::CompressionConfiguration* AuthenticateConfig::unsafe_arena_release_compression() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.AuthenticateConfig.compression) ::sensory::api::common::CompressionConfiguration* temp = compression_; compression_ = nullptr; return temp; } inline ::sensory::api::common::CompressionConfiguration* AuthenticateConfig::_internal_mutable_compression() { if (compression_ == nullptr) { auto* p = CreateMaybeMessage<::sensory::api::common::CompressionConfiguration>(GetArenaForAllocation()); compression_ = p; } return compression_; } inline ::sensory::api::common::CompressionConfiguration* AuthenticateConfig::mutable_compression() { ::sensory::api::common::CompressionConfiguration* _msg = _internal_mutable_compression(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.AuthenticateConfig.compression) return _msg; } inline void AuthenticateConfig::set_allocated_compression(::sensory::api::common::CompressionConfiguration* compression) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(compression_); } if (compression) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper< ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena( reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(compression)); if (message_arena != submessage_arena) { compression = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, compression, submessage_arena); } } else { } compression_ = compression; // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.AuthenticateConfig.compression) } // bool doIncludeToken = 6; inline void AuthenticateConfig::clear_doincludetoken() { doincludetoken_ = false; } inline bool AuthenticateConfig::_internal_doincludetoken() const { return doincludetoken_; } inline bool AuthenticateConfig::doincludetoken() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.AuthenticateConfig.doIncludeToken) return _internal_doincludetoken(); } inline void AuthenticateConfig::_internal_set_doincludetoken(bool value) { doincludetoken_ = value; } inline void AuthenticateConfig::set_doincludetoken(bool value) { _internal_set_doincludetoken(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.AuthenticateConfig.doIncludeToken) } inline bool AuthenticateConfig::has_authId() const { return authId_case() != AUTHID_NOT_SET; } inline void AuthenticateConfig::clear_has_authId() { _oneof_case_[0] = AUTHID_NOT_SET; } inline AuthenticateConfig::AuthIdCase AuthenticateConfig::authId_case() const { return AuthenticateConfig::AuthIdCase(_oneof_case_[0]); } // ------------------------------------------------------------------- // ValidateRecognitionConfig // string modelName = 1 [(.validate.rules) = { inline void ValidateRecognitionConfig::clear_modelname() { modelname_.ClearToEmpty(); } inline const std::string& ValidateRecognitionConfig::modelname() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.ValidateRecognitionConfig.modelName) return _internal_modelname(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void ValidateRecognitionConfig::set_modelname(ArgT0&& arg0, ArgT... args) { modelname_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.ValidateRecognitionConfig.modelName) } inline std::string* ValidateRecognitionConfig::mutable_modelname() { std::string* _s = _internal_mutable_modelname(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.ValidateRecognitionConfig.modelName) return _s; } inline const std::string& ValidateRecognitionConfig::_internal_modelname() const { return modelname_.Get(); } inline void ValidateRecognitionConfig::_internal_set_modelname(const std::string& value) { modelname_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* ValidateRecognitionConfig::_internal_mutable_modelname() { return modelname_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* ValidateRecognitionConfig::release_modelname() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.ValidateRecognitionConfig.modelName) return modelname_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void ValidateRecognitionConfig::set_allocated_modelname(std::string* modelname) { if (modelname != nullptr) { } else { } modelname_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), modelname, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.ValidateRecognitionConfig.modelName) } // string userId = 2 [(.validate.rules) = { inline void ValidateRecognitionConfig::clear_userid() { userid_.ClearToEmpty(); } inline const std::string& ValidateRecognitionConfig::userid() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.ValidateRecognitionConfig.userId) return _internal_userid(); } template <typename ArgT0, typename... ArgT> inline PROTOBUF_ALWAYS_INLINE void ValidateRecognitionConfig::set_userid(ArgT0&& arg0, ArgT... args) { userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); // @@protoc_insertion_point(field_set:sensory.api.v1.video.ValidateRecognitionConfig.userId) } inline std::string* ValidateRecognitionConfig::mutable_userid() { std::string* _s = _internal_mutable_userid(); // @@protoc_insertion_point(field_mutable:sensory.api.v1.video.ValidateRecognitionConfig.userId) return _s; } inline const std::string& ValidateRecognitionConfig::_internal_userid() const { return userid_.Get(); } inline void ValidateRecognitionConfig::_internal_set_userid(const std::string& value) { userid_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); } inline std::string* ValidateRecognitionConfig::_internal_mutable_userid() { return userid_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); } inline std::string* ValidateRecognitionConfig::release_userid() { // @@protoc_insertion_point(field_release:sensory.api.v1.video.ValidateRecognitionConfig.userId) return userid_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); } inline void ValidateRecognitionConfig::set_allocated_userid(std::string* userid) { if (userid != nullptr) { } else { } userid_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), userid, GetArenaForAllocation()); // @@protoc_insertion_point(field_set_allocated:sensory.api.v1.video.ValidateRecognitionConfig.userId) } // .sensory.api.v1.video.RecognitionThreshold threshold = 3 [(.validate.rules) = { inline void ValidateRecognitionConfig::clear_threshold() { threshold_ = 0; } inline ::sensory::api::v1::video::RecognitionThreshold ValidateRecognitionConfig::_internal_threshold() const { return static_cast< ::sensory::api::v1::video::RecognitionThreshold >(threshold_); } inline ::sensory::api::v1::video::RecognitionThreshold ValidateRecognitionConfig::threshold() const { // @@protoc_insertion_point(field_get:sensory.api.v1.video.ValidateRecognitionConfig.threshold) return _internal_threshold(); } inline void ValidateRecognitionConfig::_internal_set_threshold(::sensory::api::v1::video::RecognitionThreshold value) { threshold_ = value; } inline void ValidateRecognitionConfig::set_threshold(::sensory::api::v1::video::RecognitionThreshold value) { _internal_set_threshold(value); // @@protoc_insertion_point(field_set:sensory.api.v1.video.ValidateRecognitionConfig.threshold) } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // @@protoc_insertion_point(namespace_scope) } // namespace video } // namespace v1 } // namespace api } // namespace sensory PROTOBUF_NAMESPACE_OPEN template <> struct is_proto_enum< ::sensory::api::v1::video::RecognitionThreshold> : ::std::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::sensory::api::v1::video::RecognitionThreshold>() { return ::sensory::api::v1::video::RecognitionThreshold_descriptor(); } PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include <google/protobuf/port_undef.inc> #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_v1_2fvideo_2fvideo_2eproto
40.778279
173
0.750429
6b466a87d4425a0dda020a770da3e5e2ad066380
4,898
h
C
XilinxProcessorIPLib/drivers/tmr_inject/src/xtmr_inject_l.h
wincle626/Xilinx_Embedded_Driver_Example
45c989dc5b56a0449d5102fdefbabca626860e19
[ "BSD-3-Clause" ]
2
2019-03-12T17:57:32.000Z
2020-08-15T07:28:08.000Z
XilinxProcessorIPLib/drivers/tmr_inject/src/xtmr_inject_l.h
TheSeven/embeddedsw
23eb39df101391b896adf20fa9d6c5aee27b0adc
[ "BSD-3-Clause" ]
null
null
null
XilinxProcessorIPLib/drivers/tmr_inject/src/xtmr_inject_l.h
TheSeven/embeddedsw
23eb39df101391b896adf20fa9d6c5aee27b0adc
[ "BSD-3-Clause" ]
1
2021-10-30T00:13:23.000Z
2021-10-30T00:13:23.000Z
/****************************************************************************** * * Copyright (C) 2017 Xilinx, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * Use of the Software is limited solely to applications: * (a) running on a Xilinx device, or * (b) that interact with a Xilinx device through a bus or interconnect. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Except as contained in this notice, the name of the Xilinx shall not be used * in advertising or otherwise to promote the sale, use or other dealings in * this Software without prior written authorization from Xilinx. * ******************************************************************************/ /****************************************************************************/ /** * * @file xtmr_inject_l.h * @addtogroup tmr_inject_v1_0 * @{ * * This header file contains identifiers and low-level driver functions (or * macros) that can be used to access the device. High-level driver functions * are defined in xtmr_inject.h. * * <pre> * MODIFICATION HISTORY: * * Ver Who Date Changes * ----- ---- -------- ------------------------------------------------------- * 1.0 sa 04/05/17 First release * </pre> * *****************************************************************************/ #ifndef XTMR_INJECT_L_H /* prevent circular inclusions */ #define XTMR_INJECT_L_H /* by using protection macros */ #ifdef __cplusplus extern "C" { #endif /***************************** Include Files ********************************/ #include "xil_types.h" #include "xil_assert.h" #include "xil_io.h" /************************** Constant Definitions ****************************/ /* TMR Inject register offsets */ #define XTI_CR_OFFSET 0 /* control register, write only */ #define XTI_AIR_OFFSET 4 /* address register, write only */ #define XTI_IIR_OFFSET 8 /* instruction register, write only */ /* Control Register bit positions and masks */ #define XTI_CR_MAGIC 0 /* magic byte */ #define XTI_CR_CPU 8 /* cpu id */ #define XTI_CR_INJ 10 /* fault inject enabled */ #define XTI_CR_MAGIC_MASK 0x0ff /* magic byte mask */ #define XTI_CR_CPU_MASK 0x300 /* cpu id mask */ /**************************** Type Definitions ******************************/ /***************** Macros (Inline Functions) Definitions ********************/ /* * Define the appropriate I/O access method to memory mapped I/O. */ #define XTMR_Inject_Out32 Xil_Out32 /****************************************************************************/ /** * * Write a value to a TMRInject register. A 32 bit write is performed. * * @param BaseAddress is the base address of the TMRInject device. * @param RegOffset is the register offset from the base to write to. * @param Data is the data written to the register. * * @return None. * * @note C-style signature: * void XTMR_Inject_WriteReg(u32 BaseAddress, u32 RegOffset, * u32 Data) * ****************************************************************************/ #define XTMR_Inject_WriteReg(BaseAddress, RegOffset, Data) \ XTMR_Inject_Out32((BaseAddress) + (RegOffset), (u32)(Data)) /****************************************************************************/ /** * * Set the contents of the control register. Use the XUL_CR_* constants defined * above to create the bit-mask to be written to the register. * * @param BaseAddress is the base address of the device * @param Mask is the 32-bit value to write to the control register * * @return None. * * @note C-style Signature: * void XTMR_Inject_SetControlReg(u32 BaseAddress, u32 Mask); * *****************************************************************************/ #define XTMR_Inject_SetControlReg(BaseAddress, Mask) \ XTMR_Inject_WriteReg((BaseAddress), XTI_CONTROL_REG_OFFSET, (Mask)) /************************** Function Prototypes *****************************/ #ifdef __cplusplus } #endif #endif /* end of protection macro */ /** @} */
34.251748
79
0.593712
55be60836a99a80a5a5132f8efdd2820c5158862
846
h
C
SFLiveLib/ServerApi/Models/SFRankModel.h
tangxiangbo/ZGLiveClient
3512600482d56eb0363518a0005d539b8784575c
[ "MIT" ]
null
null
null
SFLiveLib/ServerApi/Models/SFRankModel.h
tangxiangbo/ZGLiveClient
3512600482d56eb0363518a0005d539b8784575c
[ "MIT" ]
null
null
null
SFLiveLib/ServerApi/Models/SFRankModel.h
tangxiangbo/ZGLiveClient
3512600482d56eb0363518a0005d539b8784575c
[ "MIT" ]
null
null
null
// // RankModel.h // StarFactory // // Created by Lee, Bo on 16/4/7. // Copyright © 2016年 Joygo. All rights reserved. // #import <Mantle/Mantle.h> #import "SFUserRankModel.h" #import "SFAnchorModel.h" typedef NS_ENUM(NSUInteger, RankType) { RTContribution = 1, RTAnchorHot = 2, RTLiveHot = 3, RTAnchorPopularity = 4, }; @interface SFRankModel : MTLModel<MTLJSONSerializing> @property (nonatomic, assign) RankType type; @property (nonatomic, copy) NSArray *userTop; @property (nonatomic, copy) NSArray *anchorTop; @property (nonatomic, copy) NSArray *liveTop; @property (nonatomic, copy) NSArray *popularityTop; @end @interface SFRankListResponse : MTLModel<MTLJSONSerializing> @property (nonatomic, assign) NSInteger code; @property (nonatomic, copy) NSString *message; @property (nonatomic, copy) NSArray *list; @end
22.263158
60
0.730496
1d14cdfea8d12fec75646f9be3a94881511ba595
247
h
C
Classes/Protocols/Fetchers/OCFProtocolMethodsFetcher.h
belkevich/ocfuntime
89896bc521e64e8184155b95fbad6c9f23b4bf58
[ "MIT" ]
7
2015-01-15T20:23:43.000Z
2016-03-17T12:53:23.000Z
Classes/Protocols/Fetchers/OCFProtocolMethodsFetcher.h
belkevich/ocfuntime
89896bc521e64e8184155b95fbad6c9f23b4bf58
[ "MIT" ]
null
null
null
Classes/Protocols/Fetchers/OCFProtocolMethodsFetcher.h
belkevich/ocfuntime
89896bc521e64e8184155b95fbad6c9f23b4bf58
[ "MIT" ]
null
null
null
// // OCFProtocolMethodsFetcher.h // OCFuntimeSpec // // Created by Alexey Belkevich on 1/15/15. // Copyright (c) 2015 okolodev. All rights reserved. // #import <Foundation/Foundation.h> @interface OCFProtocolMethodsFetcher : NSObject @end
17.642857
53
0.732794
1d4251d587dc6d4104a7277f6655764efdd0a876
4,481
h
C
jigseon.common/Heap.h
jigseon/jigseon.common
196c16f6c0e606e840ae0f981f18dbdd6c8c4cb5
[ "MIT" ]
null
null
null
jigseon.common/Heap.h
jigseon/jigseon.common
196c16f6c0e606e840ae0f981f18dbdd6c8c4cb5
[ "MIT" ]
3
2020-09-12T13:13:43.000Z
2021-03-30T09:56:08.000Z
jigseon.common/Heap.h
jigseon/jigseon.common
196c16f6c0e606e840ae0f981f18dbdd6c8c4cb5
[ "MIT" ]
null
null
null
#pragma once #include <iostream> #include <cstdlib> namespace jigseon { enum mode { minimum, maximum }; enum status { absent, present }; template <class T> struct HeapNode { int _key; T _data; int _status; HeapNode(int key = -1, T data = 0) { this->_key = key; this->_data = data; this->_status = absent; } }; template <class T> class Heap { private: HeapNode<T>* _heap; size_t _count, _capacity; int _mode; public: Heap(size_t n = 100, int mode = minimum); void swap(HeapNode<T>*, HeapNode<T>*); bool enqueue(int key, T data); HeapNode<T> dequeue(); class iterator { HeapNode<T>* _currentP; bool _direction; public: enum directions { forward, backward }; iterator(HeapNode<T>* current, bool dir = forward) { _currentP = current; _direction = dir; } void operator++() { _currentP = (_direction == forward) ? _currentP + 1 : _currentP - 1; } void operator++(int none) { _currentP = (_direction == forward) ? _currentP + 1 : _currentP - 1; } void operator--() { (_direction == forward) ? _currentP - 1 : _currentP + 1; } void operator--(int none) { _currentP = (_direction == forward) ? _currentP - 1 : _currentP + 1; } bool operator==(iterator i) { return (this->_currentP == i._currentP) ? true : false; } // iterator &i ·Î ¹ÞÀ» °æ¿ì begin()¿¡¼­ ³ª¿Â iterator°¡ bool operator!=(iterator i) { return (this->_currentP != i._currentP) ? true : false; } HeapNode<T>& operator*() { return *_currentP; } HeapNode<T>* operator->() { return _currentP; } }; iterator begin() { return iterator(this->_heap); } iterator end() { return iterator(this->_heap + _count); } iterator rbegin() { return iterator(this->_heap + _count - 1, iterator::backward); } iterator rend() { return iterator(this->_heap - 1, iterator::backward); } HeapNode<T>& operator[](int index); }; template <class T> Heap<T>::Heap(size_t n, int mode) { this->_heap = new HeapNode<T>[n]; if (this->_heap == NULL) throw BADALLOC; this->_capacity = n; this->_count = 0; this->_mode = mode; } template <class T> void Heap<T>::swap(HeapNode<T>* a, HeapNode<T>* b) { HeapNode<T> temp = *a; *a = *b; *b = temp; } template <class T> bool Heap<T>::enqueue(int key, T data) { if (_capacity <= _count) return false; size_t current = _count; _heap[current]._key = key; _heap[current]._data = data; _heap[current]._status = present; _count++; while (_heap[current]._status != absent && current > 0 && _count>1) { if (this->_mode == minimum) { if (_heap[current]._key >= _heap[(current - 1) / 2]._key) return true; swap(_heap + current, _heap + (current - 1) / 2); current = (current - 1) / 2; } else { if (_heap[current]._key <= _heap[(current - 1) / 2]._key) return true; swap(_heap + current, _heap + (current - 1) / 2); current = (current - 1) / 2; } } return true; } template <class T> HeapNode<T> Heap<T>::dequeue() { int current, successor; HeapNode<T> res; if (_count <= 0) return HeapNode<T>(); swap(_heap, _heap + (_count - (unsigned long long)1)); res = _heap[_count - 1]; _heap[_count - 1]._status = absent; _count--; current = 0; while (current <= _count - 1) { if (current * 2 + 2 > this->_capacity) return res; if (this->_mode == minimum) { successor = (_heap[current * 2 + 1]._key < _heap[current * 2 + 2]._key || _heap[current * 2 + 2]._status == absent) ? current * 2 + 1 : current * 2 + 2; if (_heap[current]._key >= _heap[successor]._key && _heap[successor]._status != absent) { if (successor >= _count) return res; swap(_heap + current, _heap + successor); current = successor; } else return res; } else { successor = (_heap[current * 2 + 1]._key > _heap[current * 2 + 2]._key || _heap[current * 2 + 2]._status == absent) ? current * 2 + 1 : current * 2 + 2; if (_heap[current]._key <= _heap[successor]._key && _heap[successor]._status != absent) { if (successor >= _count) return res; swap(_heap + current, _heap + successor); current = successor; } else return res; } } return res; } template<class T> HeapNode<T>& Heap<T>::operator[](int index) { if (index >= this->count || -index > this->count) { throw INVALIDINDEX; } index = (index > 0) ? index : this->_count + index; return this->_heap[index]; } }
23.338542
156
0.600536
d4cef1f0322e1344a84234e6ae8e8b862d28b735
12,932
h
C
packages/seacas/libraries/ioss/src/visualization/catalyst/test/parser/ImageSetRepresentationValidTests.h
tokusanya/seacas
54d9c3b68508ca96e3db1fd00c5d84a810fb330b
[ "Zlib", "NetCDF", "MIT", "BSL-1.0", "X11", "BSD-3-Clause" ]
null
null
null
packages/seacas/libraries/ioss/src/visualization/catalyst/test/parser/ImageSetRepresentationValidTests.h
tokusanya/seacas
54d9c3b68508ca96e3db1fd00c5d84a810fb330b
[ "Zlib", "NetCDF", "MIT", "BSL-1.0", "X11", "BSD-3-Clause" ]
null
null
null
packages/seacas/libraries/ioss/src/visualization/catalyst/test/parser/ImageSetRepresentationValidTests.h
tokusanya/seacas
54d9c3b68508ca96e3db1fd00c5d84a810fb330b
[ "Zlib", "NetCDF", "MIT", "BSL-1.0", "X11", "BSD-3-Clause" ]
null
null
null
// Copyright(C) 1999-2021 National Technology & Engineering Solutions // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with // NTESS, the U.S. Government retains certain rights in this software. // // See packages/seacas/LICENSE for details #ifndef __IMAGE_SET_REPRESENTATION_VALID_TESTS_H #define __IMAGE_SET_REPRESENTATION_VALID_TESTS_H #include <string> std::string ImagesetRepresentationSurfaces = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show surfaces = false show edges = true image size = 800 450 end imageset end )"; std::string ImagesetRepresentationEdges = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show edges = true image size = 800 450 end imageset end )"; std::string ImagesetRepresentationBoundingBox = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show surfaces = false show bounding box = true image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorByScalar = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color by scalar = VON_MISES image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorByVectorMagnitude = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color by vector magnitude = displ image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorByVectorComponent = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color by vector component = displ_x image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorByTensorComponent = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color by tensor component = stress_xy image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorBySolidColor = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color by solid color = 1.0 0.5 0.0 image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorByBlockId = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera image size = 800 450 color by blockid end imageset end )"; std::string ImagesetRepresentationTimeAnnotation = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show time annotation = true image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorLegend = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show color legend = true color by scalar = VON_MISES image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorLegendRange = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color legend range = 22 32 color by scalar = VON_MISES image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorLegendUseCurrentDataRange = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color legend use current data range color by tensor component = stress_yz image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorLegendUseCumulativeDataRange = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color legend use cumulative data range color by tensor component = stress_yz image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorLegendMinimumRange = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color legend minimum range = -5 15 color by scalar = VON_MISES image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorLegendMaximumRange = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color legend maximum range = -5 15 color by scalar = VON_MISES image size = 800 450 end imageset end )"; std::string ImagesetRepresentationColorLegendPosition = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera color legend position = right 0.5 color by scalar = VON_MISES image size = 800 450 end imageset end )"; std::string ImagesetRepresentationPresetColorScale = R"( begin catalyst begin representation BlueToRedRainbowInvertedRep color by tensor component = stress_xy preset color scale = Blue_to_Red_Rainbow invert color scale = true end representation begin camera singletestcamera look direction = -1 -1 -1 end begin imageset BlueToRedRainbowInverted camera = singletestcamera representation = BlueToRedRainbowInvertedRep image size = 800 450 image basename = "BlueToRedRainbow." end imageset end )"; std::string ImagesetRepresentationTimeAnnotationPosition = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera time annotation position = top left 0.5 show time annotation = true image size = 800 450 end imageset end )"; std::string ImagesetMultiColorBy = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset is1 image size = 800 450 camera = singletestcamera color by scalar = VON_MISES image basename = is1. end imageset begin imageset is2 image size = 800 450 camera = singletestcamera color by tensor component = stress_xy image basename = is2. end imageset begin imageset is3 image size = 800 450 camera = singletestcamera color by vector magnitude = displ image basename = is3. end imageset begin imageset is4 image size = 800 450 camera = singletestcamera color by solid color = 0.1 0.9 0.95 image basename = is4. end imageset begin imageset is5 image size = 800 450 camera = singletestcamera image basename = is5. end imageset end )"; std::string ImagesetAxesLegendOnOffMultiImageset = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset is1 image size = 800 450 camera = singletestcamera color by scalar = VON_MISES image basename = is1. show axes = true show orientation axes = true show time annotation = true show edges = true end imageset begin imageset is2 image size = 800 450 camera = singletestcamera color by tensor component = stress_xy image basename = is2. show color legend = false show orientation axes = false end imageset begin imageset is3 image size = 800 450 camera = singletestcamera color by scalar = VON_MISES image basename = is3. show color legend = true show axes = true end imageset begin imageset is4 image size = 800 450 camera = singletestcamera image basename = is4. show axes = true show edges = true end imageset begin imageset is5 image size = 800 450 camera = singletestcamera color by solid color = 1.0 0.5 0.0 image basename = is5. end imageset begin imageset is6 image size = 800 450 camera = singletestcamera image basename = is6. show axes = true show edges = true show surfaces = false end imageset begin imageset is7 image size = 800 450 camera = singletestcamera color by solid color = 0.0 1.0 1.0 image basename = is7. show axes = true end imageset end )"; std::string ImagesetRepresentationAxes = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show axes = true image size = 800 450 end imageset end )"; std::string ImagesetRepresentationAxisLabelName = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show axes = true x axis label name = xAxis y axis label name = yAxis z axis label name = zAxis image size = 800 450 end imageset end )"; std::string ImagesetRepresentationAxisLabel = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show axes = true show x axis label = false show y axis label = false show z axis label = false image size = 800 450 end imageset end )"; std::string ImagesetRepresentationAxisTicMarks = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show axes = true show x axis tic marks = false show y axis tic marks = false show z axis tic marks = false image size = 800 450 end imageset end )"; std::string ImagesetRepresentationAxisMinorTicMarks = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show axes = true show x axis minor tic marks = false show y axis minor tic marks = false show z axis minor tic marks = false image size = 800 450 end imageset end )"; std::string ImagesetRepresentationAxisTicMarkLabels = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show axes = true show x axis tic mark labels = false show y axis tic mark labels = false show z axis tic mark labels = false image size = 800 450 end imageset end )"; std::string ImagesetRepresentationOrientationAxes = R"( begin catalyst begin camera singletestcamera look direction = -1 -1 -1 end begin imageset fooImageset camera = singletestcamera show orientation axes = true image size = 800 450 end imageset begin imageset fooImageset2 camera = singletestcamera show orientation axes = false image size = 800 450 end imageset end )"; #endif /* __IMAGE_SET_REPRESENTATION_VALID_TESTS_H */
26.609053
73
0.627822
be0567da12e7f534837ae8ab8e19b2da27a12a2c
254
h
C
FWCore/Utilities/interface/GetPassID.h
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
FWCore/Utilities/interface/GetPassID.h
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
FWCore/Utilities/interface/GetPassID.h
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
#ifndef Utilities_GetPassID_h #define Utilities_GetPassID_h #include <string> namespace edm { inline std::string getPassID() { static std::string const passID; // return empty string for now. return passID; } } // namespace edm #endif
18.142857
36
0.712598
cea69e0914a8db51cb6c49c9390fff54b34f7b73
1,320
h
C
android/android_9/hardware/intel/img/hwcomposer/moorefield_hdmi/ips/common/PixelFormat.h
yakuizhao/intel-vaapi-driver
b2bb0383352694941826543a171b557efac2219b
[ "MIT" ]
1
2017-09-22T01:41:30.000Z
2017-09-22T01:41:30.000Z
intel/img/hwcomposer/moorefield_hdmi/ips/common/PixelFormat.h
Keneral/ahardware
9a8a025f7c9471444c9e271bbe7f48182741d710
[ "Unlicense" ]
null
null
null
intel/img/hwcomposer/moorefield_hdmi/ips/common/PixelFormat.h
Keneral/ahardware
9a8a025f7c9471444c9e271bbe7f48182741d710
[ "Unlicense" ]
1
2018-02-24T19:09:04.000Z
2018-02-24T19:09:04.000Z
/* // Copyright (c) 2014 Intel Corporation  // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // //      http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. */ #ifndef PIXEL_FORMAT_H #define PIXEL_FORMAT_H namespace android { namespace intel { class PixelFormat { public: enum { PLANE_PIXEL_FORMAT_BGRX565 = 0x14000000UL, PLANE_PIXEL_FORMAT_BGRX8888 = 0x18000000UL, PLANE_PIXEL_FORMAT_BGRA8888 = 0x1c000000UL, PLANE_PIXEL_FORMAT_RGBX8888 = 0x38000000UL, PLANE_PIXEL_FORMAT_RGBA8888 = 0x3c000000UL, }; // convert gralloc color format to IP specific sprite pixel format. // See DSPACNTR (Display A Primary Sprite Control Register for more information) static bool convertFormat(uint32_t grallocFormat, uint32_t& spriteFormat, int& bpp); }; } // namespace intel } // namespace android #endif /*PIXEL_FORMAT_H*/
31.428571
88
0.737879
cd8cf61c4d3fb2c791eb4593fb655a23398973de
263
h
C
Example/IRLSizeExample/IRLSizeExampleConstants.h
taboulot/IRLSize
43f763070dc4b55c932cb9014aa822f8185b8d59
[ "MIT" ]
13
2015-04-10T20:12:23.000Z
2020-11-26T10:32:59.000Z
Example/IRLSizeExample/IRLSizeExampleConstants.h
taboulot/IRLSize
43f763070dc4b55c932cb9014aa822f8185b8d59
[ "MIT" ]
9
2015-05-28T13:44:41.000Z
2020-12-17T09:10:05.000Z
Example/IRLSizeExample/IRLSizeExampleConstants.h
taboulot/IRLSize
43f763070dc4b55c932cb9014aa822f8185b8d59
[ "MIT" ]
7
2015-05-28T04:00:14.000Z
2021-08-20T05:50:13.000Z
// // IRLSizeExampleConstants.h // IRLSizeExample // // Created by Jeff Kelley on 11/16/18. // Copyright © 2019 Detroit Labs. All rights reserved. // #import <UIKit/UIKit.h> extern const double kInchesPerMillimeter; extern const double kMillimetersPerInch;
20.230769
55
0.745247
07a03ad9f054b2cab2357acb22a2d9da4fa194a1
377
h
C
example/glass.h
nullgemm/mechascribe
e8af44a4f6a34837a82c22ff10a4113639987912
[ "WTFPL" ]
5
2021-11-01T20:02:46.000Z
2022-01-27T09:58:16.000Z
example/glass.h
nullgemm/mechascribe
e8af44a4f6a34837a82c22ff10a4113639987912
[ "WTFPL" ]
2
2021-11-23T12:07:58.000Z
2022-01-17T16:39:28.000Z
example/glass.h
nullgemm/mechascribe
e8af44a4f6a34837a82c22ff10a4113639987912
[ "WTFPL" ]
null
null
null
#ifndef H_MECHASCRIBE_EXAMPLE_GLASS #define H_MECHASCRIBE_EXAMPLE_GLASS #include <stddef.h> struct eat_glass_sentence { const char* text; // the sentence const char* bcp47; // the standard code for the language const char* language; // the english name for the language }; void eat_glass_get_list( const struct eat_glass_sentence** out_list, size_t* out_size); #endif
20.944444
59
0.779841
e0291b4d2b79defc43f0457f261c707a1066b8da
1,983
h
C
Brolog/include/Brolog/Predicates/Math.h
willcassella/Brolog
129ea3734b63288bbbe1eaead140336e254239ba
[ "MIT" ]
null
null
null
Brolog/include/Brolog/Predicates/Math.h
willcassella/Brolog
129ea3734b63288bbbe1eaead140336e254239ba
[ "MIT" ]
null
null
null
Brolog/include/Brolog/Predicates/Math.h
willcassella/Brolog
129ea3734b63288bbbe1eaead140336e254239ba
[ "MIT" ]
null
null
null
// Math.h #pragma once #include "../Rule.h" namespace brolog { template <typename T> struct Sum { using ArgTypes = tmp::type_list<T, T, T>; template <typename DBaseT, typename ContinueFnT> static bool satisfy(const DBaseT& /*dbase*/, const std::tuple<Var<T>*, Var<T>*, Var<T>*>& args, const ContinueFnT& next) { auto* a = std::get<0>(args); auto* b = std::get<1>(args); auto* c = std::get<2>(args); // If a is not unified if (!a->unified()) { // Try to unify a with b and c if (!b->unified() || !c->unified()) { return false; } a->unify(b->value() + c->value()); bool satisfied = next(); a->unbind(); return satisfied; } // If b has not been unified if (!b->unified()) { // Try to unify b with a and c if (!a->unified() || !c->unified()) { return false; } b->unify(a->value() - c->value()); bool satisfied = next(); b->unbind(); return satisfied; } // If c has not been unified if (!c->unified()) { // Try to unify c with a and b if (!a->unified() || !b->unified()) { return false; } c->unify(a->value() - c->value()); bool satisfied = next(); c->unbind(); return satisfied; } // They've all been unified, make sure the sum is correct if (a->value() == b->value() + c->value()) { return next(); } return false; } }; template <typename T, T V> struct ConstantSum { using ArgTypes = tmp::type_list<T, T>; template <typename DBaseT, typename ContinueFnT> static bool satisfy(const DBaseT& dbase, const std::tuple<Var<T>*, Var<T>*>& args, const ContinueFnT& next) { // Create a third argument and unify it with the constant StoredVarChainElement<T, std::numeric_limits<int>::max()> c; c.unify(V); return Sum<T>::satisfy(dbase, std::make_tuple(std::get<0>(args), std::get<1>(args), &c), next); } }; template <typename T> using Equal = ConstantSum<T, 0>; }
21.095745
122
0.572869
ed6fdc2196b9ae09a22eea3ae37bdd27b5a61372
659
h
C
GameTemplate/Configurator.h
enimog/GameTemplate
06040fb099543dbc7aef8ff3f453cf66f8acf043
[ "MIT" ]
null
null
null
GameTemplate/Configurator.h
enimog/GameTemplate
06040fb099543dbc7aef8ff3f453cf66f8acf043
[ "MIT" ]
null
null
null
GameTemplate/Configurator.h
enimog/GameTemplate
06040fb099543dbc7aef8ff3f453cf66f8acf043
[ "MIT" ]
null
null
null
#pragma once #include "INIFile.h" #include <unordered_map> class CConfigurator { public: CConfigurator(); ~CConfigurator(); enum ConfigOption { // User USER_Username, // Video VIDEO_ResolutionX, VIDEO_ResolutionY, VIDEO_VideoMode, VIDEO_VSync, // Audio AUDIO_Master, AUDIO_Sound, AUDIO_Music, AUDIO_Environmental, }; void UseDefaultConfiguration() const; std::wstring operator[]( ConfigOption key ) const; private: File::CINIFile Config; static const std::unordered_map<ConfigOption, std::wstring> OptionToString; };
16.475
79
0.620637
3309882eeead9ebc7fac4db38e0516f0a5c4b632
2,712
c
C
libc/runtime/munmap.c
waldyrious/cosmopolitan
3e17c7b20f9c6e8695f9a12ef67e42f98cec7cca
[ "0BSD" ]
null
null
null
libc/runtime/munmap.c
waldyrious/cosmopolitan
3e17c7b20f9c6e8695f9a12ef67e42f98cec7cca
[ "0BSD" ]
null
null
null
libc/runtime/munmap.c
waldyrious/cosmopolitan
3e17c7b20f9c6e8695f9a12ef67e42f98cec7cca
[ "0BSD" ]
null
null
null
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞══════════════════════════════════════════════════════════════════════════════╡ │ Copyright 2020 Justine Alexandra Roberts Tunney │ │ │ │ Permission to use, copy, modify, and/or distribute this software for │ │ any purpose with or without fee is hereby granted, provided that the │ │ above copyright notice and this permission notice appear in all copies. │ │ │ │ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │ │ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │ │ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │ │ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │ │ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │ │ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │ │ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │ │ PERFORMANCE OF THIS SOFTWARE. │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/internal.h" #include "libc/dce.h" #include "libc/macros.h" #include "libc/runtime/directmap.internal.h" #include "libc/runtime/memtrack.h" #include "libc/runtime/runtime.h" #include "libc/sysv/errfuns.h" #define IP(X) (intptr_t)(X) #define ALIGNED(p) (!(IP(p) & (FRAMESIZE - 1))) #define CANONICAL(p) (-0x800000000000 <= IP(p) && IP(p) <= 0x7fffffffffff) /** * Releases memory pages. * * This function may be used to punch holes in existing mappings, but your * mileage may vary on Windows. * * @param addr is a pointer within any memory mapped region the process * has permission to control, such as address ranges returned by * mmap(), the program image itself, etc. * @param size is the amount of memory to unmap, which needs to be a * multiple of FRAMESIZE for anonymous mappings, because windows * and for files size needs to be perfect to the byte bc openbsd * @return 0 on success, or -1 w/ errno */ int munmap(void *addr, size_t size) { int rc; if (!ALIGNED(addr) || !CANONICAL(addr) || !size) return einval(); if (UntrackMemoryIntervals(addr, size) == -1) return -1; if (IsWindows()) return 0; if (IsMetal()) sys_munmap_metal(addr, size); return sys_munmap(addr, size); }
51.169811
80
0.57559
81ddcce92ede15a04fbad9f2b77e0af50d589164
4,649
h
C
HTWK_SD_FILTER/SD_Simple_fusion/Simple_fusion.h
HTWKSmartDriving/aadc-2015
95ee77aa0f9ebbb541bbb1e3b99d3f044347d103
[ "BSD-2-Clause" ]
2
2017-11-29T00:15:26.000Z
2017-11-29T01:45:54.000Z
HTWK_SD_FILTER/SD_Simple_fusion/Simple_fusion.h
HTWKSmartDriving/aadc-2015
95ee77aa0f9ebbb541bbb1e3b99d3f044347d103
[ "BSD-2-Clause" ]
null
null
null
HTWK_SD_FILTER/SD_Simple_fusion/Simple_fusion.h
HTWKSmartDriving/aadc-2015
95ee77aa0f9ebbb541bbb1e3b99d3f044347d103
[ "BSD-2-Clause" ]
2
2017-11-28T23:47:27.000Z
2019-07-19T08:04:50.000Z
/** * Copyright (c) 2014-2015, HTWK SmartDriving * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * AUTHORS: Silvio Feig, Denny Hecht, Andreas Kluge, Lars Kollmann, Eike Florian Petersen, Artem Pokas * */ /** * @filename * @copyright (c) Copyright 2014 SD. All rights reserved * @author epeterse * @details */ #ifndef _SD_Simple_fusion_FILTER_HEADER_ #define _SD_Simple_fusion_FILTER_HEADER_ #define PROP_NAME_IR_LONGE_RANGE_INPUT_PIN_ACTIVE "__IR longe range input pin state" #define PROP_NAME_IR_SHORT_RANGE_1_INPUT_PIN_ACTIVE "__IR short range 1 input pin state" #define PROP_NAME_IR_SHORT_RANGE_2_INPUT_PIN_ACTIVE "__IR short range 2 input pin state" #define PROP_NAME_US_LEFT_INPUT_PIN_ACTIVE "__Ultrasonic left input pin state" #define PROP_NAME_US_RIGHT_INPUT_PIN_ACTIVE "__Ultrasonic right input pin state" #define PROP_NAME_IR_LONG_RANGE_THRESHOLD "_Threshold of the ir longe range sensor" #define PROP_NAME_IR_SHORT_RANGE_THRESHOLD "_Threshold of the ir short sensor" #define PROP_NAME_US_THRESHOLD "_Threshold of the us sensor" #define PROP_NAME_MEDIAN "Median used by the median-filter" #define OID_ADTF_SD_SIMPLE_FUSION "adtf.sd.simpleFusion" class cSimpleFusion : public cFilter { ADTF_FILTER(OID_ADTF_SD_SIMPLE_FUSION , "SD Simple fusion", adtf::OBJCAT_DataFilter); private: tVoid initProperties(); // todo tResult CreateRawCanTestData(const tTimeStamp& tmStreamTime); tResult createOutputPin(); tResult createInputPinIRLongeRange(const tChar*); tResult createInputPinIRShortRange1(const tChar*); tResult createInputPinIRShortRange2(const tChar*); tResult createInputPinUSLeft(const tChar*); tResult createInputPinUSRight(const tChar*); tResult calculatedMedian(); tTimeStamp m_nLastMSTime; tUInt32 sigma_iterations; tUInt32 ir_long_iterations; tUInt32 ir_short_iterations; tResult sendNewValue(tFloat32 value); cInputPin m_ir_short_in1; // input pin for signal data cInputPin m_ir_short_in2; // input pin for signal data cInputPin m_ir_long_in; // input pin for signal data cInputPin m_us_left_in; // input pin for us left signal date cInputPin m_us_right_in; // input pin for us left signal date // properties tUInt8 stateOfLongeRangeInputPin; tUInt8 stateOfShortRangeInputPin1; tUInt8 stateOfShortRangeInputPin2; tUInt8 stateOfUSLeftInputPin; tUInt8 stateOfUSRightInputPin; tUInt8 thresholdIRLongRange; tUInt8 thresholdIRShortRange; tUInt8 thresholdUS; tUInt8 lengthOfMedianVector; tUInt8 median; cObjectPtr<IMediaType> pTypeSignalValue; protected: cOutputPin m_ir_fusion_out; // output pin for signal data /*! Coder Descriptor for the input pins*/ cObjectPtr<IMediaTypeDescription> m_pCoderDescSignalInput; public: // construction cSimpleFusion(const tChar* __info); virtual ~cSimpleFusion(); tResult Init(tInitStage eStage, __exception = NULL); tResult Start(__exception = NULL); tResult Stop(__exception = NULL); tResult Shutdown(tInitStage eStage, __exception = NULL); tResult OnPinEvent( IPin *pSource, tInt nEventCore, tInt nParam1, tInt nParam2, IMediaSample *pMediaSample); tResult PropertyChanged(const char*); }; //************************************************************************************************* #endif // _SD_Simple_fusion_FILTER_HEADER_
41.882883
110
0.763175
98ac95275a1c045a7da81c9fb47e68be318a9f91
27,866
h
C
linsched-linsched-alpha/arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_cfg_defs.h
usenixatc2021/SoftRefresh_Scheduling
589ba06c8ae59538973c22edf28f74a59d63aa14
[ "MIT" ]
55
2019-12-20T03:25:14.000Z
2022-01-16T07:19:47.000Z
linsched-linsched-alpha/arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_cfg_defs.h
usenixatc2021/SoftRefresh_Scheduling
589ba06c8ae59538973c22edf28f74a59d63aa14
[ "MIT" ]
5
2020-04-04T09:24:09.000Z
2020-04-19T12:33:55.000Z
linsched-linsched-alpha/arch/cris/include/arch-v32/mach-a3/mach/hwregs/iop/iop_sw_cfg_defs.h
usenixatc2021/SoftRefresh_Scheduling
589ba06c8ae59538973c22edf28f74a59d63aa14
[ "MIT" ]
30
2018-05-02T08:43:27.000Z
2022-01-23T03:25:54.000Z
#ifndef __iop_sw_cfg_defs_h #define __iop_sw_cfg_defs_h /* * This file is autogenerated from * file: iop_sw_cfg.r * * by ../../../tools/rdesc/bin/rdes2c -outfile iop_sw_cfg_defs.h iop_sw_cfg.r * Any changes here will be lost. * * -*- buffer-read-only: t -*- */ /* Main access macros */ #ifndef REG_RD #define REG_RD( scope, inst, reg ) \ REG_READ( reg_##scope##_##reg, \ (inst) + REG_RD_ADDR_##scope##_##reg ) #endif #ifndef REG_WR #define REG_WR( scope, inst, reg, val ) \ REG_WRITE( reg_##scope##_##reg, \ (inst) + REG_WR_ADDR_##scope##_##reg, (val) ) #endif #ifndef REG_RD_VECT #define REG_RD_VECT( scope, inst, reg, index ) \ REG_READ( reg_##scope##_##reg, \ (inst) + REG_RD_ADDR_##scope##_##reg + \ (index) * STRIDE_##scope##_##reg ) #endif #ifndef REG_WR_VECT #define REG_WR_VECT( scope, inst, reg, index, val ) \ REG_WRITE( reg_##scope##_##reg, \ (inst) + REG_WR_ADDR_##scope##_##reg + \ (index) * STRIDE_##scope##_##reg, (val) ) #endif #ifndef REG_RD_INT #define REG_RD_INT( scope, inst, reg ) \ REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg ) #endif #ifndef REG_WR_INT #define REG_WR_INT( scope, inst, reg, val ) \ REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) ) #endif #ifndef REG_RD_INT_VECT #define REG_RD_INT_VECT( scope, inst, reg, index ) \ REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \ (index) * STRIDE_##scope##_##reg ) #endif #ifndef REG_WR_INT_VECT #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \ REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \ (index) * STRIDE_##scope##_##reg, (val) ) #endif #ifndef REG_TYPE_CONV #define REG_TYPE_CONV( type, orgtype, val ) \ ( { union { orgtype o; type n; } r; r.o = val; r.n; } ) #endif #ifndef reg_page_size #define reg_page_size 8192 #endif #ifndef REG_ADDR #define REG_ADDR( scope, inst, reg ) \ ( (inst) + REG_RD_ADDR_##scope##_##reg ) #endif #ifndef REG_ADDR_VECT #define REG_ADDR_VECT( scope, inst, reg, index ) \ ( (inst) + REG_RD_ADDR_##scope##_##reg + \ (index) * STRIDE_##scope##_##reg ) #endif /* C-code for register scope iop_sw_cfg */ /* Register rw_crc_par_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_crc_par_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_crc_par_owner 0 #define REG_WR_ADDR_iop_sw_cfg_rw_crc_par_owner 0 /* Register rw_dmc_in_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_dmc_in_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_dmc_in_owner 4 #define REG_WR_ADDR_iop_sw_cfg_rw_dmc_in_owner 4 /* Register rw_dmc_out_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_dmc_out_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_dmc_out_owner 8 #define REG_WR_ADDR_iop_sw_cfg_rw_dmc_out_owner 8 /* Register rw_fifo_in_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_fifo_in_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_fifo_in_owner 12 #define REG_WR_ADDR_iop_sw_cfg_rw_fifo_in_owner 12 /* Register rw_fifo_in_extra_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_fifo_in_extra_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_fifo_in_extra_owner 16 #define REG_WR_ADDR_iop_sw_cfg_rw_fifo_in_extra_owner 16 /* Register rw_fifo_out_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_fifo_out_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_fifo_out_owner 20 #define REG_WR_ADDR_iop_sw_cfg_rw_fifo_out_owner 20 /* Register rw_fifo_out_extra_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_fifo_out_extra_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_fifo_out_extra_owner 24 #define REG_WR_ADDR_iop_sw_cfg_rw_fifo_out_extra_owner 24 /* Register rw_sap_in_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_sap_in_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_sap_in_owner 28 #define REG_WR_ADDR_iop_sw_cfg_rw_sap_in_owner 28 /* Register rw_sap_out_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_sap_out_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_sap_out_owner 32 #define REG_WR_ADDR_iop_sw_cfg_rw_sap_out_owner 32 /* Register rw_scrc_in_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_scrc_in_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_scrc_in_owner 36 #define REG_WR_ADDR_iop_sw_cfg_rw_scrc_in_owner 36 /* Register rw_scrc_out_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_scrc_out_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_scrc_out_owner 40 #define REG_WR_ADDR_iop_sw_cfg_rw_scrc_out_owner 40 /* Register rw_spu_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 1; unsigned int dummy1 : 31; } reg_iop_sw_cfg_rw_spu_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_spu_owner 44 #define REG_WR_ADDR_iop_sw_cfg_rw_spu_owner 44 /* Register rw_timer_grp0_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_timer_grp0_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp0_owner 48 #define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp0_owner 48 /* Register rw_timer_grp1_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_timer_grp1_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp1_owner 52 #define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp1_owner 52 /* Register rw_trigger_grp0_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_trigger_grp0_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp0_owner 56 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp0_owner 56 /* Register rw_trigger_grp1_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_trigger_grp1_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp1_owner 60 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp1_owner 60 /* Register rw_trigger_grp2_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_trigger_grp2_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp2_owner 64 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp2_owner 64 /* Register rw_trigger_grp3_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_trigger_grp3_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp3_owner 68 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp3_owner 68 /* Register rw_trigger_grp4_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_trigger_grp4_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp4_owner 72 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp4_owner 72 /* Register rw_trigger_grp5_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_trigger_grp5_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp5_owner 76 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp5_owner 76 /* Register rw_trigger_grp6_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_trigger_grp6_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp6_owner 80 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp6_owner 80 /* Register rw_trigger_grp7_owner, scope iop_sw_cfg, type rw */ typedef struct { unsigned int cfg : 2; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_trigger_grp7_owner; #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp7_owner 84 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp7_owner 84 /* Register rw_bus_mask, scope iop_sw_cfg, type rw */ typedef struct { unsigned int byte0 : 8; unsigned int byte1 : 8; unsigned int byte2 : 8; unsigned int byte3 : 8; } reg_iop_sw_cfg_rw_bus_mask; #define REG_RD_ADDR_iop_sw_cfg_rw_bus_mask 88 #define REG_WR_ADDR_iop_sw_cfg_rw_bus_mask 88 /* Register rw_bus_oe_mask, scope iop_sw_cfg, type rw */ typedef struct { unsigned int byte0 : 1; unsigned int byte1 : 1; unsigned int byte2 : 1; unsigned int byte3 : 1; unsigned int dummy1 : 28; } reg_iop_sw_cfg_rw_bus_oe_mask; #define REG_RD_ADDR_iop_sw_cfg_rw_bus_oe_mask 92 #define REG_WR_ADDR_iop_sw_cfg_rw_bus_oe_mask 92 /* Register rw_gio_mask, scope iop_sw_cfg, type rw */ typedef struct { unsigned int val : 32; } reg_iop_sw_cfg_rw_gio_mask; #define REG_RD_ADDR_iop_sw_cfg_rw_gio_mask 96 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_mask 96 /* Register rw_gio_oe_mask, scope iop_sw_cfg, type rw */ typedef struct { unsigned int val : 32; } reg_iop_sw_cfg_rw_gio_oe_mask; #define REG_RD_ADDR_iop_sw_cfg_rw_gio_oe_mask 100 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_oe_mask 100 /* Register rw_pinmapping, scope iop_sw_cfg, type rw */ typedef struct { unsigned int bus_byte0 : 2; unsigned int bus_byte1 : 2; unsigned int bus_byte2 : 2; unsigned int bus_byte3 : 2; unsigned int gio3_0 : 2; unsigned int gio7_4 : 2; unsigned int gio11_8 : 2; unsigned int gio15_12 : 2; unsigned int gio19_16 : 2; unsigned int gio23_20 : 2; unsigned int gio27_24 : 2; unsigned int gio31_28 : 2; unsigned int dummy1 : 8; } reg_iop_sw_cfg_rw_pinmapping; #define REG_RD_ADDR_iop_sw_cfg_rw_pinmapping 104 #define REG_WR_ADDR_iop_sw_cfg_rw_pinmapping 104 /* Register rw_bus_out_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int bus_lo : 2; unsigned int bus_hi : 2; unsigned int bus_lo_oe : 2; unsigned int bus_hi_oe : 2; unsigned int dummy1 : 24; } reg_iop_sw_cfg_rw_bus_out_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_bus_out_cfg 108 #define REG_WR_ADDR_iop_sw_cfg_rw_bus_out_cfg 108 /* Register rw_gio_out_grp0_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int gio0 : 3; unsigned int gio0_oe : 1; unsigned int gio1 : 3; unsigned int gio1_oe : 1; unsigned int gio2 : 3; unsigned int gio2_oe : 1; unsigned int gio3 : 3; unsigned int gio3_oe : 1; unsigned int dummy1 : 16; } reg_iop_sw_cfg_rw_gio_out_grp0_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp0_cfg 112 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp0_cfg 112 /* Register rw_gio_out_grp1_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int gio4 : 3; unsigned int gio4_oe : 1; unsigned int gio5 : 3; unsigned int gio5_oe : 1; unsigned int gio6 : 3; unsigned int gio6_oe : 1; unsigned int gio7 : 3; unsigned int gio7_oe : 1; unsigned int dummy1 : 16; } reg_iop_sw_cfg_rw_gio_out_grp1_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp1_cfg 116 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp1_cfg 116 /* Register rw_gio_out_grp2_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int gio8 : 3; unsigned int gio8_oe : 1; unsigned int gio9 : 3; unsigned int gio9_oe : 1; unsigned int gio10 : 3; unsigned int gio10_oe : 1; unsigned int gio11 : 3; unsigned int gio11_oe : 1; unsigned int dummy1 : 16; } reg_iop_sw_cfg_rw_gio_out_grp2_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp2_cfg 120 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp2_cfg 120 /* Register rw_gio_out_grp3_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int gio12 : 3; unsigned int gio12_oe : 1; unsigned int gio13 : 3; unsigned int gio13_oe : 1; unsigned int gio14 : 3; unsigned int gio14_oe : 1; unsigned int gio15 : 3; unsigned int gio15_oe : 1; unsigned int dummy1 : 16; } reg_iop_sw_cfg_rw_gio_out_grp3_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp3_cfg 124 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp3_cfg 124 /* Register rw_gio_out_grp4_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int gio16 : 3; unsigned int gio16_oe : 1; unsigned int gio17 : 3; unsigned int gio17_oe : 1; unsigned int gio18 : 3; unsigned int gio18_oe : 1; unsigned int gio19 : 3; unsigned int gio19_oe : 1; unsigned int dummy1 : 16; } reg_iop_sw_cfg_rw_gio_out_grp4_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp4_cfg 128 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp4_cfg 128 /* Register rw_gio_out_grp5_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int gio20 : 3; unsigned int gio20_oe : 1; unsigned int gio21 : 3; unsigned int gio21_oe : 1; unsigned int gio22 : 3; unsigned int gio22_oe : 1; unsigned int gio23 : 3; unsigned int gio23_oe : 1; unsigned int dummy1 : 16; } reg_iop_sw_cfg_rw_gio_out_grp5_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp5_cfg 132 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp5_cfg 132 /* Register rw_gio_out_grp6_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int gio24 : 3; unsigned int gio24_oe : 1; unsigned int gio25 : 3; unsigned int gio25_oe : 1; unsigned int gio26 : 3; unsigned int gio26_oe : 1; unsigned int gio27 : 3; unsigned int gio27_oe : 1; unsigned int dummy1 : 16; } reg_iop_sw_cfg_rw_gio_out_grp6_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp6_cfg 136 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp6_cfg 136 /* Register rw_gio_out_grp7_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int gio28 : 3; unsigned int gio28_oe : 1; unsigned int gio29 : 3; unsigned int gio29_oe : 1; unsigned int gio30 : 3; unsigned int gio30_oe : 1; unsigned int gio31 : 3; unsigned int gio31_oe : 1; unsigned int dummy1 : 16; } reg_iop_sw_cfg_rw_gio_out_grp7_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp7_cfg 140 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp7_cfg 140 /* Register rw_spu_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int bus0_in : 1; unsigned int bus1_in : 1; unsigned int dummy1 : 30; } reg_iop_sw_cfg_rw_spu_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_spu_cfg 144 #define REG_WR_ADDR_iop_sw_cfg_rw_spu_cfg 144 /* Register rw_timer_grp0_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int ext_clk : 3; unsigned int tmr0_en : 2; unsigned int tmr1_en : 2; unsigned int tmr2_en : 2; unsigned int tmr3_en : 2; unsigned int tmr0_dis : 2; unsigned int tmr1_dis : 2; unsigned int tmr2_dis : 2; unsigned int tmr3_dis : 2; unsigned int dummy1 : 13; } reg_iop_sw_cfg_rw_timer_grp0_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp0_cfg 148 #define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp0_cfg 148 /* Register rw_timer_grp1_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int ext_clk : 3; unsigned int tmr0_en : 2; unsigned int tmr1_en : 2; unsigned int tmr2_en : 2; unsigned int tmr3_en : 2; unsigned int tmr0_dis : 2; unsigned int tmr1_dis : 2; unsigned int tmr2_dis : 2; unsigned int tmr3_dis : 2; unsigned int dummy1 : 13; } reg_iop_sw_cfg_rw_timer_grp1_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp1_cfg 152 #define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp1_cfg 152 /* Register rw_trigger_grps_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int grp0_dis : 1; unsigned int grp0_en : 1; unsigned int grp1_dis : 1; unsigned int grp1_en : 1; unsigned int grp2_dis : 1; unsigned int grp2_en : 1; unsigned int grp3_dis : 1; unsigned int grp3_en : 1; unsigned int grp4_dis : 1; unsigned int grp4_en : 1; unsigned int grp5_dis : 1; unsigned int grp5_en : 1; unsigned int grp6_dis : 1; unsigned int grp6_en : 1; unsigned int grp7_dis : 1; unsigned int grp7_en : 1; unsigned int dummy1 : 16; } reg_iop_sw_cfg_rw_trigger_grps_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grps_cfg 156 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grps_cfg 156 /* Register rw_pdp_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int out_strb : 4; unsigned int in_src : 2; unsigned int in_size : 3; unsigned int in_last : 2; unsigned int in_strb : 4; unsigned int dummy1 : 17; } reg_iop_sw_cfg_rw_pdp_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_pdp_cfg 160 #define REG_WR_ADDR_iop_sw_cfg_rw_pdp_cfg 160 /* Register rw_sdp_cfg, scope iop_sw_cfg, type rw */ typedef struct { unsigned int sdp_out_strb : 3; unsigned int sdp_in_data : 3; unsigned int sdp_in_last : 2; unsigned int sdp_in_strb : 3; unsigned int dummy1 : 21; } reg_iop_sw_cfg_rw_sdp_cfg; #define REG_RD_ADDR_iop_sw_cfg_rw_sdp_cfg 164 #define REG_WR_ADDR_iop_sw_cfg_rw_sdp_cfg 164 /* Constants */ enum { regk_iop_sw_cfg_a = 0x00000001, regk_iop_sw_cfg_b = 0x00000002, regk_iop_sw_cfg_bus = 0x00000000, regk_iop_sw_cfg_bus_rot16 = 0x00000002, regk_iop_sw_cfg_bus_rot24 = 0x00000003, regk_iop_sw_cfg_bus_rot8 = 0x00000001, regk_iop_sw_cfg_clk12 = 0x00000000, regk_iop_sw_cfg_cpu = 0x00000000, regk_iop_sw_cfg_gated_clk0 = 0x0000000e, regk_iop_sw_cfg_gated_clk1 = 0x0000000f, regk_iop_sw_cfg_gio0 = 0x00000004, regk_iop_sw_cfg_gio1 = 0x00000001, regk_iop_sw_cfg_gio2 = 0x00000005, regk_iop_sw_cfg_gio3 = 0x00000002, regk_iop_sw_cfg_gio4 = 0x00000006, regk_iop_sw_cfg_gio5 = 0x00000003, regk_iop_sw_cfg_gio6 = 0x00000007, regk_iop_sw_cfg_gio7 = 0x00000004, regk_iop_sw_cfg_gio_in18 = 0x00000002, regk_iop_sw_cfg_gio_in19 = 0x00000003, regk_iop_sw_cfg_gio_in20 = 0x00000004, regk_iop_sw_cfg_gio_in21 = 0x00000005, regk_iop_sw_cfg_gio_in26 = 0x00000006, regk_iop_sw_cfg_gio_in27 = 0x00000007, regk_iop_sw_cfg_gio_in4 = 0x00000000, regk_iop_sw_cfg_gio_in5 = 0x00000001, regk_iop_sw_cfg_last_timer_grp0_tmr2 = 0x00000001, regk_iop_sw_cfg_last_timer_grp1_tmr2 = 0x00000002, regk_iop_sw_cfg_last_timer_grp1_tmr3 = 0x00000003, regk_iop_sw_cfg_mpu = 0x00000001, regk_iop_sw_cfg_none = 0x00000000, regk_iop_sw_cfg_pdp_out = 0x00000001, regk_iop_sw_cfg_pdp_out_hi = 0x00000001, regk_iop_sw_cfg_pdp_out_lo = 0x00000000, regk_iop_sw_cfg_rw_bus_mask_default = 0x00000000, regk_iop_sw_cfg_rw_bus_oe_mask_default = 0x00000000, regk_iop_sw_cfg_rw_bus_out_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_crc_par_owner_default = 0x00000000, regk_iop_sw_cfg_rw_dmc_in_owner_default = 0x00000000, regk_iop_sw_cfg_rw_dmc_out_owner_default = 0x00000000, regk_iop_sw_cfg_rw_fifo_in_extra_owner_default = 0x00000000, regk_iop_sw_cfg_rw_fifo_in_owner_default = 0x00000000, regk_iop_sw_cfg_rw_fifo_out_extra_owner_default = 0x00000000, regk_iop_sw_cfg_rw_fifo_out_owner_default = 0x00000000, regk_iop_sw_cfg_rw_gio_mask_default = 0x00000000, regk_iop_sw_cfg_rw_gio_oe_mask_default = 0x00000000, regk_iop_sw_cfg_rw_gio_out_grp0_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_gio_out_grp1_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_gio_out_grp2_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_gio_out_grp3_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_gio_out_grp4_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_gio_out_grp5_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_gio_out_grp6_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_gio_out_grp7_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_pdp_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_pinmapping_default = 0x00555555, regk_iop_sw_cfg_rw_sap_in_owner_default = 0x00000000, regk_iop_sw_cfg_rw_sap_out_owner_default = 0x00000000, regk_iop_sw_cfg_rw_scrc_in_owner_default = 0x00000000, regk_iop_sw_cfg_rw_scrc_out_owner_default = 0x00000000, regk_iop_sw_cfg_rw_sdp_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_spu_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_spu_owner_default = 0x00000000, regk_iop_sw_cfg_rw_timer_grp0_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_timer_grp0_owner_default = 0x00000000, regk_iop_sw_cfg_rw_timer_grp1_cfg_default = 0x00000000, regk_iop_sw_cfg_rw_timer_grp1_owner_default = 0x00000000, regk_iop_sw_cfg_rw_trigger_grp0_owner_default = 0x00000000, regk_iop_sw_cfg_rw_trigger_grp1_owner_default = 0x00000000, regk_iop_sw_cfg_rw_trigger_grp2_owner_default = 0x00000000, regk_iop_sw_cfg_rw_trigger_grp3_owner_default = 0x00000000, regk_iop_sw_cfg_rw_trigger_grp4_owner_default = 0x00000000, regk_iop_sw_cfg_rw_trigger_grp5_owner_default = 0x00000000, regk_iop_sw_cfg_rw_trigger_grp6_owner_default = 0x00000000, regk_iop_sw_cfg_rw_trigger_grp7_owner_default = 0x00000000, regk_iop_sw_cfg_rw_trigger_grps_cfg_default = 0x00000000, regk_iop_sw_cfg_sdp_out = 0x00000004, regk_iop_sw_cfg_size16 = 0x00000002, regk_iop_sw_cfg_size24 = 0x00000003, regk_iop_sw_cfg_size32 = 0x00000004, regk_iop_sw_cfg_size8 = 0x00000001, regk_iop_sw_cfg_spu = 0x00000002, regk_iop_sw_cfg_spu_bus_out0_hi = 0x00000002, regk_iop_sw_cfg_spu_bus_out0_lo = 0x00000002, regk_iop_sw_cfg_spu_bus_out1_hi = 0x00000003, regk_iop_sw_cfg_spu_bus_out1_lo = 0x00000003, regk_iop_sw_cfg_spu_g0 = 0x00000007, regk_iop_sw_cfg_spu_g1 = 0x00000007, regk_iop_sw_cfg_spu_g2 = 0x00000007, regk_iop_sw_cfg_spu_g3 = 0x00000007, regk_iop_sw_cfg_spu_g4 = 0x00000007, regk_iop_sw_cfg_spu_g5 = 0x00000007, regk_iop_sw_cfg_spu_g6 = 0x00000007, regk_iop_sw_cfg_spu_g7 = 0x00000007, regk_iop_sw_cfg_spu_gio0 = 0x00000000, regk_iop_sw_cfg_spu_gio1 = 0x00000001, regk_iop_sw_cfg_spu_gio5 = 0x00000005, regk_iop_sw_cfg_spu_gio6 = 0x00000006, regk_iop_sw_cfg_spu_gio7 = 0x00000007, regk_iop_sw_cfg_spu_gio_out0 = 0x00000008, regk_iop_sw_cfg_spu_gio_out1 = 0x00000009, regk_iop_sw_cfg_spu_gio_out2 = 0x0000000a, regk_iop_sw_cfg_spu_gio_out3 = 0x0000000b, regk_iop_sw_cfg_spu_gio_out4 = 0x0000000c, regk_iop_sw_cfg_spu_gio_out5 = 0x0000000d, regk_iop_sw_cfg_spu_gio_out6 = 0x0000000e, regk_iop_sw_cfg_spu_gio_out7 = 0x0000000f, regk_iop_sw_cfg_spu_gioout0 = 0x00000000, regk_iop_sw_cfg_spu_gioout1 = 0x00000000, regk_iop_sw_cfg_spu_gioout10 = 0x00000007, regk_iop_sw_cfg_spu_gioout11 = 0x00000007, regk_iop_sw_cfg_spu_gioout12 = 0x00000007, regk_iop_sw_cfg_spu_gioout13 = 0x00000007, regk_iop_sw_cfg_spu_gioout14 = 0x00000007, regk_iop_sw_cfg_spu_gioout15 = 0x00000007, regk_iop_sw_cfg_spu_gioout16 = 0x00000007, regk_iop_sw_cfg_spu_gioout17 = 0x00000007, regk_iop_sw_cfg_spu_gioout18 = 0x00000007, regk_iop_sw_cfg_spu_gioout19 = 0x00000007, regk_iop_sw_cfg_spu_gioout2 = 0x00000001, regk_iop_sw_cfg_spu_gioout20 = 0x00000007, regk_iop_sw_cfg_spu_gioout21 = 0x00000007, regk_iop_sw_cfg_spu_gioout22 = 0x00000007, regk_iop_sw_cfg_spu_gioout23 = 0x00000007, regk_iop_sw_cfg_spu_gioout24 = 0x00000007, regk_iop_sw_cfg_spu_gioout25 = 0x00000007, regk_iop_sw_cfg_spu_gioout26 = 0x00000007, regk_iop_sw_cfg_spu_gioout27 = 0x00000007, regk_iop_sw_cfg_spu_gioout28 = 0x00000007, regk_iop_sw_cfg_spu_gioout29 = 0x00000007, regk_iop_sw_cfg_spu_gioout3 = 0x00000001, regk_iop_sw_cfg_spu_gioout30 = 0x00000007, regk_iop_sw_cfg_spu_gioout31 = 0x00000007, regk_iop_sw_cfg_spu_gioout4 = 0x00000002, regk_iop_sw_cfg_spu_gioout5 = 0x00000002, regk_iop_sw_cfg_spu_gioout6 = 0x00000003, regk_iop_sw_cfg_spu_gioout7 = 0x00000003, regk_iop_sw_cfg_spu_gioout8 = 0x00000007, regk_iop_sw_cfg_spu_gioout9 = 0x00000007, regk_iop_sw_cfg_strb_timer_grp0_tmr0 = 0x00000001, regk_iop_sw_cfg_strb_timer_grp0_tmr1 = 0x00000002, regk_iop_sw_cfg_strb_timer_grp1_tmr0 = 0x00000003, regk_iop_sw_cfg_strb_timer_grp1_tmr1 = 0x00000002, regk_iop_sw_cfg_timer_grp0 = 0x00000000, regk_iop_sw_cfg_timer_grp0_rot = 0x00000001, regk_iop_sw_cfg_timer_grp0_strb0 = 0x00000005, regk_iop_sw_cfg_timer_grp0_strb1 = 0x00000005, regk_iop_sw_cfg_timer_grp0_strb2 = 0x00000005, regk_iop_sw_cfg_timer_grp0_strb3 = 0x00000005, regk_iop_sw_cfg_timer_grp0_tmr0 = 0x00000002, regk_iop_sw_cfg_timer_grp1 = 0x00000000, regk_iop_sw_cfg_timer_grp1_rot = 0x00000001, regk_iop_sw_cfg_timer_grp1_strb0 = 0x00000006, regk_iop_sw_cfg_timer_grp1_strb1 = 0x00000006, regk_iop_sw_cfg_timer_grp1_strb2 = 0x00000006, regk_iop_sw_cfg_timer_grp1_strb3 = 0x00000006, regk_iop_sw_cfg_timer_grp1_tmr0 = 0x00000003, regk_iop_sw_cfg_trig0_0 = 0x00000000, regk_iop_sw_cfg_trig0_1 = 0x00000000, regk_iop_sw_cfg_trig0_2 = 0x00000000, regk_iop_sw_cfg_trig0_3 = 0x00000000, regk_iop_sw_cfg_trig1_0 = 0x00000000, regk_iop_sw_cfg_trig1_1 = 0x00000000, regk_iop_sw_cfg_trig1_2 = 0x00000000, regk_iop_sw_cfg_trig1_3 = 0x00000000, regk_iop_sw_cfg_trig2_0 = 0x00000001, regk_iop_sw_cfg_trig2_1 = 0x00000001, regk_iop_sw_cfg_trig2_2 = 0x00000001, regk_iop_sw_cfg_trig2_3 = 0x00000001, regk_iop_sw_cfg_trig3_0 = 0x00000001, regk_iop_sw_cfg_trig3_1 = 0x00000001, regk_iop_sw_cfg_trig3_2 = 0x00000001, regk_iop_sw_cfg_trig3_3 = 0x00000001, regk_iop_sw_cfg_trig4_0 = 0x00000002, regk_iop_sw_cfg_trig4_1 = 0x00000002, regk_iop_sw_cfg_trig4_2 = 0x00000002, regk_iop_sw_cfg_trig4_3 = 0x00000002, regk_iop_sw_cfg_trig5_0 = 0x00000002, regk_iop_sw_cfg_trig5_1 = 0x00000002, regk_iop_sw_cfg_trig5_2 = 0x00000002, regk_iop_sw_cfg_trig5_3 = 0x00000002, regk_iop_sw_cfg_trig6_0 = 0x00000003, regk_iop_sw_cfg_trig6_1 = 0x00000003, regk_iop_sw_cfg_trig6_2 = 0x00000003, regk_iop_sw_cfg_trig6_3 = 0x00000003, regk_iop_sw_cfg_trig7_0 = 0x00000003, regk_iop_sw_cfg_trig7_1 = 0x00000003, regk_iop_sw_cfg_trig7_2 = 0x00000003, regk_iop_sw_cfg_trig7_3 = 0x00000003 }; #endif /* __iop_sw_cfg_defs_h */
38.38292
79
0.729276
89a09d489ab5e3220b2a02b46573935763977883
148
h
C
TTProject/Classes/TTProjectView.h
soso1617/TTProject
4e5b491947f5907040cff48c61da7da1b7f8774a
[ "MIT" ]
1
2017-05-19T04:39:18.000Z
2017-05-19T04:39:18.000Z
TTProject/Classes/TTProjectView.h
soso1617/TTProject
4e5b491947f5907040cff48c61da7da1b7f8774a
[ "MIT" ]
null
null
null
TTProject/Classes/TTProjectView.h
soso1617/TTProject
4e5b491947f5907040cff48c61da7da1b7f8774a
[ "MIT" ]
null
null
null
// // TTProjectView.h // Pods // // Created by Zhang, Eric X. on 8/3/16. // // #import <UIKit/UIKit.h> @interface TTProjectView : UIView @end
10.571429
40
0.614865
3784ffadf58a071ae840d3cc1ff8c67cc3048664
11,726
h
C
src/target/core/avmm/var_table.h
SolitaryThinker/cascade
f45d8c11f175e81475c8c5af881130671beeae12
[ "BSD-2-Clause" ]
null
null
null
src/target/core/avmm/var_table.h
SolitaryThinker/cascade
f45d8c11f175e81475c8c5af881130671beeae12
[ "BSD-2-Clause" ]
null
null
null
src/target/core/avmm/var_table.h
SolitaryThinker/cascade
f45d8c11f175e81475c8c5af881130671beeae12
[ "BSD-2-Clause" ]
null
null
null
// Copyright 2017-2019 VMware, Inc. // SPDX-License-Identifier: BSD-2-Clause // // The BSD-2 license (the License) set forth below applies to all parts of the // Cascade project. You may not use this file except in compliance with the // License. // // BSD-2 License // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef CASCADE_SRC_TARGET_CORE_AVMM_VAR_TABLE_H #define CASCADE_SRC_TARGET_CORE_AVMM_VAR_TABLE_H #include <cassert> #include <functional> #include <unordered_map> #include "common/bits.h" #include "common/vector.h" #include "verilog/analyze/evaluate.h" #include "verilog/analyze/resolve.h" #include "verilog/ast/ast.h" namespace cascade { template <typename T> class VarTable { public: // Row Type: struct Row { size_t begin; size_t elements; size_t bits_per_element; size_t words_per_element; }; // IO Typedefs: typedef std::function<T(size_t)> Read; typedef std::function<void(size_t, T)> Write; // Iterator Typedefs: typedef typename std::unordered_map<const Identifier*, const Row>::const_iterator const_var_iterator; typedef typename std::unordered_map<const Expression*, const Row>::const_iterator const_expr_iterator; // Constructors: VarTable(); // Configuration Interface: VarTable& set_read(Read read); VarTable& set_write(Write write); // Inserts an element into the table. void insert_var(const Identifier* id); // Inserts an expression into the table. void insert_expr(const Expression* e); // Returns the number of words in the variable segment of the var table. // This includes control variables (eg <there_are_updates>). size_t var_size() const; // Returns the number of words in the expression segment of the var table. size_t expr_size() const; // Returns the total number of entries in both variable and expression segments // of the var table. size_t size() const; // Returns a pointer to an element in the table or end on failure const_var_iterator var_find(const Identifier* id) const; // Returns a pointer to the beginning of the table const_var_iterator var_begin() const; // Returns a pointer ot the end of the table const_var_iterator var_end() const; // Returns a pointer to an element in the table or end on failure const_expr_iterator expr_find(const Expression* e) const; // Returns a pointer to the beginning of the table const_expr_iterator expr_begin() const; // Returns a pointer ot the end of the table const_expr_iterator expr_end() const; // Returns the starting index of this identifier. size_t index(const Identifier* id) const; // Returns the address of the there_are_updates control variable. size_t there_are_updates_index() const; // Returns the address of the apply_update control variable. size_t apply_update_index() const; // Returns the address of the drop_update control variable. size_t drop_update_index() const; // Returns the address of the task control variable. size_t there_were_tasks_index() const; // Returns the address of the resume control variable. size_t resume_index() const; // Returns the address of the reset control variable. size_t reset_index() const; // Returns the address of the done control variable. size_t done_index() const; // Returns the address of the open_loop control variable. size_t open_loop_index() const; // Reserved for debugging size_t debug_index() const; // Reads the value of a control variable T read_control_var(size_t index) const; // Writes the value of a control variable void write_control_var(size_t index, T val); // Reads the value of a variable void read_var(const Identifier* id) const; // Writes the value of a scalar variable void write_var(const Identifier* id, const Bits& val); // Writes the value of an array variable void write_var(const Identifier* id, const Vector<Bits>& val); // Reads the value of an expression T read_expr(const Expression* e) const; // Writes the value of an expression void write_expr(const Expression* e, T val); private: Read read_; Write write_; size_t next_index_; std::unordered_map<const Identifier*, const Row> vtable_; std::unordered_map<const Expression*, const Row> etable_; constexpr size_t bits_per_word() const; }; using VarTable16 = VarTable<uint16_t>; using VarTable32 = VarTable<uint32_t>; using VarTable64 = VarTable<uint64_t>; template <typename T> inline VarTable<T>::VarTable() { next_index_ = 0; } template <typename T> inline VarTable<T>& VarTable<T>::set_read(Read read) { read_ = read; return *this; } template <typename T> inline VarTable<T>& VarTable<T>::set_write(Write write) { write_ = write; return *this; } template <typename T> inline void VarTable<T>::insert_var(const Identifier* id) { assert(var_find(id) == var_end()); Row row; row.begin = next_index_; row.elements = 1; for (auto d : Evaluate().get_arity(id)) { row.elements *= d; } const auto* r = Resolve().get_resolution(id); assert(r != nullptr); row.bits_per_element = std::max(Evaluate().get_width(r), Evaluate().get_width(id)); row.words_per_element = (row.bits_per_element + bits_per_word() - 1) / bits_per_word(); vtable_.insert(std::make_pair(id, row)); next_index_ += (row.elements * row.words_per_element); } template <typename T> inline void VarTable<T>::insert_expr(const Expression* e) { assert(expr_find(e) == expr_end()); Row row; row.begin = expr_size(); row.elements = 1; row.bits_per_element = Evaluate().get_width(e); row.words_per_element = (row.bits_per_element + bits_per_word() - 1) / bits_per_word(); etable_.insert(std::make_pair(e, row)); } template <typename T> inline size_t VarTable<T>::var_size() const { return debug_index() + 1; } template <typename T> inline size_t VarTable<T>::expr_size() const { return etable_.size(); } template <typename T> inline size_t VarTable<T>::size() const { return var_size() + expr_size(); } template <typename T> inline typename VarTable<T>::const_var_iterator VarTable<T>::var_find(const Identifier* id) const { return vtable_.find(id); } template <typename T> inline typename VarTable<T>::const_var_iterator VarTable<T>::var_begin() const { return vtable_.begin(); } template <typename T> inline typename VarTable<T>::const_var_iterator VarTable<T>::var_end() const { return vtable_.end(); } template <typename T> inline typename VarTable<T>::const_expr_iterator VarTable<T>::expr_find(const Expression* e) const { return etable_.find(e); } template <typename T> inline typename VarTable<T>::const_expr_iterator VarTable<T>::expr_begin() const { return etable_.begin(); } template <typename T> inline typename VarTable<T>::const_expr_iterator VarTable<T>::expr_end() const { return etable_.end(); } template <typename T> inline size_t VarTable<T>::index(const Identifier* id) const { const auto itr = vtable_.find(id); assert(itr != vtable_.end()); return itr->second.index_; } template <typename T> inline size_t VarTable<T>::there_are_updates_index() const { return next_index_; } template <typename T> inline size_t VarTable<T>::apply_update_index() const { return next_index_ + 1; } template <typename T> inline size_t VarTable<T>::drop_update_index() const { return next_index_ + 2; } template <typename T> inline size_t VarTable<T>::there_were_tasks_index() const { return next_index_ + 3; } template <typename T> inline size_t VarTable<T>::resume_index() const { return next_index_ + 4; } template <typename T> inline size_t VarTable<T>::reset_index() const { return next_index_ + 5; } template <typename T> inline size_t VarTable<T>::done_index() const { return next_index_ + 6; } template <typename T> inline size_t VarTable<T>::open_loop_index() const { return next_index_ + 7; } template <typename T> inline size_t VarTable<T>::debug_index() const { return next_index_ + 8; } template <typename T> inline T VarTable<T>::read_control_var(size_t index) const { assert(index >= there_are_updates_index()); assert(index <= debug_index()); return read_(index); } template <typename T> inline void VarTable<T>::write_control_var(size_t index, T val) { assert(index >= there_are_updates_index()); assert(index <= debug_index()); write_(index, val); } template <typename T> inline void VarTable<T>::read_var(const Identifier* id) const { const auto itr = vtable_.find(id); assert(itr != vtable_.end()); auto idx = itr->second.begin; for (size_t i = 0; i < itr->second.elements; ++i) { for (size_t j = 0; j < itr->second.words_per_element; ++j) { const volatile auto word = read_(idx); Evaluate().assign_word<T>(id, i, j, word); ++idx; } } } template <typename T> inline void VarTable<T>::write_var(const Identifier* id, const Bits& val) { const auto itr = vtable_.find(id); assert(itr != vtable_.end()); assert(itr->second.elements == 1); auto idx = itr->second.begin; for (size_t j = 0; j < itr->second.words_per_element; ++j) { const volatile auto word = val.read_word<T>(j); write_(idx, word); ++idx; } } template <typename T> inline void VarTable<T>::write_var(const Identifier* id, const Vector<Bits>& val) { const auto itr = vtable_.find(id); assert(itr != vtable_.end()); assert(val.size() == itr->second.elements); auto idx = itr->second.begin; for (size_t i = 0; i < itr->second.elements; ++i) { for (size_t j = 0; j < itr->second.words_per_element; ++j) { const volatile auto word = val[i].read_word<T>(j); write_(idx, word); ++idx; } } } template <typename T> inline T VarTable<T>::read_expr(const Expression* e) const { const auto itr = etable_.find(e); assert(itr != etable_.end()); assert(itr->second.elements == 1); assert(itr->words_per_element == 1); return read_(var_size() + itr->second.begin); } template <typename T> inline void VarTable<T>::write_expr(const Expression* e, T val) { const auto itr = etable_.find(e); assert(itr != etable_.end()); assert(itr->second.elements == 1); assert(itr->second.words_per_element == 1); write_(var_size() + itr->second.begin, val); } template <typename T> inline constexpr size_t VarTable<T>::bits_per_word() const { return 8*sizeof(T); } } // namespace cascade #endif
30.457143
106
0.712263
6082e44e78b3e7fd813e276d2f78f4a70efc4683
6,413
h
C
GELL/Cllib/microceyx.h
c-jullien/lelisp
1fb0968cfdacd4bd0c046e928ab9009e8d0c2837
[ "BSD-2-Clause" ]
13
2020-05-23T22:07:40.000Z
2022-01-12T01:24:36.000Z
GELL/Cllib/microceyx.h
c-jullien/lelisp
1fb0968cfdacd4bd0c046e928ab9009e8d0c2837
[ "BSD-2-Clause" ]
null
null
null
GELL/Cllib/microceyx.h
c-jullien/lelisp
1fb0968cfdacd4bd0c046e928ab9009e8d0c2837
[ "BSD-2-Clause" ]
2
2020-01-09T02:24:52.000Z
2020-04-02T03:58:42.000Z
/* GELL 15.26: include file for the module: "microceyx" */ /* translation done: "Wed June 16 93 18:01:14 " */ /* impure LLM3 predefined */ extern Ptr GIdlink, GIllink, GIfcons, GIevalst; /* LLM3 functions */ extern Ptr GXunbind7(), GXunbind5(), GXunbind3(), GXunbind1(); extern Ptr GXpopja4(), GXpopj9(), GXpopj8(), GXpopj7(); extern Ptr GXpopj6(), GXpopj5(), GXpopj4(), GXpopj3(); extern Ptr GXpopj2(), GXpopj1(), GXpopj0(); /* intern functions */ static Ptr GLmicroceyx_1(), GLmicroceyx_2(), GLmicroceyx_3(), GLmicroceyx_5(); static Ptr GLmicroceyx_6(), GLmicroceyx_8(), GLmicroceyx_10(), GLmicroceyx_11(); static Ptr GLmicroceyx_12(), GLmicroceyx_14(), GLmicroceyx_15(), GLmicroceyx_16(); static Ptr GLmicroceyx_17(), GLmicroceyx_18(), GLmicroceyx_19(), GLmicroceyx_20(); static Ptr GLmicroceyx_21(), GLmicroceyx_22(), GLmicroceyx_23(), GLmicroceyx_24(); static Ptr GLmicroceyx_26(), GLmicroceyx_27(), GLmicroceyx_29(), GLmicroceyx_31(); static Ptr GLmicroceyx_33(), GLmicroceyx_34(), GLmicroceyx_36(), GLmicroceyx_37(); static Ptr GLmicroceyx_38(), GLmicroceyx_40(), GLmicroceyx_41(), GLmicroceyx_42(); static Ptr GLmicroceyx_44(), GLmicroceyx_45(), GLmicroceyx_47(), GLmicroceyx_48(); static Ptr GLmicroceyx_49(), GLmicroceyx_50(), GLmicroceyx_51(), GLmicroceyx_53(); static Ptr GLmicroceyx_54(), GLmicroceyx_55(), GLmicroceyx_56(), GLmicroceyx_58(); static Ptr GLmicroceyx_59(), GLmicroceyx_60(), GLmicroceyx_61(), GLmicroceyx_62(); static Ptr GLmicroceyx_63(), GLmicroceyx_64(), GLmicroceyx_65(), GLmicroceyx_66(); static Ptr GLmicroceyx_67(), GLmicroceyx_69(), GLmicroceyx_71(), GLmicroceyx_72(); static Ptr GLmicroceyx_73(), GLmicroceyx_75(), GLmicroceyx_76(), GLmicroceyx_77(); static Ptr GLmicroceyx_78(), GLmicroceyx_80(), GLmicroceyx_81(), GLmicroceyx_82(); static Ptr GLmicroceyx_84(), GLmicroceyx_85(), GLmicroceyx_87(), GLmicroceyx_88(); static Ptr GLmicroceyx_90(), GLmicroceyx_91(), GLmicroceyx_92(), GLmicroceyx_94(); static Ptr GLmicroceyx_95(), GLmicroceyx_96(), GLmicroceyx_98(), GLmicroceyx_99(); static Ptr GLmicroceyx_100(), GLmicroceyx_101(), GLmicroceyx_102(), GLmicroceyx_104(); static Ptr GLmicroceyx_105(), GLmicroceyx_107(), GLmicroceyx_108(), GLmicroceyx_109(); static Ptr GLmicroceyx_110(), GLmicroceyx_112(), GLmicroceyx_113(), GLmicroceyx_114(); static Ptr GLmicroceyx_115(), GLmicroceyx_116(), GLmicroceyx_118(), GLmicroceyx_119(); static Ptr GLmicroceyx_120(), GLmicroceyx_121(), GLmicroceyx_122(), GLmicroceyx_124(); static Ptr GLmicroceyx_125(), GLmicroceyx_126(), GLmicroceyx_127(), GLmicroceyx_128(); static Ptr GLmicroceyx_129(), GLmicroceyx_130(), GLmicroceyx_132(), GLmicroceyx_133(); static Ptr GLmicroceyx_134(), GLmicroceyx_135(), GLmicroceyx_136(), GLmicroceyx_138(); static Ptr GLmicroceyx_139(), GLmicroceyx_140(), GLmicroceyx_141(), GLmicroceyx_142(); static Ptr GLmicroceyx_143(), GLmicroceyx_144(), GLmicroceyx_146(), GLmicroceyx_148(); static Ptr GLmicroceyx_149(), GLmicroceyx_150(), GLmicroceyx_152(), GLmicroceyx_153(); static Ptr GLmicroceyx_155(), GLmicroceyx_157(), GLmicroceyx_158(), GLmicroceyx_160(); static Ptr GLmicroceyx_161(), GLmicroceyx_162(), GLmicroceyx_164(), GLmicroceyx_165(); static Ptr GLmicroceyx_166(), GLmicroceyx_167(), GLmicroceyx_168(), GLmicroceyx_169(); static Ptr GLmicroceyx_171(), GLmicroceyx_172(), GLmicroceyx_174(), GLmicroceyx_175(); static Ptr GLmicroceyx_176(), GLmicroceyx_178(), GLmicroceyx_179(), GLmicroceyx_180(); static Ptr GLmicroceyx_181(), GLmicroceyx_182(), GLmicroceyx_183(), GLmicroceyx_185(); static Ptr GLmicroceyx_186(), GLmicroceyx_187(), GLmicroceyx_189(), GLmicroceyx_191(); static Ptr GLmicroceyx_192(), GLmicroceyx_193(), GLmicroceyx_195(), GLmicroceyx_197(); static Ptr GLmicroceyx_198(), GLmicroceyx_199(), GLmicroceyx_201(), GLmicroceyx_202(); static Ptr GLmicroceyx_203(), GLmicroceyx_205(), GLmicroceyx_207(), GLmicroceyx_208(); static Ptr GLmicroceyx_209(), GLmicroceyx_210(), GLmicroceyx_211(), GLmicroceyx_212(); static Ptr GLmicroceyx_214(), GLmicroceyx_215(), GLmicroceyx_216(), GLmicroceyx_217(); static Ptr GLmicroceyx_218(), GLmicroceyx_219(), GLmicroceyx_220(), GLmicroceyx_221(); static Ptr GLmicroceyx_222(), GLmicroceyx_223(), GLmicroceyx_224(), GLmicroceyx_225(); static Ptr GLmicroceyx_226(), GLmicroceyx_229(), GLmicroceyx_231(), GLmicroceyx_232(); /* trace functions */ static Ptr GDmicroceyx_233(), GDmicroceyx_234(), GDmicroceyx_235(), GDmicroceyx_236(); static Ptr GDmicroceyx_237(), GDmicroceyx_238(), GDmicroceyx_239(), GDmicroceyx_240(); static Ptr GDmicroceyx_241(), GDmicroceyx_242(), GDmicroceyx_243(), GDmicroceyx_244(); static Ptr GDmicroceyx_245(), GDmicroceyx_246(), GDmicroceyx_247(), GDmicroceyx_248(); static Ptr GDmicroceyx_249(); static Ptr GYmicroceyx[107]; static const char GNmicroceyx[] = "microceyx"; static const char GTmicroceyx[] = "Wed June 16 93 18:01:14 "; static struct GellEntry GWmicroceyx[] = { {GLmicroceyx_21, GDmicroceyx_233, 12}, /* deftclass */ {GLmicroceyx_42, GDmicroceyx_234, 12}, /* defrecord */ {GLmicroceyx_143, GDmicroceyx_235, 2}, /* tclass-namep */ {GLmicroceyx_149, GDmicroceyx_236, 2}, /* record-namep */ {GLmicroceyx_153, GDmicroceyx_237, 2}, /* field-list */ {GLmicroceyx_165, GDmicroceyx_238, 12}, /* defmake */ {GLmicroceyx_172, GDmicroceyx_239, 12}, /* omakeq */ {GLmicroceyx_187, GDmicroceyx_240, 12}, /* ogetq */ {GLmicroceyx_193, GDmicroceyx_241, 12}, /* oputq */ {GLmicroceyx_199, GDmicroceyx_242, 12}, /* omatchq */ {GLmicroceyx_203, GDmicroceyx_243, 12}, /* demethod */ {GLmicroceyx_218, GDmicroceyx_244, 3}, /* send-error */ {GLmicroceyx_220, GDmicroceyx_245, 12}, /* sendq */ {GLmicroceyx_222, GDmicroceyx_246, 12}, /* sendf */ {GLmicroceyx_224, GDmicroceyx_247, 12}, /* sendfq */ {GLmicroceyx_226, GDmicroceyx_248, 5}, /* plink */ {GLmicroceyx_232, GDmicroceyx_249, 12}, /* <=p */ }; struct GellModule GZmicroceyx = { GELLMODULESTAMP, GNmicroceyx, GTmicroceyx, GYmicroceyx, 17, GWmicroceyx};
64.13
86
0.704974
e6b1ca9b83d21c3bb7ead71b428efdda72c3cb01
481
h
C
src/Classes/search/GitHubRepoSearchService.h
highorderbit/code-watch
15e73db9ed86ac4a121be41d6e283ead3c0f81c9
[ "MIT" ]
1
2016-05-09T06:21:09.000Z
2016-05-09T06:21:09.000Z
src/Classes/search/GitHubRepoSearchService.h
highorderbit/code-watch
15e73db9ed86ac4a121be41d6e283ead3c0f81c9
[ "MIT" ]
null
null
null
src/Classes/search/GitHubRepoSearchService.h
highorderbit/code-watch
15e73db9ed86ac4a121be41d6e283ead3c0f81c9
[ "MIT" ]
null
null
null
// // Copyright 2009 High Order Bit, Inc. All rights reserved. // #import <Foundation/Foundation.h> #import "SearchServiceDelegate.h" #import "GitHubService.h" @interface GitHubRepoSearchService : NSObject <SearchService, GitHubServiceDelegate> { NSObject<SearchServiceDelegate> * delegate; GitHubService * gitHubService; } @property (nonatomic, retain) NSObject<SearchServiceDelegate> * delegate; - (id)initWithGitHubService:(GitHubService *)gitHubService; @end
22.904762
73
0.767152
900d3c61a2f0bf49e76ce4ff9bcf18e087892d2f
123
h
C
T_tri.h
whWZH/STLsegment
ea8b6fce5c53e9efca24560175c72fe59d581656
[ "Apache-2.0" ]
null
null
null
T_tri.h
whWZH/STLsegment
ea8b6fce5c53e9efca24560175c72fe59d581656
[ "Apache-2.0" ]
null
null
null
T_tri.h
whWZH/STLsegment
ea8b6fce5c53e9efca24560175c72fe59d581656
[ "Apache-2.0" ]
null
null
null
class T_tri { public: long L0; long L1; long L2; bool inside; bool dele; T_tri(); virtual ~T_tri(); };
10.25
19
0.560976
882b53838ddb50e87d323b3a1700cc6e4f061948
7,358
h
C
thirdparty/geogram/src/lib/geogram/basic/algorithm.h
AmericaMakes/OASIS-marcwang
7aa10040251d7a1b807a773a45d123e1a52faac5
[ "BSD-2-Clause" ]
1
2021-03-07T14:47:09.000Z
2021-03-07T14:47:09.000Z
thirdparty/geogram/src/lib/geogram/basic/algorithm.h
AmericaMakes/OASIS-marcwang
7aa10040251d7a1b807a773a45d123e1a52faac5
[ "BSD-2-Clause" ]
null
null
null
thirdparty/geogram/src/lib/geogram/basic/algorithm.h
AmericaMakes/OASIS-marcwang
7aa10040251d7a1b807a773a45d123e1a52faac5
[ "BSD-2-Clause" ]
1
2021-03-07T00:24:57.000Z
2021-03-07T00:24:57.000Z
/* * Copyright (c) 2012-2014, Bruno Levy * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the ALICE Project-Team nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * If you modify this software, you should include a notice giving the * name of the person performing the modification, the date of modification, * and the reason for such modification. * * Contact: Bruno Levy * * Bruno.Levy@inria.fr * http://www.loria.fr/~levy * * ALICE Project * LORIA, INRIA Lorraine, * Campus Scientifique, BP 239 * 54506 VANDOEUVRE LES NANCY CEDEX * FRANCE * */ #ifndef GEOGRAM_BASIC_ALGORITHM #define GEOGRAM_BASIC_ALGORITHM #include <geogram/basic/common.h> #if defined(GEO_OS_LINUX) && defined(GEO_OPENMP) #if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 4) && !defined(GEO_OS_ANDROID) #include <parallel/algorithm> #define GEO_USE_GCC_PARALLEL_STL #endif #elif defined(GEO_OS_WINDOWS) #if (_MSC_VER >= 1700) #include <ppl.h> #define GEO_USE_MSVC_PARALLEL_STL #endif #endif #include <algorithm> /** * \file geogram/basic/algorithm.h * \brief Wrappers around parallel implementation of STL */ namespace GEO { /** * \brief Checks whether parallel algorithms are used. * \details Some algorithms such as sort() can be used * in parallel or sequential mode. Behavior is toggled * by the "algo:parallel" environment variable. * \retval true if parallel algorithms are used. * \retval false if sequential algorithms are used. */ bool GEOGRAM_API uses_parallel_algorithm(); /** * \brief Sorts elements in parallel * \details Sorts elements in the iterator range [\p begin..\p end) using * a parallel version of the standard \c std::sort() algorithm (if * possible). The elements are compared using operator<(). * Whether to use the parallel or the standard version of the std::sort() * algorithm is controlled by the "algo:parallel" environment property. * \param[in] begin first element to sort * \param[in] end one position past the last element to sort * \tparam ITERATOR the type of the iterator * \see uses_parallel_algorithm() */ template <typename ITERATOR> inline void sort( const ITERATOR& begin, const ITERATOR& end ) { if(uses_parallel_algorithm()) { #if defined(GEO_USE_GCC_PARALLEL_STL) __gnu_parallel::sort(begin, end); #elif defined(GEO_USE_MSVC_PARALLEL_STL) concurrency::parallel_sort(begin, end); #else std::sort(begin, end); #endif } else { std::sort(begin, end); } } /** * \brief Sorts elements in parallel * \details Sorts elements in the iterator range [\p begin..\p end) using * a parallel version of the standard \c std::sort() algorithm (if * possible). The elements are compared using comparator \p cmp. * Comparator \p cmp must implement an operator() with the following * signature: * \code * bool operator(T a, T b) const; * \endcode * Whether to use the parallel or the standard version of the std::sort() * algorithm is controlled by the "algo:parallel" environment property. * \param[in] begin first element to sort * \param[in] end one position past the last element to sort * \param[in] cmp comparison object. * \tparam ITERATOR the type of the iterator * \tparam CMP the type of the comparator * \see uses_parallel_algorithm() */ template <typename ITERATOR, typename CMP> inline void sort( const ITERATOR& begin, const ITERATOR& end, const CMP& cmp ) { if(uses_parallel_algorithm()) { #if defined(GEO_USE_GCC_PARALLEL_STL) __gnu_parallel::sort(begin, end, cmp); #elif defined(GEO_USE_MSVC_PARALLEL_STL) concurrency::parallel_sort(begin, end, cmp); #else std::sort(begin, end, cmp); #endif } else { std::sort(begin, end, cmp); } } /** * \brief Sorts a vector and suppresses all duplicated elements. * \param[in,out] v the vector */ template <typename VECTOR> inline void sort_unique(VECTOR& v) { std::sort(v.begin(), v.end()); // Note that std::unique leaves a 'queue' of duplicated elements // at the end of the vector, and returns an iterator that // indicates where to stop. v.erase( std::unique(v.begin(), v.end()), v.end() ); } /** * \brief Specialized sort routine for 3 elements. * \details std::sort is slower than specialized sort on small sequences * of elements. * \param[in] items a random access iterator iterator to the first element. */ template <typename ITERATOR> inline void sort_3(ITERATOR items) { if (items[0]> items[1]) { std::swap(items[0], items[1]); } if (items[1]> items[2]) { std::swap(items[1], items[2]); } if (items[0]> items[1]) { std::swap(items[0], items[1]); } } /** * \brief Specialized sort routine for 4 elements. * \details std::sort is slower than specialized sort on small sequences * of elements. * \param[in] items a random access iterator iterator to the first element. */ template <typename ITERATOR> inline void sort_4(ITERATOR items) { if (items[1] < items[0]) { std::swap(items[0], items[1]); } if (items[3] < items[2]) { std::swap(items[2], items[3]); } if (items[2] < items[0]) { std::swap(items[0], items[2]); std::swap(items[1], items[3]); } if (items[2] < items[1]) { std::swap(items[1], items[2]); } if (items[3] < items[2]) { std::swap(items[2], items[3]); } } } #endif
35.205742
80
0.646371
111c25e510b3fd5758e1c2cd8886be0e79c1f472
1,284
c
C
Divide and Conquer/Median of Two Sorted Array/SolutionByXkcdjerry.c
rajethanm4/Programmers-Community
d16083eb0e84403159d999d4d1a8bbf652ca51f6
[ "MIT" ]
8
2020-11-07T10:29:21.000Z
2020-12-26T16:54:13.000Z
Divide and Conquer/Median of Two Sorted Array/SolutionByXkcdjerry.c
rajethanm4/Programmers-Community
d16083eb0e84403159d999d4d1a8bbf652ca51f6
[ "MIT" ]
null
null
null
Divide and Conquer/Median of Two Sorted Array/SolutionByXkcdjerry.c
rajethanm4/Programmers-Community
d16083eb0e84403159d999d4d1a8bbf652ca51f6
[ "MIT" ]
2
2019-12-18T13:06:19.000Z
2021-01-05T18:47:18.000Z
#include <stdio.h> #include <stdlib.h> #include <string.h> int *p1,*p2,size1,size2; void merge_and_throw(register int **p1,register int **p2,register int n) { register int i; for(i=0;i<n;i++) { if(**p1<**p2) { (*p1)++; } else { (*p2)++; } } } void merge_even(int *p1,int *p2) { merge_and_throw(&p1,&p2,(size1+size2)/2-1); printf("%.1f",(*p1+*p2)/2.0); } void merge_odd(int *p1,int *p2) { merge_and_throw(&p1,&p2,(size1+size2)/2); if(*p1<*p2) printf("%d",*p1); else printf("%d",*p2); } int* safealloc(int n) { int size=sizeof(int)*(n+1); int *p=malloc(size); // some more space can't be bad :) if(p==NULL) { printf("Bad alloc!"); abort(); } memset(p,0x3f3f3f3f,size); return p; } void read(int *p,int size) { int i; for(i=0;i<size;i++) { scanf("%d",p+i); } } int main() { scanf("%d",&size1); p1=safealloc(size1); read(p1,size1); scanf("%d",&size2); p2=safealloc(size2); read(p2,size2); if((size1+size2)&1) { merge_odd(p1,p2); } else { merge_even(p1,p2); } return 0; }
18.342857
73
0.466511
1f359d458ca7d56723d5a46a7f0452f917870cc9
31,633
c
C
01_Develop/libXMKode/Source/xm_kode.c
mcodegeeks/OpenKODE-Framework
d4382d781da7f488a0e7667362a89e8e389468dd
[ "MIT" ]
2
2017-08-03T07:15:00.000Z
2018-06-18T10:32:53.000Z
01_Develop/libXMKode/Source/xm_kode.c
mcodegeeks/OpenKODE-Framework
d4382d781da7f488a0e7667362a89e8e389468dd
[ "MIT" ]
null
null
null
01_Develop/libXMKode/Source/xm_kode.c
mcodegeeks/OpenKODE-Framework
d4382d781da7f488a0e7667362a89e8e389468dd
[ "MIT" ]
2
2019-03-04T22:57:42.000Z
2020-03-06T01:32:26.000Z
/* -------------------------------------------------------------------------- * * File xm_kode.c * Description XMKode APIs ( Windowing, Application Entrance ) * Author Y.H Mun * * -------------------------------------------------------------------------- * * Copyright (C) 2010-2012 XMSoft. All rights reserved. * * Contact Email: xmsoft77@gmail.com * * -------------------------------------------------------------------------- * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * * -------------------------------------------------------------------------- */ #include "kd_library.h" #include "platform.h" KDdouble g_interval = 0; KDint g_width = 0; KDint g_height = 0; KDfloat g_scale = 1; KDint g_provider = 0; static KDuint l_frame_count = 0; static KDuint l_time_elapsed = 0; static KDuint l_time_old = 0; static KDdouble l_fps = 0; static KDuint l_msec = 0; static XMWindow l_window = 0; static KDmode l_mode = 0; static KDCallbackFunc* l_event = 0; static KDbool l_launch = KD_FALSE; static KDbool l_visible = KD_FALSE; static KDbool l_focus = KD_FALSE; static KDTouch l_touches [ KD_TOUCH_MAX ]; static KDuint l_touches_cnt = 0; static const KDchar* l_szApnsMessage = KD_NULL; #ifdef XM_HAS_VIRTUAL_ACCELEROMETER static KDfloat l_accelX = 0.0f; static KDfloat l_accelY = 0.0f; static KDfloat l_accelZ = 0.0f; #endif static const KDfloat l_accelerationStep = 0.1f; static const KDfloat l_minAcceleration = -1.0f; static const KDfloat l_maxAcceleration = 1.0f; #ifndef XM_HAS_PLATFORM_EGL static EGLNativeWindowType l_native_window = 0; static EGLNativeDisplayType l_native_display = 0; static EGLDisplay l_egl_display = 0; static EGLConfig l_egl_config = 0; static EGLSurface l_egl_surface = 0; static EGLContext l_egl_context = 0; static KDvoid xmEGLInit ( KDvoid ) { KDuint i = 0; EGLint major = 0; EGLint minor = 0; EGLint configs = 0; EGLint color_buffer[4]; EGLint config_attrs[32]; EGLint context_attrs[3]; kdLogMessage ( "\n* EGL intializing.\n\n" ); if ( l_mode & XM_SYS_RGB565 ) { color_buffer [ 0 ] = 5; color_buffer [ 1 ] = 6; color_buffer [ 2 ] = 5; color_buffer [ 3 ] = 0; } else { color_buffer [ 0 ] = 8; color_buffer [ 1 ] = 8; color_buffer [ 2 ] = 8; color_buffer [ 3 ] = 8; } i = 0; config_attrs[i++] = EGL_RED_SIZE; config_attrs[i++] = color_buffer[ 0 ]; config_attrs[i++] = EGL_GREEN_SIZE; config_attrs[i++] = color_buffer[ 1 ]; config_attrs[i++] = EGL_BLUE_SIZE; config_attrs[i++] = color_buffer[ 2 ]; config_attrs[i++] = EGL_ALPHA_SIZE; config_attrs[i++] = color_buffer[ 3 ]; config_attrs[i++] = EGL_DEPTH_SIZE; config_attrs[i++] = 16; #if !defined ( Linux ) && !defined ( SHP ) if ( l_mode & XM_SYS_MSAA ) { config_attrs[i++] = EGL_SAMPLE_BUFFERS; config_attrs[i++] = 1; config_attrs[i++] = EGL_SAMPLES; config_attrs[i++] = 2; } #endif config_attrs[i++] = EGL_SURFACE_TYPE; config_attrs[i++] = EGL_WINDOW_BIT; #if !defined ( Platform_Nexus_s3c6410 ) && !defined ( Platform_SiRFPrima_EVB_CE6 ) config_attrs[i++] = EGL_RENDERABLE_TYPE; config_attrs[i++] = l_mode & XM_SYS_GLES_V2 ? EGL_OPENGL_ES2_BIT : EGL_OPENGL_ES_BIT; #endif config_attrs[i++] = EGL_NONE; context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION; context_attrs[1] = l_mode & XM_SYS_GLES_V2 ? 2 : 1; context_attrs[2] = EGL_NONE; #ifndef WINCE eglBindAPI ( EGL_OPENGL_ES_API ); #endif l_egl_display = eglGetDisplay ( l_native_display ); if ( l_egl_display == EGL_NO_DISPLAY ) { kdAssertion ( "eglGetDisplay ( ) failed." ); } if ( !eglInitialize ( l_egl_display, &major, &minor ) ) { kdAssertion ( "eglInitialize ( ) failed." ); } if ( !eglChooseConfig ( l_egl_display, config_attrs, &l_egl_config, 1, &configs ) || ( configs != 1 ) ) { kdAssertion ( "eglChooseConfig ( ) failed." ); return ; } l_egl_context = eglCreateContext ( l_egl_display, l_egl_config, 0, #if defined ( Platform_SiRFPrima_EVB_CE6 ) 0 #else context_attrs #endif ); if ( eglGetError ( ) != EGL_SUCCESS ) { kdAssertion ( "eglCreateContext ( ) failed." ); } l_egl_surface = eglCreateWindowSurface ( l_egl_display, l_egl_config, l_native_window, 0 ); if ( eglGetError ( ) != EGL_SUCCESS ) { kdAssertion ( "eglCreateWindowSurface ( ) failed." ); } eglMakeCurrent ( l_egl_display, l_egl_surface, l_egl_surface, l_egl_context ); if ( eglGetError ( ) != EGL_SUCCESS ) { kdAssertion ( "eglMakeCurrent ( ) failed." ); } } #endif KDEvent* _xmEventNew ( KDvoid ) { KDEvent* event = kdCreateEvent ( ); kdAssert ( event ); return event; } KDvoid _xmEventSend ( const KDEvent* event ) { l_event ( event ); kdDefaultEvent ( event ); } KDvoid _xmEventCreate ( XMWindow window ) { l_window = window; l_launch = KD_FALSE; l_visible = KD_FALSE; l_focus = KD_FALSE; g_width = 0; g_height = 0; kdMemset ( l_touches, 0, sizeof ( KDTouch ) * KD_TOUCH_MAX ); l_touches_cnt = 0; #ifndef XM_HAS_PLATFORM_EGL xmPlatformGetEGLNative ( &l_native_window, &l_native_display ); if ( ( l_mode & XM_SYS_GLES_V1 ) || ( l_mode & XM_SYS_GLES_V2 ) ) { xmEGLInit ( ); } #endif kdLogMessage ( "\n\n" ); l_msec = KD_GET_UST2MSEC; } KDvoid _xmEventDestroy ( KDvoid ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE ) { return; } if ( l_mode & XM_SYS_LOG ) { kdLogMessage ( "KD_EVENT_DESTROY" ); } xmEventDetach ( XM_SYS_MAGNETOMETER ); xmEventDetach ( XM_SYS_ACCELEROMETER ); l_launch = KD_FALSE; event = _xmEventNew ( ); event->type = KD_EVENT_DESTROY; _xmEventSend ( event ); #ifndef XM_HAS_PLATFORM_EGL if ( ( l_mode & XM_SYS_GLES_V1 ) || ( l_mode & XM_SYS_GLES_V2 ) ) { kdLogMessage ( "\n* EGL terninating.\n\n" ); #if !defined ( Linux ) eglSwapBuffers ( l_egl_display, l_egl_surface ); eglMakeCurrent ( l_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); eglTerminate ( l_egl_display ); #endif } #endif kdExit ( 0 ); } KDvoid _xmEventRedraw ( KDvoid ) { KDEvent* event = KD_NULL; KDuint time_delta = 0; KDuint time_new = 0; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } if ( l_mode & XM_SYS_LOG ) { //kdLogMessage ( "KD_EVENT_REDRAW" ); } event = _xmEventNew ( ); event->type = KD_EVENT_REDRAW; _xmEventSend ( event ); #ifndef XM_HAS_PLATFORM_EGL if ( ( l_mode & XM_SYS_GLES_V1 ) || ( l_mode & XM_SYS_GLES_V2 ) ) { eglSwapBuffers ( l_egl_display, l_egl_surface ); } #endif time_new = kdGetTickCount ( ); time_delta = time_new - l_time_old; l_time_old = time_new; l_frame_count++; l_time_elapsed += time_delta; if ( l_time_elapsed >= 1000 ) { l_fps = 1000.0 * l_frame_count / l_time_elapsed; l_time_elapsed = 0; l_frame_count = 0; } } KDvoid _xmEventUpdate ( KDvoid ) { KDEvent* event = KD_NULL; KDuint msec = 0; KDint i; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } // For Notify NMEA State chaged. for ( i = 0; i < 2; i++ ) { if ( xmIsNeededUpdateNMEA ( i == 0 ? KD_TRUE : KD_FALSE ) ) { if ( l_mode & XM_SYS_LOG ) { //kdLogMessagefKHR ( "KD_EVENT_LOCATION : from = %s", i == 0 ? "GPS" : "User" ); } event = _xmEventNew ( ); event->type = KD_EVENT_LOCATION; event->data.value.i = i == 0 ? KD_NMEA_UPDATED_GPS : KD_NMEA_UPDATED_USER; _xmEventSend ( event ); } } msec = KD_GET_UST2MSEC - l_msec; #ifdef XM_HAS_VIRTUAL_ACCELEROMETER if ( l_mode & XM_SYS_ACCELEROMETER ) { static KDuint old_msec; KDuint new_msec = msec; KDuint interval = 1000 / 10; if ( ( new_msec - old_msec ) >= interval || new_msec < old_msec ) { old_msec = new_msec; _xmEventAccelerometer ( l_accelX, l_accelY, l_accelZ ); } } #endif if ( l_mode & XM_SYS_LOG ) { //kdLogMessagefKHR ( "KD_EVENT_UPDATE : msec = %d", msec ); } event = _xmEventNew ( ); event->type = KD_EVENT_UPDATE; event->data.update.msec = msec; _xmEventSend ( event ); } KDvoid _xmEventResize ( KDint width, KDint height ) { KDEvent* event = KD_NULL; g_width = width; g_height = height; if ( !l_launch ) { l_launch = KD_TRUE; if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_CREATE : width = %d, height = %d", width, height ); } event = _xmEventNew ( ); event->type = KD_EVENT_CREATE; event->data.size.width = width; event->data.size.height = height; _xmEventSend ( event ); _xmEventVisible ( 1 ); _xmEventFocus ( 1 ); xmEventAttach ( l_mode ); } else { if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_RESIZE : width = %d, height = %d", width, height ); } event = _xmEventNew ( ); event->type = KD_EVENT_RESIZE; event->data.size.width = width; event->data.size.height = height; _xmEventSend ( event ); } } static KDvoid _xmEventTouchFail ( KDvoid ) { KDEvent* event = KD_NULL; KDTouch touches_post [ KD_TOUCH_MAX ]; KDuint i, post_cnt = 0; for ( i = 0; i < KD_TOUCH_MAX; i++ ) { if ( l_touches [ i ].id != 0 ) { touches_post [ i ] = l_touches [ i ]; touches_post [ i ].timestamp = kdGetTimeUST ( ); kdMemset ( &l_touches [ i ], 0, sizeof ( KDTouch ) ); if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "%s id = %p, x = %3d, y = %3d", post_cnt == 0 ? "KD_EVENT_TOUCH_CANCELLED :" : " ", touches_post [ i ].id, touches_post [ i ].x, touches_post [ i ].y ); } post_cnt++; } } if ( post_cnt ) { event = _xmEventNew ( ); event->type = KD_EVENT_TOUCH_CANCELLED; event->data.touch.touches = touches_post; event->data.touch.count = post_cnt; _xmEventSend ( event ); } } KDvoid _xmEventTouchBegan ( KDTouch* touches, KDuint count ) { KDEvent* event = KD_NULL; KDTouch touches_post [ KD_TOUCH_MAX ]; KDuint i, j, post_cnt = 0; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { kdMemset ( l_touches, 0, sizeof ( KDTouch ) * KD_TOUCH_MAX ); l_touches_cnt = 0; return; } for ( i = 0, j = 0; i < count; i++ ) { if ( l_mode & XM_SYS_QUIT ) { if ( ( ( g_width - 64 ) < touches [ i ].x ) && ( touches [ i ].y < 64 ) ) { kdLogMessage ( "KD_EVENT_SYS_QUIT" ); _xmEventDestroy ( ); return; } } if ( touches [ i ].x < 0 ) { touches [ i ].x = 0; } else if ( touches [ i ].x > g_width ) { touches [ i ].x = g_width; } if ( touches [ i ].y < 0 ) { touches [ i ].y = 0; } else if ( touches [ i ].y > g_height ) { touches [ i ].y = g_height; } touches [ i ].y = g_height - touches [ i ].y; for ( ; j < KD_TOUCH_MAX; j++ ) { if ( touches [ i ].id == l_touches [ j ].id ) { kdLogMessagefKHR ( "KD_EVENT_TOUCH_BEGAN : collided touch id %p", touches [ i ].id ); _xmEventTouchFail ( ); return; } if ( j > l_touches_cnt ) { break; } if ( l_touches [ j ].id == KD_NULL ) { l_touches [ j ].id = touches [ i ].id; l_touches [ j ].prev_x = touches [ i ].x; l_touches [ j ].prev_y = touches [ i ].y; l_touches [ j ].x = touches [ i ].x; l_touches [ j ].y = touches [ i ].y; l_touches [ j ].diff_x = 0; l_touches [ j ].diff_y = 0; l_touches [ j ].timestamp = kdGetTimeUST ( ); l_touches_cnt++; if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "%s id = %p, x = %3d, y = %3d", post_cnt == 0 ? "KD_EVENT_TOUCH_BEGAN :" : " ", touches [ i ].id, touches [ i ].x, touches [ i ].y ); } touches_post [ post_cnt ] = l_touches [ j ]; post_cnt++; break; } } if ( j == KD_TOUCH_MAX ) { kdLogMessagefKHR ( "KD_EVENT_TOUCH_BEGAN : limited touch number less than %d", KD_TOUCH_MAX ); _xmEventTouchFail ( ); return; } } if ( post_cnt ) { event = _xmEventNew ( ); event->type = KD_EVENT_TOUCH_BEGAN; event->data.touch.touches = touches_post; event->data.touch.count = post_cnt; _xmEventSend ( event ); } } KDvoid _xmEventTouchMoved ( KDTouch* touches, KDuint count ) { KDEvent* event = KD_NULL; KDTouch touches_post [ KD_TOUCH_MAX ]; KDuint i, j, post_cnt = 0; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } for ( i = 0; i < count; i++ ) { if ( touches [ i ].x < 0 ) { touches [ i ].x = 0; } else if ( touches [ i ].x > g_width ) { touches [ i ].x = g_width; } if ( touches [ i ].y < 0 ) { touches [ i ].y = 0; } else if ( touches [ i ].y > g_height ) { touches [ i ].y = g_height; } touches [ i ].y = g_height - touches [ i ].y; for ( j = 0; j < l_touches_cnt + 1; j++ ) { if ( touches [ i ].id == l_touches [ j ].id ) { if ( ( touches [ i ].x != l_touches [ j ].x ) || ( touches [ i ].y != l_touches [ j ].y ) ) { l_touches [ j ].prev_x = l_touches [ j ].x; l_touches [ j ].prev_y = l_touches [ j ].y; l_touches [ j ].x = touches [ i ].x; l_touches [ j ].y = touches [ i ].y; l_touches [ j ].diff_x = l_touches [ j ].x - l_touches [ j ].prev_x; l_touches [ j ].diff_y = l_touches [ j ].y - l_touches [ j ].prev_y; l_touches [ j ].timestamp = kdGetTimeUST ( ); if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "%s id = %p, x = %3d, y = %3d", post_cnt == 0 ? "KD_EVENT_TOUCH_MOVED :" : " ", touches [ i ].id, touches [ i ].x, touches [ i ].y ); } touches_post [ post_cnt ] = l_touches [ j ]; post_cnt++; } break; } } if ( j == l_touches_cnt + 1 ) { kdLogMessagefKHR ( "KD_EVENT_TOUCH_MOVED : invalid touch id %p", touches [ i ].id ); _xmEventTouchFail ( ); return; } } if ( post_cnt ) { event = _xmEventNew ( ); event->type = KD_EVENT_TOUCH_MOVED; event->data.touch.touches = touches_post; event->data.touch.count = post_cnt; _xmEventSend ( event ); } } KDvoid _xmEventTouchEnded ( KDTouch* touches, KDuint count ) { KDEvent* event = KD_NULL; KDTouch touches_post [ KD_TOUCH_MAX ]; KDuint i, j, post_cnt = 0; KDbool found = KD_FALSE; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } for ( i = 0; i < count; i++ ) { if ( touches [ i ].x < 0 ) { touches [ i ].x = 0; } else if ( touches [ i ].x > g_width ) { touches [ i ].x = g_width; } if ( touches [ i ].y < 0 ) { touches [ i ].y = 0; } else if ( touches [ i ].y > g_height ) { touches [ i ].y = g_height; } touches [ i ].y = g_height - touches [ i ].y; for ( j = 0; j < l_touches_cnt + 1; j++ ) { if ( touches [ i ].id == l_touches [ j ].id ) { found = KD_TRUE; l_touches [ j ].prev_x = l_touches [ j ].x; l_touches [ j ].prev_y = l_touches [ j ].y; l_touches [ j ].x = touches [ i ].x; l_touches [ j ].y = touches [ i ].y; l_touches [ j ].diff_x = l_touches [ j ].x - l_touches [ j ].prev_x; l_touches [ j ].diff_y = l_touches [ j ].y - l_touches [ j ].prev_y; l_touches [ j ].timestamp = kdGetTimeUST ( ); if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "%s id = %p, x = %3d, y = %3d", post_cnt == 0 ? "KD_EVENT_TOUCH_ENDED :" : " ", touches [ i ].id, touches [ i ].x, touches [ i ].y ); } touches_post [ post_cnt ] = l_touches [ j ]; post_cnt++; if ( l_touches_cnt > 1 ) { l_touches [ j ] = l_touches [ l_touches_cnt - 1 ]; } kdMemset ( &l_touches [ l_touches_cnt - 1 ], 0, sizeof ( KDTouch ) ); l_touches_cnt--; break; } } if ( found == KD_FALSE ) { kdLogMessagefKHR ( "KD_EVENT_TOUCH_ENDED : invalid touch id %p", touches [ i ].id ); _xmEventTouchFail ( ); return; } } if ( post_cnt ) { event = _xmEventNew ( ); event->type = KD_EVENT_TOUCH_ENDED; event->data.touch.touches = touches_post; event->data.touch.count = post_cnt; _xmEventSend ( event ); } } KDvoid _xmEventTouchCancelled ( KDTouch* touches, KDuint count ) { KDEvent* event = KD_NULL; KDTouch touches_post [ KD_TOUCH_MAX ]; KDuint i, j, post_cnt = 0; KDbool found = KD_FALSE; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } for ( i = 0; i < count; i++ ) { if ( touches [ i ].x < 0 ) { touches [ i ].x = 0; } else if ( touches [ i ].x > g_width ) { touches [ i ].x = g_width; } if ( touches [ i ].y < 0 ) { touches [ i ].y = 0; } else if ( touches [ i ].y > g_height ) { touches [ i ].y = g_height; } touches [ i ].y = g_height - touches [ i ].y; for ( j = 0; j < l_touches_cnt + 1; j++ ) { if ( touches [ i ].id == l_touches [ j ].id ) { found = KD_TRUE; l_touches [ j ].prev_x = l_touches [ j ].x; l_touches [ j ].prev_y = l_touches [ j ].y; l_touches [ j ].x = touches [ i ].x; l_touches [ j ].y = touches [ i ].y; l_touches [ j ].diff_x = l_touches [ j ].x - l_touches [ j ].prev_x; l_touches [ j ].diff_y = l_touches [ j ].y - l_touches [ j ].prev_y; l_touches [ j ].timestamp = kdGetTimeUST ( ); if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "%s id = %p, x = %3d, y = %3d", post_cnt == 0 ? "KD_EVENT_TOUCH_CANCELLED :" : " ", touches [ i ].id, touches [ i ].x, touches [ i ].y ); } touches_post [ post_cnt ] = l_touches [ j ]; post_cnt++; if ( l_touches_cnt > 1 ) { l_touches [ j ] = l_touches [ l_touches_cnt - 1 ]; } kdMemset ( &l_touches [ l_touches_cnt - 1 ], 0, sizeof ( KDTouch ) ); l_touches_cnt--; break; } } if ( found == KD_FALSE ) { kdLogMessagefKHR ( "KD_EVENT_TOUCH_CANCELLED : invalid touch id %p", touches [ i ].id ); _xmEventTouchFail ( ); return; } } if ( post_cnt ) { event = _xmEventNew ( ); event->type = KD_EVENT_TOUCH_CANCELLED; event->data.touch.touches = touches_post; event->data.touch.count = post_cnt; _xmEventSend ( event ); } } KDvoid _xmEventMousePressed ( KDint x, KDint y, KDint code ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } event = _xmEventNew ( ); event->type = KD_EVENT_MOUSE_PRESSED; event->data.mouse.x = x; event->data.mouse.y = y; event->data.mouse.code = code; _xmEventSend ( event ); } KDvoid _xmEventMouseReleased ( KDint x, KDint y, KDint code ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } event = _xmEventNew ( ); event->type = KD_EVENT_MOUSE_RELEASED; event->data.mouse.x = x; event->data.mouse.y = y; event->data.mouse.code = code; _xmEventSend ( event ); } KDvoid _xmEventMouseMoved ( KDint x, KDint y ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } event = _xmEventNew ( ); event->type = KD_EVENT_MOUSE_MOVED; event->data.mouse.x = x; event->data.mouse.y = g_height - y; event->data.mouse.code = -1; _xmEventSend ( event ); } KDvoid _xmEventMouseScrolled ( KDint x, KDint y ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } event = _xmEventNew ( ); event->type = KD_EVENT_MOUSE_SCROLLED; event->data.mouse.x = x; event->data.mouse.y = y; event->data.mouse.code = -1; _xmEventSend ( event ); } KDvoid _xmEventKeyReleased ( KDint win_code ) { KDEvent* event = KD_NULL; KDint kd_code = 0; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } #ifdef XM_HAS_PLATFORM_KEYPAD kd_code = xmPlatformGetKeyCode ( win_code ); #else kd_code = win_code; #endif if ( kd_code == 0 ) { return; } if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_KEY_RELEASED : %s", xmGetKeyName ( kd_code ) ); } #ifdef XM_HAS_VIRTUAL_ACCELEROMETER if ( l_mode & XM_SYS_ACCELEROMETER ) { switch ( kd_code ) { case KD_INPUT_GAMEKEYS_LEFT : l_accelX = KD_CLAMP ( l_minAcceleration, l_maxAcceleration, l_accelX - l_accelerationStep ); break; case KD_INPUT_GAMEKEYS_RIGHT : l_accelX = KD_CLAMP ( l_minAcceleration, l_maxAcceleration, l_accelX + l_accelerationStep ); break; case KD_INPUT_GAMEKEYS_UP : l_accelY = KD_CLAMP ( l_minAcceleration, l_maxAcceleration, l_accelY + l_accelerationStep ); break; case KD_INPUT_GAMEKEYS_DOWN : l_accelY = KD_CLAMP ( l_minAcceleration, l_maxAcceleration, l_accelY - l_accelerationStep ); break; case KD_INPUT_XMSOFT_PERIOD : l_accelZ = KD_CLAMP ( l_minAcceleration, l_maxAcceleration, l_accelZ + l_accelerationStep ); break; case KD_INPUT_XMSOFT_COMMA : l_accelZ = KD_CLAMP ( l_minAcceleration, l_maxAcceleration, l_accelZ - l_accelerationStep ); break; case KD_INPUT_GAMEKEYS_FIRE : l_accelX = 0; l_accelY = 0; l_accelZ = 0; break; } } #endif event = _xmEventNew ( ); event->type = KD_EVENT_KEY_RELEASED; event->data.keypad.code = kd_code; _xmEventSend ( event ); if ( kd_code & KD_IOGROUP_GAMEKEYS ) { kd_code += 0x0100; if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_KEY_RELEASED : %s", xmGetKeyName ( kd_code ) ); } event = _xmEventNew ( ); event->type = KD_EVENT_KEY_RELEASED; event->data.keypad.code = kd_code; _xmEventSend ( event ); } } KDvoid _xmEventKeyPressed ( KDint win_code ) { KDEvent* event = KD_NULL; KDint kd_code = 0; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } #ifdef XM_HAS_PLATFORM_KEYPAD kd_code = xmPlatformGetKeyCode ( win_code ); #else kd_code = win_code; #endif if ( kd_code == 0 ) { return; } if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_KEY_PRESSED : %s", xmGetKeyName ( kd_code ) ); } event = _xmEventNew ( ); event->type = KD_EVENT_KEY_PRESSED; event->data.keypad.code = kd_code; _xmEventSend ( event ); if ( kd_code & KD_IOGROUP_GAMEKEYS ) { kd_code += 0x0100; if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_KEY_PRESSED : %s", xmGetKeyName ( kd_code ) ); } event = _xmEventNew ( ); event->type = KD_EVENT_KEY_PRESSED; event->data.keypad.code = kd_code; _xmEventSend ( event ); } } KDvoid _xmEventMagnetometer ( KDEventMagnetometer magnetometer ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } if ( l_mode & XM_SYS_LOG ) { // kdLogMessagefKHR ( "KD_EVENT_MAGNETOMETER : azimuth = %.2f, pitch = %.2f, roll = %.2f, x = %.2f, y = %.2f, z = %.2f", // magnetometer.azimuth, magnetometer.pitch, magnetometer.roll, magnetometer.x, magnetometer.y, magnetometer.z ); } event = _xmEventNew ( ); event->type = KD_EVENT_MAGNETOMETER; event->data.magnetometer = magnetometer; _xmEventSend ( event ); } KDvoid _xmEventAccelerometer ( KDfloat x, KDfloat y, KDfloat z ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } if ( l_mode & XM_SYS_LOG ) { // kdLogMessagefKHR ( "KD_EVENT_ACCELEROMETER : x = %.2f, y = %.2f, z = %.2f", x, y, z ); } event = _xmEventNew ( ); event->type = KD_EVENT_ACCELEROMETER; event->data.accelerometer.x = x; event->data.accelerometer.y = y; event->data.accelerometer.z = z; _xmEventSend ( event ); } KDvoid _xmEventInsertText ( const KDchar* text, KDsize len ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } event = _xmEventNew ( ); event->type = KD_EVENT_INSERT_TEXT; kdStrncpy_s ( event->data.insert.utf8, 8, text, len ); if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_INSERT_TEXT : %s", event->data.insert.utf8 ); } _xmEventSend ( event ); } KDvoid _xmEventFocus ( KDbool state ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE ) { l_focus = KD_FALSE; return; } if ( l_focus == state ) { return; } l_focus = state; if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_FOCUS : state = %d", state ); } event = _xmEventNew ( ); event->type = KD_EVENT_FOCUS; event->data.value.i = state; _xmEventSend ( event ); } KDvoid _xmEventProvider ( KDint provider ) { KDEvent* event = KD_NULL; g_provider = provider; if ( l_launch == KD_FALSE ) { return; } if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_PROVIDER : provider = %d", provider ); } event = _xmEventNew ( ); event->type = KD_EVENT_PROVIDER; event->data.value.i = provider; _xmEventSend ( event ); } KDvoid _xmEventVisible ( KDbool state ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE ) { l_visible = KD_FALSE; return; } if ( l_visible == state ) { return; } l_visible = state; if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_VISIBLE : state = %d", state ); } event = _xmEventNew ( ); event->type = KD_EVENT_VISIBLE; event->data.value.i = state; _xmEventSend ( event ); xmSoundAutoPause ( state ); } KDvoid _xmEventMemoryWarning ( KDvoid ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE ) { return; } if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_MEMORY_WARNING" ); } event = _xmEventNew ( ); event->type = KD_EVENT_MEMORY_WARNING; _xmEventSend ( event ); } KDvoid _xmEventCompleted ( KDint type, KDvoid* userptr ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE ) { return; } if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_COMPLETED : type = %d, userptr = %p", type, userptr ); } event = _xmEventNew ( ); event->type = KD_EVENT_COMPLETED; event->data.completed.type = type; event->data.completed.userptr = userptr; _xmEventSend ( event ); } KDvoid _xmEventImeNotification ( KDint status, KDRect begin, KDRect end, KDfloat duration ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } if ( l_mode & XM_SYS_LOG ) { kdLogMessagefKHR ( "KD_EVENT_IME_NOTIFICATION : status = %d, begin ( %.2f, %.2f, %.2f, %.2f ), end ( %.2f, %.2f, %.2f, %.2f ), duration = %.2f", status, begin.x, begin.y, begin.w, begin.h, end.x, end.y, end.w, end.h, duration ); } event = _xmEventNew ( ); event->type = KD_EVENT_IME_NOTIFICATION; event->data.imenotify.status = status; event->data.imenotify.begin = begin; event->data.imenotify.end = end; event->data.imenotify.duration = duration; _xmEventSend ( event ); } /* CS Smart Game event */ KDvoid _xmEventPointing ( KDint x, KDint y ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } event = _xmEventNew ( ); event->type = KD_EVENT_POINTING; event->data.pointing.x = x; event->data.pointing.y = y; if ( l_mode & XM_SYS_LOG ) { // kdLogMessagefKHR ( "KD_EVENT_POINTING : %.2f, %.2f", x, y ); } _xmEventSend ( event ); } KDvoid _xmEventQuaternion ( KDint q1, KDint q2, KDint q3, KDint q4 ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } event = _xmEventNew ( ); event->type = KD_EVENT_QUATERNION; event->data.quaternion.q1 = q1; event->data.quaternion.q2 = q2; event->data.quaternion.q3 = q3; event->data.quaternion.q4 = q4; if ( l_mode & XM_SYS_LOG ) { // kdLogMessagefKHR ( "KD_EVENT_QUATERNION : %.2f, %.2f, %.2f, %.2f", q1, q2, q3, q4 ); } _xmEventSend ( event ); } KDvoid _xmEventEuler ( KDfloat roll, KDfloat pitch, KDfloat yaw ) { KDEvent* event = KD_NULL; if ( l_launch == KD_FALSE || l_visible == KD_FALSE ) { return; } event = _xmEventNew ( ); event->type = KD_EVENT_EULER; event->data.euler.pitch = pitch; event->data.euler.roll = roll; event->data.euler.yaw = yaw; if ( l_mode & XM_SYS_LOG ) { // kdLogMessagefKHR ( "KD_EVENT_EULER : roll = %.2f, pitch = %.2f, yaw = %.2f", roll, pitch, yaw ); } _xmEventSend ( event ); } // xmRealizeWindow : Realize window and ready event loop. KD_API KDvoid KD_APIENTRY xmRealizeWindow ( KDmode mode, KDCallbackFunc* func ) { l_mode = mode; l_event = func; xmSetFrameInterval ( 1 / 60.0 ); xmPlatformRealizeWindow ( mode ); } // xmGetArgc : Get argument count. KD_API KDint KD_APIENTRY xmGetArgc ( KDvoid ) { return g_argc; } // xmGetArgv : Get argument variables. KD_API KDchar** KD_APIENTRY xmGetArgv ( KDvoid ) { return g_argv; } // xmGetWindow : Get window handle. KD_API XMWindow KD_APIENTRY xmGetWindow ( KDvoid ) { return l_window; } // xmGetWindowMode : Get window mode. KD_API KDmode KD_APIENTRY xmGetWindowMode ( KDvoid ) { return l_mode; } // xmSetFrameInterval : Set Frame Interval. // If input value is 0 then no interval timing. KD_API KDvoid KD_APIENTRY xmSetFrameInterval ( KDdouble interval ) { g_interval = interval * 1000; #ifdef XM_HAS_PLATFORM_FRAME_INTERVAL xmPlatformSetFrameInterval ( interval ); #endif } // xmMeasureFramePerSecond : Measure FPS during 1 second. KD_API KDdouble KD_APIENTRY xmMeasureFramePerSecond ( KDvoid ) { return l_fps; } // xmGetTouches : Get touches information. if id exist, hold state. KD_API KDTouch* KD_APIENTRY xmGetTouches ( KDvoid ) { return l_touches; } // xmGetTouchPressedCount : Get pressed touches count. KD_API KDuint KD_APIENTRY xmGetPressedTouchesCount ( KDvoid ) { return l_touches_cnt; } KD_API KDvoid KD_APIENTRY xmSetApnsMessage ( const KDchar* message ) { l_szApnsMessage = message; } KD_API const KDchar* KD_APIENTRY xmGetApnsMessage ( KDvoid ) { return l_szApnsMessage; }
23.589113
152
0.59321
deb5accb2c245b4b588f74920108513af11348a1
2,981
c
C
src/mappers/axrom.c
caseif/cNES
746fd743e404c22fe6152ade60cf9575a0b9c519
[ "MIT" ]
null
null
null
src/mappers/axrom.c
caseif/cNES
746fd743e404c22fe6152ade60cf9575a0b9c519
[ "MIT" ]
5
2019-05-01T14:44:56.000Z
2019-07-10T18:15:41.000Z
src/mappers/axrom.c
caseif/cNES
746fd743e404c22fe6152ade60cf9575a0b9c519
[ "MIT" ]
null
null
null
/* * This file is a part of cNES. * Copyright (c) 2019, Max Roncace <mproncace@gmail.com> * * The MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include "cartridge.h" #include "system.h" #include "c6502/cpu.h" #include "mappers/mappers.h" #include "mappers/nrom.h" #include <assert.h> #include <stdio.h> #include <string.h> #define PRG_BANK_SHIFT 15 #define PRG_BANK_GRANULARITY (1 << PRG_BANK_SHIFT) static unsigned char g_prg_bank; static unsigned char g_nametable; static uint8_t _axrom_ram_read(Cartridge *cart, uint16_t addr) { if (addr < 0x8000) { return system_lower_memory_read(addr); } return cart->prg_rom[((g_prg_bank * PRG_BANK_GRANULARITY) | (addr % PRG_BANK_GRANULARITY)) % cart->prg_size]; } static void _axrom_ram_write(Cartridge *cart, uint16_t addr, uint8_t val) { if (addr < 0x8000) { system_lower_memory_write(addr, val); return; } g_prg_bank = val & 0x7; g_nametable = (val >> 4) & 0x1; } static uint8_t _axrom_vram_read(Cartridge *cart, uint16_t addr) { if (addr >= 0x2000 && addr <= 0x3EFF) { return nrom_vram_read(cart, (addr % 0x800) + (g_nametable ? 0x2800 : 0x2000)); } else { return nrom_vram_read(cart, addr); } } static void _axrom_vram_write(Cartridge *cart, uint16_t addr, uint8_t val) { if (addr >= 0x2000 && addr <= 0x3EFF) { nrom_vram_write(cart, (addr % 0x800) + (g_nametable ? 0x2800 : 0x2000), val); } else { nrom_vram_write(cart, addr, val); } } void mapper_init_axrom(Mapper *mapper, unsigned int submapper_id) { mapper->id = MAPPER_ID_CNROM; memcpy(mapper->name, "AxROM", strlen("AxROM") + 1); mapper->init_func = NULL; mapper->ram_read_func = *_axrom_ram_read; mapper->ram_write_func = *_axrom_ram_write; mapper->vram_read_func = *_axrom_vram_read; mapper->vram_write_func = *_axrom_vram_write; mapper->tick_func = NULL; }
34.662791
113
0.705468
1cb37aeb12dd77e34ecfee86bbecb32f5f799616
630
h
C
Shizuku.Core/Types/Color.h
blackoffee/Shizuku
dde4c4f437ca271181d59a78da2815dee01800eb
[ "MIT" ]
15
2018-12-17T14:17:12.000Z
2022-01-21T16:21:44.000Z
Shizuku.Core/Types/Color.h
blackoffee/InteractiveCFD
dde4c4f437ca271181d59a78da2815dee01800eb
[ "MIT" ]
1
2019-03-03T18:01:11.000Z
2019-03-03T18:20:13.000Z
Shizuku.Core/Types/Color.h
blackoffee/Shizuku
dde4c4f437ca271181d59a78da2815dee01800eb
[ "MIT" ]
4
2018-12-16T20:20:42.000Z
2022-02-19T21:04:49.000Z
#pragma once #include <glm/glm.hpp> #ifdef SHIZUKU_CORE_EXPORTS #define CORE_API __declspec(dllexport) #else #define CORE_API __declspec(dllimport) #endif namespace Shizuku{ namespace Core{ namespace Types{ class Color { private: glm::vec4 m_color; public: Color() { } Color(const glm::vec4& p_rgba) :m_color(p_rgba) { } Color(const glm::uvec4& p_rgba) :m_color(glm::vec4(p_rgba)/255.f) { } const glm::vec4& Value() const { return m_color; } }; } } }
16.578947
51
0.52381
2d909af8a63c4c7ac8c47ce4e5f9a1bb8d3e0f89
1,663
h
C
Frameworks/MediaPlayer.framework/Headers/MPArtworkColorAnalysis.h
CarlAmbroselli/barcelona
9bd087575935485a4c26674c2414d7ef20d7e168
[ "Apache-2.0" ]
13
2021-08-12T22:57:13.000Z
2022-03-09T16:45:52.000Z
Frameworks/MediaPlayer.framework/Headers/MPArtworkColorAnalysis.h
CarlAmbroselli/barcelona
9bd087575935485a4c26674c2414d7ef20d7e168
[ "Apache-2.0" ]
20
2021-09-03T13:38:34.000Z
2022-03-17T13:24:39.000Z
Frameworks/MediaPlayer.framework/Headers/MPArtworkColorAnalysis.h
CarlAmbroselli/barcelona
9bd087575935485a4c26674c2414d7ef20d7e168
[ "Apache-2.0" ]
2
2022-02-13T08:35:11.000Z
2022-03-17T01:56:47.000Z
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <objc/NSObject.h> #import <MediaPlayer/NSCopying-Protocol.h> #import <MediaPlayer/NSMutableCopying-Protocol.h> #import <MediaPlayer/NSSecureCoding-Protocol.h> @class UIColor; @interface MPArtworkColorAnalysis : NSObject { UIColor *_backgroundColor; _Bool _backgroundColorLight; UIColor *_primaryTextColor; _Bool _primaryTextColorLight; UIColor *_secondaryTextColor; _Bool _secondaryTextColorLight; } + (_Bool)supportsSecureCoding; @property(readonly, nonatomic, getter=isSecondaryTextColorLight) _Bool secondaryTextColorLight; // @synthesize secondaryTextColorLight=_secondaryTextColorLight; @property(readonly, nonatomic) UIColor *secondaryTextColor; // @synthesize secondaryTextColor=_secondaryTextColor; @property(readonly, nonatomic, getter=isPrimaryTextColorLight) _Bool primaryTextColorLight; // @synthesize primaryTextColorLight=_primaryTextColorLight; @property(readonly, nonatomic) UIColor *primaryTextColor; // @synthesize primaryTextColor=_primaryTextColor; @property(readonly, nonatomic, getter=isBackgroundColorLight) _Bool backgroundColorLight; // @synthesize backgroundColorLight=_backgroundColorLight; @property(readonly, nonatomic) UIColor *backgroundColor; // @synthesize backgroundColor=_backgroundColor; - (id)_copyWithClass:(Class)arg1; - (id)mutableCopyWithZone:(struct _NSZone *)arg1; - (id)copyWithZone:(struct _NSZone *)arg1; - (void)encodeWithCoder:(id)arg1; - (id)initWithCoder:(id)arg1; - (id)description; @end
39.595238
160
0.794949
bff68e7c9fda3e5d6f42e09d96671120f4d15072
81,882
h
C
src/test/asmjit_test_opcode.h
krig/asmjit
ff05f266435db4a5beff8b1a96b40def85b2954e
[ "Zlib" ]
375
2015-03-03T12:09:07.000Z
2019-01-14T09:22:56.000Z
src/test/asmjit_test_opcode.h
krig/asmjit
ff05f266435db4a5beff8b1a96b40def85b2954e
[ "Zlib" ]
5
2015-07-14T02:48:45.000Z
2016-07-08T08:02:06.000Z
src/test/asmjit_test_opcode.h
krig/asmjit
ff05f266435db4a5beff8b1a96b40def85b2954e
[ "Zlib" ]
103
2015-04-18T10:57:02.000Z
2018-07-29T23:56:12.000Z
// [AsmJit] // Complete x86/x64 JIT and Remote Assembler for C++. // // [License] // Zlib - See LICENSE.md file in the package. // [Guard] #ifndef _TEST_ASMJIT_TEST_OPCODE_H #define _TEST_ASMJIT_TEST_OPCODE_H // [Dependencies] #include "../asmjit/asmjit.h" namespace asmgen { enum { kGenOpCodeInstCount = 2670 }; // Generate all instructions asmjit can emit. static void opcode(asmjit::X86Assembler& a, bool useRex1 = false, bool useRex2 = false) { using namespace asmjit; using namespace asmjit::x86; // Prevent crash when the generated function is called to see disassembly. a.ret(); // All instructions use the following register that can be changed to see if // the `X86Assembler` is properly encoding all possible combinations. If the // `useRexRegs` argument is true the `A` version will in most cases contain // a register having index 8 (if encodable). X86GpReg gLoA = useRex1 ? r8b : al; X86GpReg gLoB = useRex2 ? r9b : bl; X86GpReg gHiA = ah; X86GpReg gHiB = bh; X86GpReg gwA = useRex1 ? r8w : ax; X86GpReg gwB = useRex2 ? r9w : bx; X86GpReg gdA = useRex1 ? r8d : eax; X86GpReg gdB = useRex2 ? r9d : ebx; X86GpReg gzA = useRex1 ? r8 : a.zax; X86GpReg gzB = useRex2 ? r9 : a.zbx; X86GpReg gzC = useRex2 ? r10 : a.zcx; X86GpReg gzD = useRex2 ? r11 : a.zdx; X86FpReg fpA = fp0; X86FpReg fpB = fp7; X86MmReg mmA = mm0; X86MmReg mmB = mm1; X86XmmReg xmmA = useRex1 ? xmm8 : xmm0; X86XmmReg xmmB = useRex2 ? xmm9 : xmm1; X86XmmReg xmmC = useRex2 ? xmm10 : xmm2; X86XmmReg xmmD = useRex2 ? xmm11 : xmm3; X86YmmReg ymmA = useRex1 ? ymm8 : ymm0; X86YmmReg ymmB = useRex2 ? ymm9 : ymm1; X86YmmReg ymmC = useRex2 ? ymm10 : ymm2; X86YmmReg ymmD = useRex2 ? ymm11 : ymm3; X86Mem anyptr_gpA = ptr(gzA); X86Mem anyptr_gpB = ptr(gzB); X86Mem anyptr_gpC = ptr(gzC); X86Mem anyptr_gpD = ptr(gzD); X86Mem intptr_gpA = a.intptr_ptr(gzA); X86Mem intptr_gpB = a.intptr_ptr(gzB); X86Mem vmxptr_gpB = ptr(gzB, xmmB); X86Mem vmyptr_gpB = ptr(gzB, ymmB); // Base. a.adc(gLoA, 1); a.adc(gLoB, 1); a.adc(gHiA, 1); a.adc(gHiB, 1); a.adc(gwA, 1); a.adc(gwB, 1); a.adc(gdA, 1); a.adc(gdB, 1); a.adc(gzA, 1); a.adc(gzA, gzB); a.adc(gzA, intptr_gpB); a.adc(intptr_gpA, 1); a.adc(intptr_gpA, gzB); a.add(gLoA, 1); a.add(gLoB, 1); a.add(gHiA, 1); a.add(gHiB, 1); a.add(gwA, 1); a.add(gwB, 1); a.add(gdA, 1); a.add(gdB, 1); a.add(gzA, 1); a.add(gzA, gzB); a.add(gzA, intptr_gpB); a.add(intptr_gpA, 1); a.add(intptr_gpA, gzB); a.and_(gLoA, 1); a.and_(gLoB, 1); a.and_(gHiA, 1); a.and_(gHiB, 1); a.and_(gwA, 1); a.and_(gwB, 1); a.and_(gdA, 1); a.and_(gdB, 1); a.and_(gzA, 1); a.and_(gzA, gzB); a.and_(gzA, intptr_gpB); a.and_(intptr_gpA, 1); a.and_(intptr_gpA, gzB); a.bswap(gzA); a.bt(gzA, 1); a.bt(gzA, gzB); a.bt(intptr_gpA, 1); a.bt(intptr_gpA, gzB); a.btc(gzA, 1); a.btc(gzA, gzB); a.btc(intptr_gpA, 1); a.btc(intptr_gpA, gzB); a.btr(gzA, 1); a.btr(gzA, gzB); a.btr(intptr_gpA, 1); a.btr(intptr_gpA, gzB); a.bts(gzA, 1); a.bts(gzA, gzB); a.bts(intptr_gpA, 1); a.bts(intptr_gpA, gzB); a.call(gzA); a.call(intptr_gpA); a.cbw(); a.cwde(); a.clc(); a.cld(); a.cmc(); a.cmp(gLoA, 1); a.cmp(gLoB, 1); a.cmp(gHiA, 1); a.cmp(gHiB, 1); a.cmp(gwA, 1); a.cmp(gwB, 1); a.cmp(gdA, 1); a.cmp(gdB, 1); a.cmp(gzA, 1); a.cmp(gzA, gzB); a.cmp(gzA, intptr_gpB); a.cmp(intptr_gpA, 1); a.cmp(intptr_gpA, gzB); a.cmpxchg(gzA, gzB); a.cmpxchg(intptr_gpA, gzB); a.cmpxchg8b(anyptr_gpA); a.cpuid(); a.crc32(gzA, anyptr_gpB); a.dec(gzA); a.dec(intptr_gpA); a.div(gzA); a.div(intptr_gpA); a.idiv(gzA); a.idiv(intptr_gpA); a.imul(gzA); a.imul(intptr_gpA); a.imul(gzA, 1); a.imul(gzA, gzB); a.imul(gzA, gzB, 1); a.imul(gzA, intptr_gpB); a.imul(gzA, intptr_gpB, 1); a.inc(gzA); a.inc(intptr_gpA); a.int3(); a.lea(gzA, intptr_gpB); a.mov(gzA, 1); a.mov(gzA, gzB); a.mov(gzA, intptr_gpB); a.mov(intptr_gpA, 1); a.mov(intptr_gpA, gzB); a.movsx(gzA, gLoB); a.movsx(gzA, byte_ptr(gzB)); a.movzx(gzA, gLoB); a.movzx(gzA, byte_ptr(gzB)); a.movbe(gzA, anyptr_gpB); a.movbe(anyptr_gpA, gzB); a.mul(gzA); a.mul(intptr_gpA); a.neg(gzA); a.neg(intptr_gpA); a.nop(); a.not_(gzA); a.not_(intptr_gpA); a.or_(gLoA, 1); a.or_(gLoB, 1); a.or_(gHiA, 1); a.or_(gHiB, 1); a.or_(gwA, 1); a.or_(gwB, 1); a.or_(gdA, 1); a.or_(gdB, 1); a.or_(gzA, 1); a.or_(gzA, gzB); a.or_(gzA, intptr_gpB); a.or_(intptr_gpA, 1); a.or_(intptr_gpA, gzB); a.pop(gzA); a.pop(intptr_gpA); a.push(gzA); a.push(intptr_gpA); a.push(0); a.rcl(gzA, 0); a.rcl(gzA, 1); a.rcl(gzA, cl); a.rcl(intptr_gpA, 0); a.rcl(intptr_gpA, 1); a.rcl(intptr_gpA, cl); a.rcr(gzA, 0); a.rcr(gzA, 1); a.rcr(gzA, cl); a.rcr(intptr_gpA, 0); a.rcr(intptr_gpA, 1); a.rcr(intptr_gpA, cl); a.rdtsc(); a.rdtscp(); a.ret(); a.ret(0); a.rol(gzA, 0); a.rol(gzA, 1); a.rol(gzA, cl); a.rol(intptr_gpA, 0); a.rol(intptr_gpA, 1); a.rol(intptr_gpA, cl); a.ror(gzA, 0); a.ror(gzA, 1); a.ror(gzA, cl); a.ror(intptr_gpA, 0); a.ror(intptr_gpA, 1); a.ror(intptr_gpA, cl); a.sbb(gLoA, 1); a.sbb(gLoB, 1); a.sbb(gHiA, 1); a.sbb(gHiB, 1); a.sbb(gwA, 1); a.sbb(gwB, 1); a.sbb(gdA, 1); a.sbb(gdB, 1); a.sbb(gzA, 1); a.sbb(gzA, gzB); a.sbb(gzA, intptr_gpB); a.sbb(intptr_gpA, 1); a.sbb(intptr_gpA, gzB); a.sal(gzA, cl); a.sal(gzA, 0); a.sal(gzA, 1); a.sal(intptr_gpA, 0); a.sal(intptr_gpA, 1); a.sal(intptr_gpA, cl); a.sar(gzA, 0); a.sar(gzA, 1); a.sar(gzA, cl); a.sar(intptr_gpA, 0); a.sar(intptr_gpA, 1); a.sar(intptr_gpA, cl); a.shl(gzA, 0); a.shl(gzA, 1); a.shl(gzA, cl); a.shl(intptr_gpA, 0); a.shl(intptr_gpA, 1); a.shl(intptr_gpA, cl); a.shr(gzA, 0); a.shr(gzA, 1); a.shr(gzA, cl); a.shr(intptr_gpA, 0); a.shr(intptr_gpA, 1); a.shr(intptr_gpA, cl); a.shld(gzA, gzB, 0); a.shld(gzA, gzB, cl); a.shld(intptr_gpA, gzB, 0); a.shld(intptr_gpA, gzB, cl); a.shrd(gzA, gzB, 0); a.shrd(gzA, gzB, cl); a.shrd(intptr_gpA, gzB, 0); a.shrd(intptr_gpA, gzB, cl); a.stc(); a.std(); a.sub(gLoA, 1); a.sub(gLoB, 1); a.sub(gHiA, 1); a.sub(gHiB, 1); a.sub(gwA, 1); a.sub(gwB, 1); a.sub(gdA, 1); a.sub(gdB, 1); a.sub(gzA, 1); a.sub(gzA, gzB); a.sub(gzA, intptr_gpB); a.sub(intptr_gpA, 1); a.sub(intptr_gpA, gzB); a.test(gzA, 1); a.test(gzA, gzB); a.test(intptr_gpA, 1); a.test(intptr_gpA, gzB); a.ud2(); a.xadd(gzA, gzB); a.xadd(intptr_gpA, gzB); a.xchg(gzA, gzB); a.xchg(intptr_gpA, gzB); a.xchg(gzA, intptr_gpB); a.xor_(gLoA, 1); a.xor_(gLoB, 1); a.xor_(gHiA, 1); a.xor_(gHiB, 1); a.xor_(gwA, 1); a.xor_(gwB, 1); a.xor_(gdA, 1); a.xor_(gdB, 1); a.xor_(gzA, 1); a.xor_(gzA, gzB); a.xor_(gzA, intptr_gpB); a.xor_(intptr_gpA, 1); a.xor_(intptr_gpA, gzB); a.nop(); a.lodsb(); a.lodsd(); a.lodsw(); a.rep_lodsb(); a.rep_lodsd(); a.rep_lodsw(); a.movsb(); a.movsd(); a.movsw(); a.rep_movsb(); a.rep_movsd(); a.rep_movsw(); a.stosb(); a.stosd(); a.stosw(); a.rep_stosb(); a.rep_stosd(); a.rep_stosw(); a.cmpsb(); a.cmpsd(); a.cmpsw(); a.repe_cmpsb(); a.repe_cmpsd(); a.repe_cmpsw(); a.repne_cmpsb(); a.repne_cmpsd(); a.repne_cmpsw(); a.scasb(); a.scasd(); a.scasw(); a.repe_scasb(); a.repe_scasd(); a.repe_scasw(); a.repne_scasb(); a.repne_scasd(); a.repne_scasw(); // Label...Jcc/Jecxz/Jmp. { a.nop(); Label L(a); a.bind(L); a.ja(L); a.jae(L); a.jb(L); a.jbe(L); a.jc(L); a.je(L); a.jg(L); a.jge(L); a.jl(L); a.jle(L); a.jna(L); a.jnae(L); a.jnb(L); a.jnbe(L); a.jnc(L); a.jne(L); a.jng(L); a.jnge(L); a.jnl(L); a.jnle(L); a.jno(L); a.jnp(L); a.jns(L); a.jnz(L); a.jo(L); a.jp(L); a.jpe(L); a.jpo(L); a.js(L); a.jz(L); a.jecxz(ecx, L); a.jmp(L); } // Jcc/Jecxz/Jmp...Label. { a.nop(); Label L(a); a.ja(L); a.jae(L); a.jb(L); a.jbe(L); a.jc(L); a.je(L); a.jg(L); a.jge(L); a.jl(L); a.jle(L); a.jna(L); a.jnae(L); a.jnb(L); a.jnbe(L); a.jnc(L); a.jne(L); a.jng(L); a.jnge(L); a.jnl(L); a.jnle(L); a.jno(L); a.jnp(L); a.jns(L); a.jnz(L); a.jo(L); a.jp(L); a.jpe(L); a.jpo(L); a.js(L); a.jz(L); a.jecxz(ecx, L); a.jmp(L); a.bind(L); } // Fpu. a.nop(); a.f2xm1(); a.fabs(); a.fadd(fpA, fpB); a.fadd(fpB, fpA); a.fadd(dword_ptr(gzA)); a.fadd(qword_ptr(gzA)); a.faddp(fpB); a.faddp(); a.fbld(dword_ptr(gzA)); a.fbstp(dword_ptr(gzA)); a.fchs(); a.fclex(); a.fcom(fpB); a.fcom(); a.fcom(dword_ptr(gzA)); a.fcom(qword_ptr(gzA)); a.fcomp(fpB); a.fcomp(); a.fcomp(dword_ptr(gzA)); a.fcomp(qword_ptr(gzA)); a.fcompp(); a.fcos(); a.fdecstp(); a.fdiv(fpA, fpB); a.fdiv(fpB, fpA); a.fdiv(dword_ptr(gzA)); a.fdiv(qword_ptr(gzA)); a.fdivp(fpB); a.fdivp(); a.fdivr(fpA, fpB); a.fdivr(fpB, fpA); a.fdivr(dword_ptr(gzA)); a.fdivr(qword_ptr(gzA)); a.fdivrp(fpB); a.fdivrp(); a.fiadd(dword_ptr(gzA)); a.ficom(word_ptr(gzA)); a.ficom(dword_ptr(gzA)); a.ficomp(word_ptr(gzA)); a.ficomp(dword_ptr(gzA)); a.fidiv(word_ptr(gzA)); a.fidiv(dword_ptr(gzA)); a.fidivr(word_ptr(gzA)); a.fidivr(dword_ptr(gzA)); a.fild(word_ptr(gzA)); a.fild(dword_ptr(gzA)); a.fild(qword_ptr(gzA)); a.fimul(word_ptr(gzA)); a.fimul(dword_ptr(gzA)); a.fincstp(); a.finit(); a.fninit(); a.fisub(word_ptr(gzA)); a.fisub(dword_ptr(gzA)); a.fisubr(word_ptr(gzA)); a.fisubr(dword_ptr(gzA)); a.fist(word_ptr(gzA)); a.fist(dword_ptr(gzA)); a.fistp(word_ptr(gzA)); a.fistp(dword_ptr(gzA)); a.fistp(qword_ptr(gzA)); a.fld(dword_ptr(gzA)); a.fld(qword_ptr(gzA)); a.fld(tword_ptr(gzA)); a.fld1(); a.fldl2t(); a.fldl2e(); a.fldpi(); a.fldlg2(); a.fldln2(); a.fldz(); a.fldcw(anyptr_gpA); a.fldenv(anyptr_gpA); a.fmul(fpA, fpB); a.fmul(fpB, fpA); a.fmul(dword_ptr(gzA)); a.fmul(qword_ptr(gzA)); a.fmulp(fpB); a.fmulp(); a.fnclex(); a.fnop(); a.fnsave(anyptr_gpA); a.fnstenv(anyptr_gpA); a.fnstcw(anyptr_gpA); a.fpatan(); a.fprem(); a.fprem1(); a.fptan(); a.frndint(); a.frstor(anyptr_gpA); a.fsave(anyptr_gpA); a.fscale(); a.fsin(); a.fsincos(); a.fsqrt(); a.fst(dword_ptr(gzA)); a.fst(qword_ptr(gzA)); a.fstp(dword_ptr(gzA)); a.fstp(qword_ptr(gzA)); a.fstp(tword_ptr(gzA)); a.fstcw(anyptr_gpA); a.fstenv(anyptr_gpA); a.fsub(fpA, fpB); a.fsub(fpB, fpA); a.fsub(dword_ptr(gzA)); a.fsub(qword_ptr(gzA)); a.fsubp(fpB); a.fsubp(); a.fsubr(fpA, fpB); a.fsubr(fpB, fpA); a.fsubr(dword_ptr(gzA)); a.fsubr(qword_ptr(gzA)); a.fsubrp(fpB); a.fsubrp(); a.ftst(); a.fucom(fpB); a.fucom(); a.fucom(fpB); a.fucomi(fpB); a.fucomip(fpB); a.fucomp(fpB); a.fucompp(); a.fxam(); a.fxrstor(anyptr_gpA); a.fxsave(anyptr_gpA); a.fxtract(); a.fyl2x(); a.fyl2xp1(); // MMX/MMX-EXT. a.nop(); a.movd(anyptr_gpA, mmB); a.movd(gdA, mmB); a.movd(mmA, anyptr_gpB); a.movd(mmA, gdB); a.movq(mmA, mmB); a.movq(anyptr_gpA, mmB); a.movq(mmA, anyptr_gpB); a.packuswb(mmA, mmB); a.packuswb(mmA, anyptr_gpB); a.paddb(mmA, mmB); a.paddb(mmA, anyptr_gpB); a.paddw(mmA, mmB); a.paddw(mmA, anyptr_gpB); a.paddd(mmA, mmB); a.paddd(mmA, anyptr_gpB); a.paddsb(mmA, mmB); a.paddsb(mmA, anyptr_gpB); a.paddsw(mmA, mmB); a.paddsw(mmA, anyptr_gpB); a.paddusb(mmA, mmB); a.paddusb(mmA, anyptr_gpB); a.paddusw(mmA, mmB); a.paddusw(mmA, anyptr_gpB); a.pand(mmA, mmB); a.pand(mmA, anyptr_gpB); a.pandn(mmA, mmB); a.pandn(mmA, anyptr_gpB); a.pcmpeqb(mmA, mmB); a.pcmpeqb(mmA, anyptr_gpB); a.pcmpeqw(mmA, mmB); a.pcmpeqw(mmA, anyptr_gpB); a.pcmpeqd(mmA, mmB); a.pcmpeqd(mmA, anyptr_gpB); a.pcmpgtb(mmA, mmB); a.pcmpgtb(mmA, anyptr_gpB); a.pcmpgtw(mmA, mmB); a.pcmpgtw(mmA, anyptr_gpB); a.pcmpgtd(mmA, mmB); a.pcmpgtd(mmA, anyptr_gpB); a.pmulhw(mmA, mmB); a.pmulhw(mmA, anyptr_gpB); a.pmullw(mmA, mmB); a.pmullw(mmA, anyptr_gpB); a.por(mmA, mmB); a.por(mmA, anyptr_gpB); a.pmaddwd(mmA, mmB); a.pmaddwd(mmA, anyptr_gpB); a.pslld(mmA, mmB); a.pslld(mmA, anyptr_gpB); a.pslld(mmA, 0); a.psllq(mmA, mmB); a.psllq(mmA, anyptr_gpB); a.psllq(mmA, 0); a.psllw(mmA, mmB); a.psllw(mmA, anyptr_gpB); a.psllw(mmA, 0); a.psrad(mmA, mmB); a.psrad(mmA, anyptr_gpB); a.psrad(mmA, 0); a.psraw(mmA, mmB); a.psraw(mmA, anyptr_gpB); a.psraw(mmA, 0); a.psrld(mmA, mmB); a.psrld(mmA, anyptr_gpB); a.psrld(mmA, 0); a.psrlq(mmA, mmB); a.psrlq(mmA, anyptr_gpB); a.psrlq(mmA, 0); a.psrlw(mmA, mmB); a.psrlw(mmA, anyptr_gpB); a.psrlw(mmA, 0); a.psubb(mmA, mmB); a.psubb(mmA, anyptr_gpB); a.psubw(mmA, mmB); a.psubw(mmA, anyptr_gpB); a.psubd(mmA, mmB); a.psubd(mmA, anyptr_gpB); a.psubsb(mmA, mmB); a.psubsb(mmA, anyptr_gpB); a.psubsw(mmA, mmB); a.psubsw(mmA, anyptr_gpB); a.psubusb(mmA, mmB); a.psubusb(mmA, anyptr_gpB); a.psubusw(mmA, mmB); a.psubusw(mmA, anyptr_gpB); a.punpckhbw(mmA, mmB); a.punpckhbw(mmA, anyptr_gpB); a.punpckhwd(mmA, mmB); a.punpckhwd(mmA, anyptr_gpB); a.punpckhdq(mmA, mmB); a.punpckhdq(mmA, anyptr_gpB); a.punpcklbw(mmA, mmB); a.punpcklbw(mmA, anyptr_gpB); a.punpcklwd(mmA, mmB); a.punpcklwd(mmA, anyptr_gpB); a.punpckldq(mmA, mmB); a.punpckldq(mmA, anyptr_gpB); a.pxor(mmA, mmB); a.pxor(mmA, anyptr_gpB); a.emms(); // 3DNOW! a.nop(); a.pf2id(mmA, mmB); a.pf2id(mmA, anyptr_gpB); a.pf2iw(mmA, mmB); a.pf2iw(mmA, anyptr_gpB); a.pfacc(mmA, mmB); a.pfacc(mmA, anyptr_gpB); a.pfadd(mmA, mmB); a.pfadd(mmA, anyptr_gpB); a.pfcmpeq(mmA, mmB); a.pfcmpeq(mmA, anyptr_gpB); a.pfcmpge(mmA, mmB); a.pfcmpge(mmA, anyptr_gpB); a.pfcmpgt(mmA, mmB); a.pfcmpgt(mmA, anyptr_gpB); a.pfmax(mmA, mmB); a.pfmax(mmA, anyptr_gpB); a.pfmin(mmA, mmB); a.pfmin(mmA, anyptr_gpB); a.pfmul(mmA, mmB); a.pfmul(mmA, anyptr_gpB); a.pfnacc(mmA, mmB); a.pfnacc(mmA, anyptr_gpB); a.pfpnacc(mmA, mmB); a.pfpnacc(mmA, anyptr_gpB); a.pfrcp(mmA, mmB); a.pfrcp(mmA, anyptr_gpB); a.pfrcpit1(mmA, mmB); a.pfrcpit1(mmA, anyptr_gpB); a.pfrcpit2(mmA, mmB); a.pfrcpit2(mmA, anyptr_gpB); a.pfrsqit1(mmA, mmB); a.pfrsqit1(mmA, anyptr_gpB); a.pfrsqrt(mmA, mmB); a.pfrsqrt(mmA, anyptr_gpB); a.pfsub(mmA, mmB); a.pfsub(mmA, anyptr_gpB); a.pfsubr(mmA, mmB); a.pfsubr(mmA, anyptr_gpB); a.pi2fd(mmA, mmB); a.pi2fd(mmA, anyptr_gpB); a.pi2fw(mmA, mmB); a.pi2fw(mmA, anyptr_gpB); a.pswapd(mmA, mmB); a.pswapd(mmA, anyptr_gpB); a.prefetch3dnow(anyptr_gpA); a.prefetchw3dnow(anyptr_gpA); a.femms(); // SSE. a.nop(); a.addps(xmmA, xmmB); a.addps(xmmA, anyptr_gpB); a.addss(xmmA, xmmB); a.addss(xmmA, anyptr_gpB); a.andnps(xmmA, xmmB); a.andnps(xmmA, anyptr_gpB); a.andps(xmmA, xmmB); a.andps(xmmA, anyptr_gpB); a.cmpps(xmmA, xmmB, 0); a.cmpps(xmmA, anyptr_gpB, 0); a.cmpss(xmmA, xmmB, 0); a.cmpss(xmmA, anyptr_gpB, 0); a.comiss(xmmA, xmmB); a.comiss(xmmA, anyptr_gpB); a.cvtpi2ps(xmmA, mmB); a.cvtpi2ps(xmmA, anyptr_gpB); a.cvtps2pi(mmA, xmmB); a.cvtps2pi(mmA, anyptr_gpB); a.cvtsi2ss(xmmA, gzB); a.cvtsi2ss(xmmA, anyptr_gpB); a.cvtss2si(gzA, xmmB); a.cvtss2si(gzA, anyptr_gpB); a.cvttps2pi(mmA, xmmB); a.cvttps2pi(mmA, anyptr_gpB); a.cvttss2si(gzA, xmmB); a.cvttss2si(gzA, anyptr_gpB); a.divps(xmmA, xmmB); a.divps(xmmA, anyptr_gpB); a.divss(xmmA, xmmB); a.divss(xmmA, anyptr_gpB); a.ldmxcsr(anyptr_gpA); a.maskmovq(mmA, mmB); a.maxps(xmmA, xmmB); a.maxps(xmmA, anyptr_gpB); a.maxss(xmmA, xmmB); a.maxss(xmmA, anyptr_gpB); a.minps(xmmA, xmmB); a.minps(xmmA, anyptr_gpB); a.minss(xmmA, xmmB); a.minss(xmmA, anyptr_gpB); a.movaps(xmmA, xmmB); a.movaps(xmmA, anyptr_gpB); a.movaps(anyptr_gpA, xmmB); a.movd(anyptr_gpA, xmmB); a.movd(gdA, xmmB); a.movd(xmmA, anyptr_gpB); a.movd(xmmA, gdB); a.movq(mmA, mmB); a.movq(xmmA, xmmB); a.movq(anyptr_gpA, xmmB); a.movq(xmmA, anyptr_gpB); a.movntq(anyptr_gpA, mmB); a.movhlps(xmmA, xmmB); a.movhps(xmmA, anyptr_gpB); a.movhps(anyptr_gpA, xmmB); a.movlhps(xmmA, xmmB); a.movlps(xmmA, anyptr_gpB); a.movlps(anyptr_gpA, xmmB); a.movntps(anyptr_gpA, xmmB); a.movss(xmmA, anyptr_gpB); a.movss(anyptr_gpA, xmmB); a.movups(xmmA, xmmB); a.movups(xmmA, anyptr_gpB); a.movups(anyptr_gpA, xmmB); a.mulps(xmmA, xmmB); a.mulps(xmmA, anyptr_gpB); a.mulss(xmmA, xmmB); a.mulss(xmmA, anyptr_gpB); a.orps(xmmA, xmmB); a.orps(xmmA, anyptr_gpB); a.pavgb(mmA, mmB); a.pavgb(mmA, anyptr_gpB); a.pavgw(mmA, mmB); a.pavgw(mmA, anyptr_gpB); a.pextrw(gzA, mmB, 0); a.pinsrw(mmA, gdB, 0); a.pinsrw(mmA, anyptr_gpB, 0); a.pmaxsw(mmA, mmB); a.pmaxsw(mmA, anyptr_gpB); a.pmaxub(mmA, mmB); a.pmaxub(mmA, anyptr_gpB); a.pminsw(mmA, mmB); a.pminsw(mmA, anyptr_gpB); a.pminub(mmA, mmB); a.pminub(mmA, anyptr_gpB); a.pmovmskb(gzA, mmB); a.pmulhuw(mmA, mmB); a.pmulhuw(mmA, anyptr_gpB); a.psadbw(mmA, mmB); a.psadbw(mmA, anyptr_gpB); a.pshufw(mmA, mmB, 0); a.pshufw(mmA, anyptr_gpB, 0); a.rcpps(xmmA, xmmB); a.rcpps(xmmA, anyptr_gpB); a.rcpss(xmmA, xmmB); a.rcpss(xmmA, anyptr_gpB); a.prefetch(anyptr_gpA, 0); a.psadbw(xmmA, xmmB); a.psadbw(xmmA, anyptr_gpB); a.rsqrtps(xmmA, xmmB); a.rsqrtps(xmmA, anyptr_gpB); a.rsqrtss(xmmA, xmmB); a.rsqrtss(xmmA, anyptr_gpB); a.sfence(); a.shufps(xmmA, xmmB, 0); a.shufps(xmmA, anyptr_gpB, 0); a.sqrtps(xmmA, xmmB); a.sqrtps(xmmA, anyptr_gpB); a.sqrtss(xmmA, xmmB); a.sqrtss(xmmA, anyptr_gpB); a.stmxcsr(anyptr_gpA); a.subps(xmmA, xmmB); a.subps(xmmA, anyptr_gpB); a.subss(xmmA, xmmB); a.subss(xmmA, anyptr_gpB); a.ucomiss(xmmA, xmmB); a.ucomiss(xmmA, anyptr_gpB); a.unpckhps(xmmA, xmmB); a.unpckhps(xmmA, anyptr_gpB); a.unpcklps(xmmA, xmmB); a.unpcklps(xmmA, anyptr_gpB); a.xorps(xmmA, xmmB); a.xorps(xmmA, anyptr_gpB); // SSE2. a.nop(); a.addpd(xmmA, xmmB); a.addpd(xmmA, anyptr_gpB); a.addsd(xmmA, xmmB); a.addsd(xmmA, anyptr_gpB); a.andnpd(xmmA, xmmB); a.andnpd(xmmA, anyptr_gpB); a.andpd(xmmA, xmmB); a.andpd(xmmA, anyptr_gpB); a.clflush(anyptr_gpA); a.cmppd(xmmA, xmmB, 0); a.cmppd(xmmA, anyptr_gpB, 0); a.cmpsd(xmmA, xmmB, 0); a.cmpsd(xmmA, anyptr_gpB, 0); a.comisd(xmmA, xmmB); a.comisd(xmmA, anyptr_gpB); a.cvtdq2pd(xmmA, xmmB); a.cvtdq2pd(xmmA, anyptr_gpB); a.cvtdq2ps(xmmA, xmmB); a.cvtdq2ps(xmmA, anyptr_gpB); a.cvtpd2dq(xmmA, xmmB); a.cvtpd2dq(xmmA, anyptr_gpB); a.cvtpd2pi(mmA, xmmB); a.cvtpd2pi(mmA, anyptr_gpB); a.cvtpd2ps(xmmA, xmmB); a.cvtpd2ps(xmmA, anyptr_gpB); a.cvtpi2pd(xmmA, mmB); a.cvtpi2pd(xmmA, anyptr_gpB); a.cvtps2dq(xmmA, xmmB); a.cvtps2dq(xmmA, anyptr_gpB); a.cvtps2pd(xmmA, xmmB); a.cvtps2pd(xmmA, anyptr_gpB); a.cvtsd2si(gzA, xmmB); a.cvtsd2si(gzA, anyptr_gpB); a.cvtsd2ss(xmmA, xmmB); a.cvtsd2ss(xmmA, anyptr_gpB); a.cvtsi2sd(xmmA, gzB); a.cvtsi2sd(xmmA, anyptr_gpB); a.cvtss2sd(xmmA, xmmB); a.cvtss2sd(xmmA, anyptr_gpB); a.cvtss2si(gzA, xmmB); a.cvtss2si(gzA, anyptr_gpB); a.cvttpd2pi(mmA, xmmB); a.cvttpd2pi(mmA, anyptr_gpB); a.cvttpd2dq(xmmA, xmmB); a.cvttpd2dq(xmmA, anyptr_gpB); a.cvttps2dq(xmmA, xmmB); a.cvttps2dq(xmmA, anyptr_gpB); a.cvttsd2si(gzA, xmmB); a.cvttsd2si(gzA, anyptr_gpB); a.divpd(xmmA, xmmB); a.divpd(xmmA, anyptr_gpB); a.divsd(xmmA, xmmB); a.divsd(xmmA, anyptr_gpB); a.lfence(); a.maskmovdqu(xmmA, xmmB); a.maxpd(xmmA, xmmB); a.maxpd(xmmA, anyptr_gpB); a.maxsd(xmmA, xmmB); a.maxsd(xmmA, anyptr_gpB); a.mfence(); a.minpd(xmmA, xmmB); a.minpd(xmmA, anyptr_gpB); a.minsd(xmmA, xmmB); a.minsd(xmmA, anyptr_gpB); a.movdqa(xmmA, xmmB); a.movdqa(xmmA, anyptr_gpB); a.movdqa(anyptr_gpA, xmmB); a.movdqu(xmmA, xmmB); a.movdqu(xmmA, anyptr_gpB); a.movdqu(anyptr_gpA, xmmB); a.movmskps(gzA, xmmB); a.movmskpd(gzA, xmmB); a.movsd(xmmA, xmmB); a.movsd(xmmA, anyptr_gpB); a.movsd(anyptr_gpA, xmmB); a.movapd(xmmA, anyptr_gpB); a.movapd(anyptr_gpA, xmmB); a.movdq2q(mmA, xmmB); a.movq2dq(xmmA, mmB); a.movhpd(xmmA, anyptr_gpB); a.movhpd(anyptr_gpA, xmmB); a.movlpd(xmmA, anyptr_gpB); a.movlpd(anyptr_gpA, xmmB); a.movntdq(anyptr_gpA, xmmB); a.movnti(anyptr_gpA, gzB); a.movntpd(anyptr_gpA, xmmB); a.movupd(xmmA, anyptr_gpB); a.movupd(anyptr_gpA, xmmB); a.mulpd(xmmA, xmmB); a.mulpd(xmmA, anyptr_gpB); a.mulsd(xmmA, xmmB); a.mulsd(xmmA, anyptr_gpB); a.orpd(xmmA, xmmB); a.orpd(xmmA, anyptr_gpB); a.packsswb(xmmA, xmmB); a.packsswb(xmmA, anyptr_gpB); a.packssdw(xmmA, xmmB); a.packssdw(xmmA, anyptr_gpB); a.packuswb(xmmA, xmmB); a.packuswb(xmmA, anyptr_gpB); a.paddb(xmmA, xmmB); a.paddb(xmmA, anyptr_gpB); a.paddw(xmmA, xmmB); a.paddw(xmmA, anyptr_gpB); a.paddd(xmmA, xmmB); a.paddd(xmmA, anyptr_gpB); a.paddq(mmA, mmB); a.paddq(mmA, anyptr_gpB); a.paddq(xmmA, xmmB); a.paddq(xmmA, anyptr_gpB); a.paddsb(xmmA, xmmB); a.paddsb(xmmA, anyptr_gpB); a.paddsw(xmmA, xmmB); a.paddsw(xmmA, anyptr_gpB); a.paddusb(xmmA, xmmB); a.paddusb(xmmA, anyptr_gpB); a.paddusw(xmmA, xmmB); a.paddusw(xmmA, anyptr_gpB); a.pand(xmmA, xmmB); a.pand(xmmA, anyptr_gpB); a.pandn(xmmA, xmmB); a.pandn(xmmA, anyptr_gpB); a.pause(); a.pavgb(xmmA, xmmB); a.pavgb(xmmA, anyptr_gpB); a.pavgw(xmmA, xmmB); a.pavgw(xmmA, anyptr_gpB); a.pcmpeqb(xmmA, xmmB); a.pcmpeqb(xmmA, anyptr_gpB); a.pcmpeqw(xmmA, xmmB); a.pcmpeqw(xmmA, anyptr_gpB); a.pcmpeqd(xmmA, xmmB); a.pcmpeqd(xmmA, anyptr_gpB); a.pcmpgtb(xmmA, xmmB); a.pcmpgtb(xmmA, anyptr_gpB); a.pcmpgtw(xmmA, xmmB); a.pcmpgtw(xmmA, anyptr_gpB); a.pcmpgtd(xmmA, xmmB); a.pcmpgtd(xmmA, anyptr_gpB); a.pmaxsw(xmmA, xmmB); a.pmaxsw(xmmA, anyptr_gpB); a.pmaxub(xmmA, xmmB); a.pmaxub(xmmA, anyptr_gpB); a.pminsw(xmmA, xmmB); a.pminsw(xmmA, anyptr_gpB); a.pminub(xmmA, xmmB); a.pminub(xmmA, anyptr_gpB); a.pmovmskb(gzA, xmmB); a.pmulhw(xmmA, xmmB); a.pmulhw(xmmA, anyptr_gpB); a.pmulhuw(xmmA, xmmB); a.pmulhuw(xmmA, anyptr_gpB); a.pmullw(xmmA, xmmB); a.pmullw(xmmA, anyptr_gpB); a.pmuludq(mmA, mmB); a.pmuludq(mmA, anyptr_gpB); a.pmuludq(xmmA, xmmB); a.pmuludq(xmmA, anyptr_gpB); a.por(xmmA, xmmB); a.por(xmmA, anyptr_gpB); a.pslld(xmmA, xmmB); a.pslld(xmmA, anyptr_gpB); a.pslld(xmmA, 0); a.psllq(xmmA, xmmB); a.psllq(xmmA, anyptr_gpB); a.psllq(xmmA, 0); a.psllw(xmmA, xmmB); a.psllw(xmmA, anyptr_gpB); a.psllw(xmmA, 0); a.pslldq(xmmA, 0); a.psrad(xmmA, xmmB); a.psrad(xmmA, anyptr_gpB); a.psrad(xmmA, 0); a.psraw(xmmA, xmmB); a.psraw(xmmA, anyptr_gpB); a.psraw(xmmA, 0); a.psubb(xmmA, xmmB); a.psubb(xmmA, anyptr_gpB); a.psubw(xmmA, xmmB); a.psubw(xmmA, anyptr_gpB); a.psubd(xmmA, xmmB); a.psubd(xmmA, anyptr_gpB); a.psubq(mmA, mmB); a.psubq(mmA, anyptr_gpB); a.psubq(xmmA, xmmB); a.psubq(xmmA, anyptr_gpB); a.pmaddwd(xmmA, xmmB); a.pmaddwd(xmmA, anyptr_gpB); a.pshufd(xmmA, xmmB, 0); a.pshufd(xmmA, anyptr_gpB, 0); a.pshufhw(xmmA, xmmB, 0); a.pshufhw(xmmA, anyptr_gpB, 0); a.pshuflw(xmmA, xmmB, 0); a.pshuflw(xmmA, anyptr_gpB, 0); a.psrld(xmmA, xmmB); a.psrld(xmmA, anyptr_gpB); a.psrld(xmmA, 0); a.psrlq(xmmA, xmmB); a.psrlq(xmmA, anyptr_gpB); a.psrlq(xmmA, 0); a.psrldq(xmmA, 0); a.psrlw(xmmA, xmmB); a.psrlw(xmmA, anyptr_gpB); a.psrlw(xmmA, 0); a.psubsb(xmmA, xmmB); a.psubsb(xmmA, anyptr_gpB); a.psubsw(xmmA, xmmB); a.psubsw(xmmA, anyptr_gpB); a.psubusb(xmmA, xmmB); a.psubusb(xmmA, anyptr_gpB); a.psubusw(xmmA, xmmB); a.psubusw(xmmA, anyptr_gpB); a.punpckhbw(xmmA, xmmB); a.punpckhbw(xmmA, anyptr_gpB); a.punpckhwd(xmmA, xmmB); a.punpckhwd(xmmA, anyptr_gpB); a.punpckhdq(xmmA, xmmB); a.punpckhdq(xmmA, anyptr_gpB); a.punpckhqdq(xmmA, xmmB); a.punpckhqdq(xmmA, anyptr_gpB); a.punpcklbw(xmmA, xmmB); a.punpcklbw(xmmA, anyptr_gpB); a.punpcklwd(xmmA, xmmB); a.punpcklwd(xmmA, anyptr_gpB); a.punpckldq(xmmA, xmmB); a.punpckldq(xmmA, anyptr_gpB); a.punpcklqdq(xmmA, xmmB); a.punpcklqdq(xmmA, anyptr_gpB); a.pxor(xmmA, xmmB); a.pxor(xmmA, anyptr_gpB); a.sqrtpd(xmmA, xmmB); a.sqrtpd(xmmA, anyptr_gpB); a.sqrtsd(xmmA, xmmB); a.sqrtsd(xmmA, anyptr_gpB); a.subpd(xmmA, xmmB); a.subpd(xmmA, anyptr_gpB); a.subsd(xmmA, xmmB); a.subsd(xmmA, anyptr_gpB); a.ucomisd(xmmA, xmmB); a.ucomisd(xmmA, anyptr_gpB); a.unpckhpd(xmmA, xmmB); a.unpckhpd(xmmA, anyptr_gpB); a.unpcklpd(xmmA, xmmB); a.unpcklpd(xmmA, anyptr_gpB); a.xorpd(xmmA, xmmB); a.xorpd(xmmA, anyptr_gpB); // SSE3. a.nop(); a.addsubpd(xmmA, xmmB); a.addsubpd(xmmA, anyptr_gpB); a.addsubps(xmmA, xmmB); a.addsubps(xmmA, anyptr_gpB); a.fisttp(dword_ptr(gzA)); a.haddpd(xmmA, xmmB); a.haddpd(xmmA, anyptr_gpB); a.haddps(xmmA, xmmB); a.haddps(xmmA, anyptr_gpB); a.hsubpd(xmmA, xmmB); a.hsubpd(xmmA, anyptr_gpB); a.hsubps(xmmA, xmmB); a.hsubps(xmmA, anyptr_gpB); a.lddqu(xmmA, anyptr_gpB); a.monitor(); a.movddup(xmmA, xmmB); a.movddup(xmmA, anyptr_gpB); a.movshdup(xmmA, xmmB); a.movshdup(xmmA, anyptr_gpB); a.movsldup(xmmA, xmmB); a.movsldup(xmmA, anyptr_gpB); a.mwait(); // SSSE3. a.nop(); a.psignb(mmA, mmB); a.psignb(mmA, anyptr_gpB); a.psignb(xmmA, xmmB); a.psignb(xmmA, anyptr_gpB); a.psignw(mmA, mmB); a.psignw(mmA, anyptr_gpB); a.psignw(xmmA, xmmB); a.psignw(xmmA, anyptr_gpB); a.psignd(mmA, mmB); a.psignd(mmA, anyptr_gpB); a.psignd(xmmA, xmmB); a.psignd(xmmA, anyptr_gpB); a.phaddw(mmA, mmB); a.phaddw(mmA, anyptr_gpB); a.phaddw(xmmA, xmmB); a.phaddw(xmmA, anyptr_gpB); a.phaddd(mmA, mmB); a.phaddd(mmA, anyptr_gpB); a.phaddd(xmmA, xmmB); a.phaddd(xmmA, anyptr_gpB); a.phaddsw(mmA, mmB); a.phaddsw(mmA, anyptr_gpB); a.phaddsw(xmmA, xmmB); a.phaddsw(xmmA, anyptr_gpB); a.phsubw(mmA, mmB); a.phsubw(mmA, anyptr_gpB); a.phsubw(xmmA, xmmB); a.phsubw(xmmA, anyptr_gpB); a.phsubd(mmA, mmB); a.phsubd(mmA, anyptr_gpB); a.phsubd(xmmA, xmmB); a.phsubd(xmmA, anyptr_gpB); a.phsubsw(mmA, mmB); a.phsubsw(mmA, anyptr_gpB); a.phsubsw(xmmA, xmmB); a.phsubsw(xmmA, anyptr_gpB); a.pmaddubsw(mmA, mmB); a.pmaddubsw(mmA, anyptr_gpB); a.pmaddubsw(xmmA, xmmB); a.pmaddubsw(xmmA, anyptr_gpB); a.pabsb(mmA, mmB); a.pabsb(mmA, anyptr_gpB); a.pabsb(xmmA, xmmB); a.pabsb(xmmA, anyptr_gpB); a.pabsw(mmA, mmB); a.pabsw(mmA, anyptr_gpB); a.pabsw(xmmA, xmmB); a.pabsw(xmmA, anyptr_gpB); a.pabsd(mmA, mmB); a.pabsd(mmA, anyptr_gpB); a.pabsd(xmmA, xmmB); a.pabsd(xmmA, anyptr_gpB); a.pmulhrsw(mmA, mmB); a.pmulhrsw(mmA, anyptr_gpB); a.pmulhrsw(xmmA, xmmB); a.pmulhrsw(xmmA, anyptr_gpB); a.pshufb(mmA, mmB); a.pshufb(mmA, anyptr_gpB); a.pshufb(xmmA, xmmB); a.pshufb(xmmA, anyptr_gpB); a.palignr(mmA, mmB, 0); a.palignr(mmA, anyptr_gpB, 0); a.palignr(xmmA, xmmB, 0); a.palignr(xmmA, anyptr_gpB, 0); // SSE4.1. a.nop(); a.blendpd(xmmA, xmmB, 0); a.blendpd(xmmA, anyptr_gpB, 0); a.blendps(xmmA, xmmB, 0); a.blendps(xmmA, anyptr_gpB, 0); a.blendvpd(xmmA, xmmB); a.blendvpd(xmmA, anyptr_gpB); a.blendvps(xmmA, xmmB); a.blendvps(xmmA, anyptr_gpB); a.dppd(xmmA, xmmB, 0); a.dppd(xmmA, anyptr_gpB, 0); a.dpps(xmmA, xmmB, 0); a.dpps(xmmA, anyptr_gpB, 0); a.extractps(gzA, xmmB, 0); a.extractps(anyptr_gpA, xmmB, 0); a.insertps(xmmA, xmmB, 0); a.insertps(xmmA, anyptr_gpB, 0); a.movntdqa(xmmA, anyptr_gpB); a.mpsadbw(xmmA, xmmB, 0); a.mpsadbw(xmmA, anyptr_gpB, 0); a.packusdw(xmmA, xmmB); a.packusdw(xmmA, anyptr_gpB); a.pblendvb(xmmA, xmmB); a.pblendvb(xmmA, anyptr_gpB); a.pblendw(xmmA, xmmB, 0); a.pblendw(xmmA, anyptr_gpB, 0); a.pcmpeqq(xmmA, xmmB); a.pcmpeqq(xmmA, anyptr_gpB); a.pextrb(gzA, xmmB, 0); a.pextrb(anyptr_gpA, xmmB, 0); a.pextrd(gzA, xmmB, 0); a.pextrd(anyptr_gpA, xmmB, 0); a.pextrq(gzA, xmmB, 0); a.pextrq(anyptr_gpA, xmmB, 0); a.pextrw(gzA, xmmB, 0); a.pextrw(anyptr_gpA, xmmB, 0); a.phminposuw(xmmA, xmmB); a.phminposuw(xmmA, anyptr_gpB); a.pinsrb(xmmA, gdB, 0); a.pinsrb(xmmA, anyptr_gpB, 0); a.pinsrd(xmmA, gdB, 0); a.pinsrd(xmmA, anyptr_gpB, 0); a.pinsrw(xmmA, gdB, 0); a.pinsrw(xmmA, anyptr_gpB, 0); a.pmaxuw(xmmA, xmmB); a.pmaxuw(xmmA, anyptr_gpB); a.pmaxsb(xmmA, xmmB); a.pmaxsb(xmmA, anyptr_gpB); a.pmaxsd(xmmA, xmmB); a.pmaxsd(xmmA, anyptr_gpB); a.pmaxud(xmmA, xmmB); a.pmaxud(xmmA, anyptr_gpB); a.pminsb(xmmA, xmmB); a.pminsb(xmmA, anyptr_gpB); a.pminuw(xmmA, xmmB); a.pminuw(xmmA, anyptr_gpB); a.pminud(xmmA, xmmB); a.pminud(xmmA, anyptr_gpB); a.pminsd(xmmA, xmmB); a.pminsd(xmmA, anyptr_gpB); a.pmovsxbw(xmmA, xmmB); a.pmovsxbw(xmmA, anyptr_gpB); a.pmovsxbd(xmmA, xmmB); a.pmovsxbd(xmmA, anyptr_gpB); a.pmovsxbq(xmmA, xmmB); a.pmovsxbq(xmmA, anyptr_gpB); a.pmovsxwd(xmmA, xmmB); a.pmovsxwd(xmmA, anyptr_gpB); a.pmovsxwq(xmmA, xmmB); a.pmovsxwq(xmmA, anyptr_gpB); a.pmovsxdq(xmmA, xmmB); a.pmovsxdq(xmmA, anyptr_gpB); a.pmovzxbw(xmmA, xmmB); a.pmovzxbw(xmmA, anyptr_gpB); a.pmovzxbd(xmmA, xmmB); a.pmovzxbd(xmmA, anyptr_gpB); a.pmovzxbq(xmmA, xmmB); a.pmovzxbq(xmmA, anyptr_gpB); a.pmovzxwd(xmmA, xmmB); a.pmovzxwd(xmmA, anyptr_gpB); a.pmovzxwq(xmmA, xmmB); a.pmovzxwq(xmmA, anyptr_gpB); a.pmovzxdq(xmmA, xmmB); a.pmovzxdq(xmmA, anyptr_gpB); a.pmuldq(xmmA, xmmB); a.pmuldq(xmmA, anyptr_gpB); a.pmulld(xmmA, xmmB); a.pmulld(xmmA, anyptr_gpB); a.ptest(xmmA, xmmB); a.ptest(xmmA, anyptr_gpB); a.roundps(xmmA, xmmB, 0); a.roundps(xmmA, anyptr_gpB, 0); a.roundss(xmmA, xmmB, 0); a.roundss(xmmA, anyptr_gpB, 0); a.roundpd(xmmA, xmmB, 0); a.roundpd(xmmA, anyptr_gpB, 0); a.roundsd(xmmA, xmmB, 0); a.roundsd(xmmA, anyptr_gpB, 0); // SSE4.2. a.nop(); a.pcmpestri(xmmA, xmmB, 0); a.pcmpestri(xmmA, anyptr_gpB, 0); a.pcmpestrm(xmmA, xmmB, 0); a.pcmpestrm(xmmA, anyptr_gpB, 0); a.pcmpistri(xmmA, xmmB, 0); a.pcmpistri(xmmA, anyptr_gpB, 0); a.pcmpistrm(xmmA, xmmB, 0); a.pcmpistrm(xmmA, anyptr_gpB, 0); a.pcmpgtq(xmmA, xmmB); a.pcmpgtq(xmmA, anyptr_gpB); // SSE4a. a.nop(); a.extrq(xmmA, xmmB); a.extrq(xmmA, 0x1, 0x2); a.extrq(xmmB, 0x1, 0x2); a.insertq(xmmA, xmmB); a.insertq(xmmA, xmmB, 0x1, 0x2); a.movntsd(anyptr_gpA, xmmB); a.movntss(anyptr_gpA, xmmB); // POPCNT. a.nop(); a.popcnt(gzA, gzB); a.popcnt(gzA, anyptr_gpB); // AESNI. a.nop(); a.aesdec(xmmA, xmmB); a.aesdec(xmmA, anyptr_gpB); a.aesdeclast(xmmA, xmmB); a.aesdeclast(xmmA, anyptr_gpB); a.aesenc(xmmA, xmmB); a.aesenc(xmmA, anyptr_gpB); a.aesenclast(xmmA, xmmB); a.aesenclast(xmmA, anyptr_gpB); a.aesimc(xmmA, xmmB); a.aesimc(xmmA, anyptr_gpB); a.aeskeygenassist(xmmA, xmmB, 0); a.aeskeygenassist(xmmA, anyptr_gpB, 0); // PCLMULQDQ. a.nop(); a.pclmulqdq(xmmA, xmmB, 0); a.pclmulqdq(xmmA, anyptr_gpB, 0); // XSAVE. a.nop(); a.xgetbv(); a.xsetbv(); a.xsave(anyptr_gpA); a.xsaveopt(anyptr_gpA); a.xrstor(anyptr_gpA); // AVX. a.nop(); a.vaddpd(xmmA, xmmB, xmmC); a.vaddpd(xmmA, xmmB, anyptr_gpC); a.vaddpd(ymmA, ymmB, ymmC); a.vaddpd(ymmA, ymmB, anyptr_gpC); a.vaddps(xmmA, xmmB, xmmC); a.vaddps(xmmA, xmmB, anyptr_gpC); a.vaddps(ymmA, ymmB, ymmC); a.vaddps(ymmA, ymmB, anyptr_gpC); a.vaddsd(xmmA, xmmB, xmmC); a.vaddsd(xmmA, xmmB, anyptr_gpC); a.vaddss(xmmA, xmmB, xmmC); a.vaddss(xmmA, xmmB, anyptr_gpC); a.vaddsubpd(xmmA, xmmB, xmmC); a.vaddsubpd(xmmA, xmmB, anyptr_gpC); a.vaddsubpd(ymmA, ymmB, ymmC); a.vaddsubpd(ymmA, ymmB, anyptr_gpC); a.vaddsubps(xmmA, xmmB, xmmC); a.vaddsubps(xmmA, xmmB, anyptr_gpC); a.vaddsubps(ymmA, ymmB, ymmC); a.vaddsubps(ymmA, ymmB, anyptr_gpC); a.vandpd(xmmA, xmmB, xmmC); a.vandpd(xmmA, xmmB, anyptr_gpC); a.vandpd(ymmA, ymmB, ymmC); a.vandpd(ymmA, ymmB, anyptr_gpC); a.vandps(xmmA, xmmB, xmmC); a.vandps(xmmA, xmmB, anyptr_gpC); a.vandps(ymmA, ymmB, ymmC); a.vandps(ymmA, ymmB, anyptr_gpC); a.vandnpd(xmmA, xmmB, xmmC); a.vandnpd(xmmA, xmmB, anyptr_gpC); a.vandnpd(ymmA, ymmB, ymmC); a.vandnpd(ymmA, ymmB, anyptr_gpC); a.vandnps(xmmA, xmmB, xmmC); a.vandnps(xmmA, xmmB, anyptr_gpC); a.vandnps(ymmA, ymmB, ymmC); a.vandnps(ymmA, ymmB, anyptr_gpC); a.vblendpd(xmmA, xmmB, xmmC, 0); a.vblendpd(xmmA, xmmB, anyptr_gpC, 0); a.vblendpd(ymmA, ymmB, ymmC, 0); a.vblendpd(ymmA, ymmB, anyptr_gpC, 0); a.vblendps(xmmA, xmmB, xmmC, 0); a.vblendps(xmmA, xmmB, anyptr_gpC, 0); a.vblendps(ymmA, ymmB, ymmC, 0); a.vblendps(ymmA, ymmB, anyptr_gpC, 0); a.vblendvpd(xmmA, xmmB, xmmC, xmmD); a.vblendvpd(xmmA, xmmB, anyptr_gpC, xmmD); a.vblendvpd(ymmA, ymmB, ymmC, ymmD); a.vblendvpd(ymmA, ymmB, anyptr_gpC, ymmD); a.vbroadcastf128(ymmA, anyptr_gpB); a.vbroadcastsd(ymmA, anyptr_gpB); a.vbroadcastss(xmmA, anyptr_gpB); a.vbroadcastss(ymmA, anyptr_gpB); a.vcmppd(xmmA, xmmB, xmmC, 0); a.vcmppd(xmmA, xmmB, anyptr_gpC, 0); a.vcmppd(ymmA, ymmB, ymmC, 0); a.vcmppd(ymmA, ymmB, anyptr_gpC, 0); a.vcmpps(xmmA, xmmB, xmmC, 0); a.vcmpps(xmmA, xmmB, anyptr_gpC, 0); a.vcmpps(ymmA, ymmB, ymmC, 0); a.vcmpps(ymmA, ymmB, anyptr_gpC, 0); a.vcmpsd(xmmA, xmmB, xmmC, 0); a.vcmpsd(xmmA, xmmB, anyptr_gpC, 0); a.vcmpss(xmmA, xmmB, xmmC, 0); a.vcmpss(xmmA, xmmB, anyptr_gpC, 0); a.vcomisd(xmmA, xmmB); a.vcomisd(xmmA, anyptr_gpB); a.vcomiss(xmmA, xmmB); a.vcomiss(xmmA, anyptr_gpB); a.vcvtdq2pd(xmmA, xmmB); a.vcvtdq2pd(xmmA, anyptr_gpB); a.vcvtdq2pd(ymmA, xmmB); a.vcvtdq2pd(ymmA, anyptr_gpB); a.vcvtdq2ps(xmmA, xmmB); a.vcvtdq2ps(xmmA, anyptr_gpB); a.vcvtdq2ps(ymmA, ymmB); a.vcvtdq2ps(ymmA, anyptr_gpB); a.vcvtpd2dq(xmmA, xmmB); a.vcvtpd2dq(xmmA, ymmB); a.vcvtpd2dq(xmmA, anyptr_gpB); a.vcvtpd2ps(xmmA, xmmB); a.vcvtpd2ps(xmmA, ymmB); a.vcvtpd2ps(xmmA, anyptr_gpB); a.vcvtps2dq(xmmA, xmmB); a.vcvtps2dq(xmmA, anyptr_gpB); a.vcvtps2dq(ymmA, ymmB); a.vcvtps2dq(ymmA, anyptr_gpB); a.vcvtps2pd(xmmA, xmmB); a.vcvtps2pd(xmmA, anyptr_gpB); a.vcvtps2pd(ymmA, xmmB); a.vcvtps2pd(ymmA, anyptr_gpB); a.vcvtsd2si(gzA, xmmB); a.vcvtsd2si(gzA, anyptr_gpB); a.vcvtsd2ss(xmmA, xmmB, xmmC); a.vcvtsd2ss(xmmA, xmmB, anyptr_gpC); a.vcvtsi2sd(xmmA, xmmB, gzC); a.vcvtsi2sd(xmmA, xmmB, anyptr_gpC); a.vcvtsi2ss(xmmA, xmmB, gzC); a.vcvtsi2ss(xmmA, xmmB, anyptr_gpC); a.vcvtss2sd(xmmA, xmmB, xmmC); a.vcvtss2sd(xmmA, xmmB, anyptr_gpC); a.vcvtss2si(gzA, xmmB); a.vcvtss2si(gzA, anyptr_gpB); a.vcvttpd2dq(xmmA, xmmB); a.vcvttpd2dq(xmmA, ymmB); a.vcvttpd2dq(xmmA, anyptr_gpB); a.vcvttps2dq(xmmA, xmmB); a.vcvttps2dq(xmmA, anyptr_gpB); a.vcvttps2dq(ymmA, ymmB); a.vcvttps2dq(ymmA, anyptr_gpB); a.vcvttsd2si(gzA, xmmB); a.vcvttsd2si(gzA, anyptr_gpB); a.vcvttss2si(gzA, xmmB); a.vcvttss2si(gzA, anyptr_gpB); a.vdivpd(xmmA, xmmB, xmmC); a.vdivpd(xmmA, xmmB, anyptr_gpC); a.vdivpd(ymmA, ymmB, ymmC); a.vdivpd(ymmA, ymmB, anyptr_gpC); a.vdivps(xmmA, xmmB, xmmC); a.vdivps(xmmA, xmmB, anyptr_gpC); a.vdivps(ymmA, ymmB, ymmC); a.vdivps(ymmA, ymmB, anyptr_gpC); a.vdivsd(xmmA, xmmB, xmmC); a.vdivsd(xmmA, xmmB, anyptr_gpC); a.vdivss(xmmA, xmmB, xmmC); a.vdivss(xmmA, xmmB, anyptr_gpC); a.vdppd(xmmA, xmmB, xmmC, 0); a.vdppd(xmmA, xmmB, anyptr_gpC, 0); a.vdpps(xmmA, xmmB, xmmC, 0); a.vdpps(xmmA, xmmB, anyptr_gpC, 0); a.vdpps(ymmA, ymmB, ymmC, 0); a.vdpps(ymmA, ymmB, anyptr_gpC, 0); a.vextractf128(xmmA, ymmB, 0); a.vextractf128(anyptr_gpA, ymmB, 0); a.vextractps(gzA, xmmB, 0); a.vextractps(anyptr_gpA, xmmB, 0); a.vhaddpd(xmmA, xmmB, xmmC); a.vhaddpd(xmmA, xmmB, anyptr_gpC); a.vhaddpd(ymmA, ymmB, ymmC); a.vhaddpd(ymmA, ymmB, anyptr_gpC); a.vhaddps(xmmA, xmmB, xmmC); a.vhaddps(xmmA, xmmB, anyptr_gpC); a.vhaddps(ymmA, ymmB, ymmC); a.vhaddps(ymmA, ymmB, anyptr_gpC); a.vhsubpd(xmmA, xmmB, xmmC); a.vhsubpd(xmmA, xmmB, anyptr_gpC); a.vhsubpd(ymmA, ymmB, ymmC); a.vhsubpd(ymmA, ymmB, anyptr_gpC); a.vhsubps(xmmA, xmmB, xmmC); a.vhsubps(xmmA, xmmB, anyptr_gpC); a.vhsubps(ymmA, ymmB, ymmC); a.vhsubps(ymmA, ymmB, anyptr_gpC); a.vinsertf128(ymmA, ymmB, xmmC, 0); a.vinsertf128(ymmA, ymmB, anyptr_gpC, 0); a.vinsertps(xmmA, xmmB, xmmC, 0); a.vinsertps(xmmA, xmmB, anyptr_gpC, 0); a.vlddqu(xmmA, anyptr_gpB); a.vlddqu(ymmA, anyptr_gpB); a.vldmxcsr(anyptr_gpA); a.vmaskmovdqu(xmmA, xmmB); a.vmaskmovps(xmmA, xmmB, anyptr_gpC); a.vmaskmovps(ymmA, ymmB, anyptr_gpC); a.vmaskmovps(anyptr_gpA, xmmB, xmmC); a.vmaskmovps(anyptr_gpA, ymmB, ymmC); a.vmaskmovpd(xmmA, xmmB, anyptr_gpC); a.vmaskmovpd(ymmA, ymmB, anyptr_gpC); a.vmaskmovpd(anyptr_gpA, xmmB, xmmC); a.vmaskmovpd(anyptr_gpA, ymmB, ymmC); a.vmaxpd(xmmA, xmmB, xmmC); a.vmaxpd(xmmA, xmmB, anyptr_gpC); a.vmaxpd(ymmA, ymmB, ymmC); a.vmaxpd(ymmA, ymmB, anyptr_gpC); a.vmaxps(xmmA, xmmB, xmmC); a.vmaxps(xmmA, xmmB, anyptr_gpC); a.vmaxps(ymmA, ymmB, ymmC); a.vmaxps(ymmA, ymmB, anyptr_gpC); a.vmaxsd(xmmA, xmmB, xmmC); a.vmaxsd(xmmA, xmmB, anyptr_gpC); a.vmaxss(xmmA, xmmB, xmmC); a.vmaxss(xmmA, xmmB, anyptr_gpC); a.vminpd(xmmA, xmmB, xmmC); a.vminpd(xmmA, xmmB, anyptr_gpC); a.vminpd(ymmA, ymmB, ymmC); a.vminpd(ymmA, ymmB, anyptr_gpC); a.vminps(xmmA, xmmB, xmmC); a.vminps(xmmA, xmmB, anyptr_gpC); a.vminps(ymmA, ymmB, ymmC); a.vminps(ymmA, ymmB, anyptr_gpC); a.vminsd(xmmA, xmmB, xmmC); a.vminsd(xmmA, xmmB, anyptr_gpC); a.vminss(xmmA, xmmB, xmmC); a.vminss(xmmA, xmmB, anyptr_gpC); a.vmovapd(xmmA, xmmB); a.vmovapd(xmmA, anyptr_gpB); a.vmovapd(anyptr_gpA, xmmB); a.vmovapd(ymmA, ymmB); a.vmovapd(ymmA, anyptr_gpB); a.vmovapd(anyptr_gpA, ymmB); a.vmovaps(xmmA, xmmB); a.vmovaps(xmmA, anyptr_gpB); a.vmovaps(anyptr_gpA, xmmB); a.vmovaps(ymmA, ymmB); a.vmovaps(ymmA, anyptr_gpB); a.vmovaps(anyptr_gpA, ymmB); a.vmovd(xmmA, gzB); a.vmovd(xmmA, anyptr_gpB); a.vmovd(gzA, xmmB); a.vmovd(anyptr_gpA, xmmB); a.vmovddup(xmmA, xmmB); a.vmovddup(xmmA, anyptr_gpB); a.vmovddup(ymmA, ymmB); a.vmovddup(ymmA, anyptr_gpB); a.vmovdqa(xmmA, xmmB); a.vmovdqa(xmmA, anyptr_gpB); a.vmovdqa(anyptr_gpA, xmmB); a.vmovdqa(ymmA, ymmB); a.vmovdqa(ymmA, anyptr_gpB); a.vmovdqa(anyptr_gpA, ymmB); a.vmovdqu(xmmA, xmmB); a.vmovdqu(xmmA, anyptr_gpB); a.vmovdqu(anyptr_gpA, xmmB); a.vmovdqu(ymmA, ymmB); a.vmovdqu(ymmA, anyptr_gpB); a.vmovdqu(anyptr_gpA, ymmB); a.vmovhlps(xmmA, xmmB, xmmC); a.vmovhpd(xmmA, xmmB, anyptr_gpC); a.vmovhpd(anyptr_gpA, xmmB); a.vmovhps(xmmA, xmmB, anyptr_gpC); a.vmovhps(anyptr_gpA, xmmB); a.vmovlhps(xmmA, xmmB, xmmC); a.vmovlpd(xmmA, xmmB, anyptr_gpC); a.vmovlpd(anyptr_gpA, xmmB); a.vmovlps(xmmA, xmmB, anyptr_gpC); a.vmovlps(anyptr_gpA, xmmB); a.vmovmskpd(gzA, xmmB); a.vmovmskpd(gzA, ymmB); a.vmovmskps(gzA, xmmB); a.vmovmskps(gzA, ymmB); a.vmovntdq(anyptr_gpA, xmmB); a.vmovntdq(anyptr_gpA, ymmB); a.vmovntdqa(xmmA, anyptr_gpB); a.vmovntpd(anyptr_gpA, xmmB); a.vmovntpd(anyptr_gpA, ymmB); a.vmovntps(anyptr_gpA, xmmB); a.vmovntps(anyptr_gpA, ymmB); a.vmovsd(xmmA, xmmB, xmmC); a.vmovsd(xmmA, anyptr_gpB); a.vmovsd(anyptr_gpA, xmmB); a.vmovshdup(xmmA, xmmB); a.vmovshdup(xmmA, anyptr_gpB); a.vmovshdup(ymmA, ymmB); a.vmovshdup(ymmA, anyptr_gpB); a.vmovsldup(xmmA, xmmB); a.vmovsldup(xmmA, anyptr_gpB); a.vmovsldup(ymmA, ymmB); a.vmovsldup(ymmA, anyptr_gpB); a.vmovss(xmmA, xmmB, xmmC); a.vmovss(xmmA, anyptr_gpB); a.vmovss(anyptr_gpA, xmmB); a.vmovupd(xmmA, xmmB); a.vmovupd(xmmA, anyptr_gpB); a.vmovupd(anyptr_gpA, xmmB); a.vmovupd(ymmA, ymmB); a.vmovupd(ymmA, anyptr_gpB); a.vmovupd(anyptr_gpA, ymmB); a.vmovups(xmmA, xmmB); a.vmovups(xmmA, anyptr_gpB); a.vmovups(anyptr_gpA, xmmB); a.vmovups(ymmA, ymmB); a.vmovups(ymmA, anyptr_gpB); a.vmovups(anyptr_gpA, ymmB); a.vmpsadbw(xmmA, xmmB, xmmC, 0); a.vmpsadbw(xmmA, xmmB, anyptr_gpC, 0); a.vmulpd(xmmA, xmmB, xmmC); a.vmulpd(xmmA, xmmB, anyptr_gpC); a.vmulpd(ymmA, ymmB, ymmC); a.vmulpd(ymmA, ymmB, anyptr_gpC); a.vmulps(xmmA, xmmB, xmmC); a.vmulps(xmmA, xmmB, anyptr_gpC); a.vmulps(ymmA, ymmB, ymmC); a.vmulps(ymmA, ymmB, anyptr_gpC); a.vmulsd(xmmA, xmmB, xmmC); a.vmulsd(xmmA, xmmB, anyptr_gpC); a.vmulss(xmmA, xmmB, xmmC); a.vmulss(xmmA, xmmB, anyptr_gpC); a.vorpd(xmmA, xmmB, xmmC); a.vorpd(xmmA, xmmB, anyptr_gpC); a.vorpd(ymmA, ymmB, ymmC); a.vorpd(ymmA, ymmB, anyptr_gpC); a.vorps(xmmA, xmmB, xmmC); a.vorps(xmmA, xmmB, anyptr_gpC); a.vorps(ymmA, ymmB, ymmC); a.vorps(ymmA, ymmB, anyptr_gpC); a.vpabsb(xmmA, xmmB); a.vpabsb(xmmA, anyptr_gpB); a.vpabsd(xmmA, xmmB); a.vpabsd(xmmA, anyptr_gpB); a.vpabsw(xmmA, xmmB); a.vpabsw(xmmA, anyptr_gpB); a.vpackssdw(xmmA, xmmB, xmmC); a.vpackssdw(xmmA, xmmB, anyptr_gpC); a.vpacksswb(xmmA, xmmB, xmmC); a.vpacksswb(xmmA, xmmB, anyptr_gpC); a.vpackusdw(xmmA, xmmB, xmmC); a.vpackusdw(xmmA, xmmB, anyptr_gpC); a.vpackuswb(xmmA, xmmB, xmmC); a.vpackuswb(xmmA, xmmB, anyptr_gpC); a.vpaddb(xmmA, xmmB, xmmC); a.vpaddb(xmmA, xmmB, anyptr_gpC); a.vpaddd(xmmA, xmmB, xmmC); a.vpaddd(xmmA, xmmB, anyptr_gpC); a.vpaddq(xmmA, xmmB, xmmC); a.vpaddq(xmmA, xmmB, anyptr_gpC); a.vpaddw(xmmA, xmmB, xmmC); a.vpaddw(xmmA, xmmB, anyptr_gpC); a.vpaddsb(xmmA, xmmB, xmmC); a.vpaddsb(xmmA, xmmB, anyptr_gpC); a.vpaddsw(xmmA, xmmB, xmmC); a.vpaddsw(xmmA, xmmB, anyptr_gpC); a.vpaddusb(xmmA, xmmB, xmmC); a.vpaddusb(xmmA, xmmB, anyptr_gpC); a.vpaddusw(xmmA, xmmB, xmmC); a.vpaddusw(xmmA, xmmB, anyptr_gpC); a.vpalignr(xmmA, xmmB, xmmC, 0); a.vpalignr(xmmA, xmmB, anyptr_gpC, 0); a.vpand(xmmA, xmmB, xmmC); a.vpand(xmmA, xmmB, anyptr_gpC); a.vpandn(xmmA, xmmB, xmmC); a.vpandn(xmmA, xmmB, anyptr_gpC); a.vpavgb(xmmA, xmmB, xmmC); a.vpavgb(xmmA, xmmB, anyptr_gpC); a.vpavgw(xmmA, xmmB, xmmC); a.vpavgw(xmmA, xmmB, anyptr_gpC); a.vpblendvb(xmmA, xmmB, xmmC, xmmD); a.vpblendvb(xmmA, xmmB, anyptr_gpC, xmmD); a.vpblendw(xmmA, xmmB, xmmC, 0); a.vpblendw(xmmA, xmmB, anyptr_gpC, 0); a.vpcmpeqb(xmmA, xmmB, xmmC); a.vpcmpeqb(xmmA, xmmB, anyptr_gpC); a.vpcmpeqd(xmmA, xmmB, xmmC); a.vpcmpeqd(xmmA, xmmB, anyptr_gpC); a.vpcmpeqq(xmmA, xmmB, xmmC); a.vpcmpeqq(xmmA, xmmB, anyptr_gpC); a.vpcmpeqw(xmmA, xmmB, xmmC); a.vpcmpeqw(xmmA, xmmB, anyptr_gpC); a.vpcmpgtb(xmmA, xmmB, xmmC); a.vpcmpgtb(xmmA, xmmB, anyptr_gpC); a.vpcmpgtd(xmmA, xmmB, xmmC); a.vpcmpgtd(xmmA, xmmB, anyptr_gpC); a.vpcmpgtq(xmmA, xmmB, xmmC); a.vpcmpgtq(xmmA, xmmB, anyptr_gpC); a.vpcmpgtw(xmmA, xmmB, xmmC); a.vpcmpgtw(xmmA, xmmB, anyptr_gpC); a.vpcmpestri(xmmA, xmmB, 0); a.vpcmpestri(xmmA, anyptr_gpB, 0); a.vpcmpestrm(xmmA, xmmB, 0); a.vpcmpestrm(xmmA, anyptr_gpB, 0); a.vpcmpistri(xmmA, xmmB, 0); a.vpcmpistri(xmmA, anyptr_gpB, 0); a.vpcmpistrm(xmmA, xmmB, 0); a.vpcmpistrm(xmmA, anyptr_gpB, 0); a.vpermilpd(xmmA, xmmB, xmmC); a.vpermilpd(xmmA, xmmB, anyptr_gpC); a.vpermilpd(ymmA, ymmB, ymmC); a.vpermilpd(ymmA, ymmB, anyptr_gpC); a.vpermilpd(xmmA, xmmB, 0); a.vpermilpd(xmmA, anyptr_gpB, 0); a.vpermilpd(ymmA, ymmB, 0); a.vpermilpd(ymmA, anyptr_gpB, 0); a.vpermilps(xmmA, xmmB, xmmC); a.vpermilps(xmmA, xmmB, anyptr_gpC); a.vpermilps(ymmA, ymmB, ymmC); a.vpermilps(ymmA, ymmB, anyptr_gpC); a.vpermilps(xmmA, xmmB, 0); a.vpermilps(xmmA, anyptr_gpB, 0); a.vpermilps(ymmA, ymmB, 0); a.vpermilps(ymmA, anyptr_gpB, 0); a.vperm2f128(ymmA, ymmB, ymmC, 0); a.vperm2f128(ymmA, ymmB, anyptr_gpC, 0); a.vpextrb(gzA, xmmB, 0); a.vpextrb(anyptr_gpA, xmmB, 0); a.vpextrd(gzA, xmmB, 0); a.vpextrd(anyptr_gpA, xmmB, 0); a.vpextrw(gzA, xmmB, 0); a.vpextrw(anyptr_gpA, xmmB, 0); a.vphaddd(xmmA, xmmB, xmmC); a.vphaddd(xmmA, xmmB, anyptr_gpC); a.vphaddsw(xmmA, xmmB, xmmC); a.vphaddsw(xmmA, xmmB, anyptr_gpC); a.vphaddw(xmmA, xmmB, xmmC); a.vphaddw(xmmA, xmmB, anyptr_gpC); a.vphminposuw(xmmA, xmmB); a.vphminposuw(xmmA, anyptr_gpB); a.vphsubd(xmmA, xmmB, xmmC); a.vphsubd(xmmA, xmmB, anyptr_gpC); a.vphsubsw(xmmA, xmmB, xmmC); a.vphsubsw(xmmA, xmmB, anyptr_gpC); a.vphsubw(xmmA, xmmB, xmmC); a.vphsubw(xmmA, xmmB, anyptr_gpC); a.vpinsrb(xmmA, xmmB, gzC, 0); a.vpinsrb(xmmA, xmmB, anyptr_gpC, 0); a.vpinsrd(xmmA, xmmB, gzC, 0); a.vpinsrd(xmmA, xmmB, anyptr_gpC, 0); a.vpinsrw(xmmA, xmmB, gzC, 0); a.vpinsrw(xmmA, xmmB, anyptr_gpC, 0); a.vpmaddubsw(xmmA, xmmB, xmmC); a.vpmaddubsw(xmmA, xmmB, anyptr_gpC); a.vpmaddwd(xmmA, xmmB, xmmC); a.vpmaddwd(xmmA, xmmB, anyptr_gpC); a.vpmaxsb(xmmA, xmmB, xmmC); a.vpmaxsb(xmmA, xmmB, anyptr_gpC); a.vpmaxsd(xmmA, xmmB, xmmC); a.vpmaxsd(xmmA, xmmB, anyptr_gpC); a.vpmaxsw(xmmA, xmmB, xmmC); a.vpmaxsw(xmmA, xmmB, anyptr_gpC); a.vpmaxub(xmmA, xmmB, xmmC); a.vpmaxub(xmmA, xmmB, anyptr_gpC); a.vpmaxud(xmmA, xmmB, xmmC); a.vpmaxud(xmmA, xmmB, anyptr_gpC); a.vpmaxuw(xmmA, xmmB, xmmC); a.vpmaxuw(xmmA, xmmB, anyptr_gpC); a.vpminsb(xmmA, xmmB, xmmC); a.vpminsb(xmmA, xmmB, anyptr_gpC); a.vpminsd(xmmA, xmmB, xmmC); a.vpminsd(xmmA, xmmB, anyptr_gpC); a.vpminsw(xmmA, xmmB, xmmC); a.vpminsw(xmmA, xmmB, anyptr_gpC); a.vpminub(xmmA, xmmB, xmmC); a.vpminub(xmmA, xmmB, anyptr_gpC); a.vpminud(xmmA, xmmB, xmmC); a.vpminud(xmmA, xmmB, anyptr_gpC); a.vpminuw(xmmA, xmmB, xmmC); a.vpminuw(xmmA, xmmB, anyptr_gpC); a.vpmovmskb(gzA, xmmB); a.vpmovsxbd(xmmA, xmmB); a.vpmovsxbd(xmmA, anyptr_gpB); a.vpmovsxbq(xmmA, xmmB); a.vpmovsxbq(xmmA, anyptr_gpB); a.vpmovsxbw(xmmA, xmmB); a.vpmovsxbw(xmmA, anyptr_gpB); a.vpmovsxdq(xmmA, xmmB); a.vpmovsxdq(xmmA, anyptr_gpB); a.vpmovsxwd(xmmA, xmmB); a.vpmovsxwd(xmmA, anyptr_gpB); a.vpmovsxwq(xmmA, xmmB); a.vpmovsxwq(xmmA, anyptr_gpB); a.vpmovzxbd(xmmA, xmmB); a.vpmovzxbd(xmmA, anyptr_gpB); a.vpmovzxbq(xmmA, xmmB); a.vpmovzxbq(xmmA, anyptr_gpB); a.vpmovzxbw(xmmA, xmmB); a.vpmovzxbw(xmmA, anyptr_gpB); a.vpmovzxdq(xmmA, xmmB); a.vpmovzxdq(xmmA, anyptr_gpB); a.vpmovzxwd(xmmA, xmmB); a.vpmovzxwd(xmmA, anyptr_gpB); a.vpmovzxwq(xmmA, xmmB); a.vpmovzxwq(xmmA, anyptr_gpB); a.vpmuldq(xmmA, xmmB, xmmC); a.vpmuldq(xmmA, xmmB, anyptr_gpC); a.vpmulhrsw(xmmA, xmmB, xmmC); a.vpmulhrsw(xmmA, xmmB, anyptr_gpC); a.vpmulhuw(xmmA, xmmB, xmmC); a.vpmulhuw(xmmA, xmmB, anyptr_gpC); a.vpmulhw(xmmA, xmmB, xmmC); a.vpmulhw(xmmA, xmmB, anyptr_gpC); a.vpmulld(xmmA, xmmB, xmmC); a.vpmulld(xmmA, xmmB, anyptr_gpC); a.vpmullw(xmmA, xmmB, xmmC); a.vpmullw(xmmA, xmmB, anyptr_gpC); a.vpmuludq(xmmA, xmmB, xmmC); a.vpmuludq(xmmA, xmmB, anyptr_gpC); a.vpor(xmmA, xmmB, xmmC); a.vpor(xmmA, xmmB, anyptr_gpC); a.vpsadbw(xmmA, xmmB, xmmC); a.vpsadbw(xmmA, xmmB, anyptr_gpC); a.vpshufb(xmmA, xmmB, xmmC); a.vpshufb(xmmA, xmmB, anyptr_gpC); a.vpshufd(xmmA, xmmB, 0); a.vpshufd(xmmA, anyptr_gpB, 0); a.vpshufhw(xmmA, xmmB, 0); a.vpshufhw(xmmA, anyptr_gpB, 0); a.vpshuflw(xmmA, xmmB, 0); a.vpshuflw(xmmA, anyptr_gpB, 0); a.vpsignb(xmmA, xmmB, xmmC); a.vpsignb(xmmA, xmmB, anyptr_gpC); a.vpsignd(xmmA, xmmB, xmmC); a.vpsignd(xmmA, xmmB, anyptr_gpC); a.vpsignw(xmmA, xmmB, xmmC); a.vpsignw(xmmA, xmmB, anyptr_gpC); a.vpslld(xmmA, xmmB, xmmC); a.vpslld(xmmA, xmmB, anyptr_gpC); a.vpslld(xmmA, xmmB, 0); a.vpslldq(xmmA, xmmB, 0); a.vpsllq(xmmA, xmmB, xmmC); a.vpsllq(xmmA, xmmB, anyptr_gpC); a.vpsllq(xmmA, xmmB, 0); a.vpsllw(xmmA, xmmB, xmmC); a.vpsllw(xmmA, xmmB, anyptr_gpC); a.vpsllw(xmmA, xmmB, 0); a.vpsrad(xmmA, xmmB, xmmC); a.vpsrad(xmmA, xmmB, anyptr_gpC); a.vpsrad(xmmA, xmmB, 0); a.vpsraw(xmmA, xmmB, xmmC); a.vpsraw(xmmA, xmmB, anyptr_gpC); a.vpsraw(xmmA, xmmB, 0); a.vpsrld(xmmA, xmmB, xmmC); a.vpsrld(xmmA, xmmB, anyptr_gpC); a.vpsrld(xmmA, xmmB, 0); a.vpsrldq(xmmA, xmmB, 0); a.vpsrlq(xmmA, xmmB, xmmC); a.vpsrlq(xmmA, xmmB, anyptr_gpC); a.vpsrlq(xmmA, xmmB, 0); a.vpsrlw(xmmA, xmmB, xmmC); a.vpsrlw(xmmA, xmmB, anyptr_gpC); a.vpsrlw(xmmA, xmmB, 0); a.vpsubb(xmmA, xmmB, xmmC); a.vpsubb(xmmA, xmmB, anyptr_gpC); a.vpsubd(xmmA, xmmB, xmmC); a.vpsubd(xmmA, xmmB, anyptr_gpC); a.vpsubq(xmmA, xmmB, xmmC); a.vpsubq(xmmA, xmmB, anyptr_gpC); a.vpsubw(xmmA, xmmB, xmmC); a.vpsubw(xmmA, xmmB, anyptr_gpC); a.vpsubsb(xmmA, xmmB, xmmC); a.vpsubsb(xmmA, xmmB, anyptr_gpC); a.vpsubsw(xmmA, xmmB, xmmC); a.vpsubsw(xmmA, xmmB, anyptr_gpC); a.vpsubusb(xmmA, xmmB, xmmC); a.vpsubusb(xmmA, xmmB, anyptr_gpC); a.vpsubusw(xmmA, xmmB, xmmC); a.vpsubusw(xmmA, xmmB, anyptr_gpC); a.vptest(xmmA, xmmB); a.vptest(xmmA, anyptr_gpB); a.vptest(ymmA, ymmB); a.vptest(ymmA, anyptr_gpB); a.vpunpckhbw(xmmA, xmmB, xmmC); a.vpunpckhbw(xmmA, xmmB, anyptr_gpC); a.vpunpckhdq(xmmA, xmmB, xmmC); a.vpunpckhdq(xmmA, xmmB, anyptr_gpC); a.vpunpckhqdq(xmmA, xmmB, xmmC); a.vpunpckhqdq(xmmA, xmmB, anyptr_gpC); a.vpunpckhwd(xmmA, xmmB, xmmC); a.vpunpckhwd(xmmA, xmmB, anyptr_gpC); a.vpunpcklbw(xmmA, xmmB, xmmC); a.vpunpcklbw(xmmA, xmmB, anyptr_gpC); a.vpunpckldq(xmmA, xmmB, xmmC); a.vpunpckldq(xmmA, xmmB, anyptr_gpC); a.vpunpcklqdq(xmmA, xmmB, xmmC); a.vpunpcklqdq(xmmA, xmmB, anyptr_gpC); a.vpunpcklwd(xmmA, xmmB, xmmC); a.vpunpcklwd(xmmA, xmmB, anyptr_gpC); a.vpxor(xmmA, xmmB, xmmC); a.vpxor(xmmA, xmmB, anyptr_gpC); a.vrcpps(xmmA, xmmB); a.vrcpps(xmmA, anyptr_gpB); a.vrcpps(ymmA, ymmB); a.vrcpps(ymmA, anyptr_gpB); a.vrcpss(xmmA, xmmB, xmmC); a.vrcpss(xmmA, xmmB, anyptr_gpC); a.vrsqrtps(xmmA, xmmB); a.vrsqrtps(xmmA, anyptr_gpB); a.vrsqrtps(ymmA, ymmB); a.vrsqrtps(ymmA, anyptr_gpB); a.vrsqrtss(xmmA, xmmB, xmmC); a.vrsqrtss(xmmA, xmmB, anyptr_gpC); a.vroundpd(xmmA, xmmB, 0); a.vroundpd(xmmA, anyptr_gpB, 0); a.vroundpd(ymmA, ymmB, 0); a.vroundpd(ymmA, anyptr_gpB, 0); a.vroundps(xmmA, xmmB, 0); a.vroundps(xmmA, anyptr_gpB, 0); a.vroundps(ymmA, ymmB, 0); a.vroundps(ymmA, anyptr_gpB, 0); a.vroundsd(xmmA, xmmB, xmmC, 0); a.vroundsd(xmmA, xmmB, anyptr_gpC, 0); a.vroundss(xmmA, xmmB, xmmC, 0); a.vroundss(xmmA, xmmB, anyptr_gpC, 0); a.vshufpd(xmmA, xmmB, xmmC, 0); a.vshufpd(xmmA, xmmB, anyptr_gpC, 0); a.vshufpd(ymmA, ymmB, ymmC, 0); a.vshufpd(ymmA, ymmB, anyptr_gpC, 0); a.vshufps(xmmA, xmmB, xmmC, 0); a.vshufps(xmmA, xmmB, anyptr_gpC, 0); a.vshufps(ymmA, ymmB, ymmC, 0); a.vshufps(ymmA, ymmB, anyptr_gpC, 0); a.vsqrtpd(xmmA, xmmB); a.vsqrtpd(xmmA, anyptr_gpB); a.vsqrtpd(ymmA, ymmB); a.vsqrtpd(ymmA, anyptr_gpB); a.vsqrtps(xmmA, xmmB); a.vsqrtps(xmmA, anyptr_gpB); a.vsqrtps(ymmA, ymmB); a.vsqrtps(ymmA, anyptr_gpB); a.vsqrtsd(xmmA, xmmB, xmmC); a.vsqrtsd(xmmA, xmmB, anyptr_gpC); a.vsqrtss(xmmA, xmmB, xmmC); a.vsqrtss(xmmA, xmmB, anyptr_gpC); a.vstmxcsr(anyptr_gpA); a.vsubpd(xmmA, xmmB, xmmC); a.vsubpd(xmmA, xmmB, anyptr_gpC); a.vsubpd(ymmA, ymmB, ymmC); a.vsubpd(ymmA, ymmB, anyptr_gpC); a.vsubps(xmmA, xmmB, xmmC); a.vsubps(xmmA, xmmB, anyptr_gpC); a.vsubps(ymmA, ymmB, ymmC); a.vsubps(ymmA, ymmB, anyptr_gpC); a.vsubsd(xmmA, xmmB, xmmC); a.vsubsd(xmmA, xmmB, anyptr_gpC); a.vsubss(xmmA, xmmB, xmmC); a.vsubss(xmmA, xmmB, anyptr_gpC); a.vtestps(xmmA, xmmB); a.vtestps(xmmA, anyptr_gpB); a.vtestps(ymmA, ymmB); a.vtestps(ymmA, anyptr_gpB); a.vtestpd(xmmA, xmmB); a.vtestpd(xmmA, anyptr_gpB); a.vtestpd(ymmA, ymmB); a.vtestpd(ymmA, anyptr_gpB); a.vucomisd(xmmA, xmmB); a.vucomisd(xmmA, anyptr_gpB); a.vucomiss(xmmA, xmmB); a.vucomiss(xmmA, anyptr_gpB); a.vunpckhpd(xmmA, xmmB, xmmC); a.vunpckhpd(xmmA, xmmB, anyptr_gpC); a.vunpckhpd(ymmA, ymmB, ymmC); a.vunpckhpd(ymmA, ymmB, anyptr_gpC); a.vunpckhps(xmmA, xmmB, xmmC); a.vunpckhps(xmmA, xmmB, anyptr_gpC); a.vunpckhps(ymmA, ymmB, ymmC); a.vunpckhps(ymmA, ymmB, anyptr_gpC); a.vunpcklpd(xmmA, xmmB, xmmC); a.vunpcklpd(xmmA, xmmB, anyptr_gpC); a.vunpcklpd(ymmA, ymmB, ymmC); a.vunpcklpd(ymmA, ymmB, anyptr_gpC); a.vunpcklps(xmmA, xmmB, xmmC); a.vunpcklps(xmmA, xmmB, anyptr_gpC); a.vunpcklps(ymmA, ymmB, ymmC); a.vunpcklps(ymmA, ymmB, anyptr_gpC); a.vxorpd(xmmA, xmmB, xmmC); a.vxorpd(xmmA, xmmB, anyptr_gpC); a.vxorpd(ymmA, ymmB, ymmC); a.vxorpd(ymmA, ymmB, anyptr_gpC); a.vxorps(xmmA, xmmB, xmmC); a.vxorps(xmmA, xmmB, anyptr_gpC); a.vxorps(ymmA, ymmB, ymmC); a.vxorps(ymmA, ymmB, anyptr_gpC); a.vzeroall(); a.vzeroupper(); // AVX+AESNI. a.nop(); a.vaesdec(xmmA, xmmB, xmmC); a.vaesdec(xmmA, xmmB, anyptr_gpC); a.vaesdeclast(xmmA, xmmB, xmmC); a.vaesdeclast(xmmA, xmmB, anyptr_gpC); a.vaesenc(xmmA, xmmB, xmmC); a.vaesenc(xmmA, xmmB, anyptr_gpC); a.vaesenclast(xmmA, xmmB, xmmC); a.vaesenclast(xmmA, xmmB, anyptr_gpC); a.vaesimc(xmmA, xmmB); a.vaesimc(xmmA, anyptr_gpB); a.vaeskeygenassist(xmmA, xmmB, 0); a.vaeskeygenassist(xmmA, anyptr_gpB, 0); // AVX+PCLMULQDQ. a.nop(); a.vpclmulqdq(xmmA, xmmB, xmmC, 0); a.vpclmulqdq(xmmA, xmmB, anyptr_gpC, 0); // AVX2. a.nop(); a.vbroadcasti128(ymmA, anyptr_gpB); a.vbroadcastsd(ymmA, xmmB); a.vbroadcastss(xmmA, xmmB); a.vbroadcastss(ymmA, xmmB); a.vextracti128(xmmA, ymmB, 0); a.vextracti128(anyptr_gpA, ymmB, 0); a.vgatherdpd(xmmA, vmxptr_gpB, xmmC); a.vgatherdpd(ymmA, vmyptr_gpB, ymmC); a.vgatherdps(xmmA, vmxptr_gpB, xmmC); a.vgatherdps(ymmA, vmyptr_gpB, ymmC); a.vgatherqpd(xmmA, vmxptr_gpB, xmmC); a.vgatherqpd(ymmA, vmyptr_gpB, ymmC); a.vgatherqps(xmmA, vmxptr_gpB, xmmC); a.vgatherqps(xmmA, vmyptr_gpB, xmmC); a.vinserti128(ymmA, ymmB, xmmC, 0); a.vinserti128(ymmA, ymmB, anyptr_gpC, 0); a.vmovntdqa(ymmA, anyptr_gpB); a.vmpsadbw(ymmA, ymmB, ymmC, 0); a.vmpsadbw(ymmA, ymmB, anyptr_gpC, 0); a.vpabsb(ymmA, ymmB); a.vpabsb(ymmA, anyptr_gpB); a.vpabsd(ymmA, ymmB); a.vpabsd(ymmA, anyptr_gpB); a.vpabsw(ymmA, ymmB); a.vpabsw(ymmA, anyptr_gpB); a.vpackssdw(ymmA, ymmB, ymmC); a.vpackssdw(ymmA, ymmB, anyptr_gpC); a.vpacksswb(ymmA, ymmB, ymmC); a.vpacksswb(ymmA, ymmB, anyptr_gpC); a.vpackusdw(ymmA, ymmB, ymmC); a.vpackusdw(ymmA, ymmB, anyptr_gpC); a.vpackuswb(ymmA, ymmB, ymmC); a.vpackuswb(ymmA, ymmB, anyptr_gpC); a.vpaddb(ymmA, ymmB, ymmC); a.vpaddb(ymmA, ymmB, anyptr_gpC); a.vpaddd(ymmA, ymmB, ymmC); a.vpaddd(ymmA, ymmB, anyptr_gpC); a.vpaddq(ymmA, ymmB, ymmC); a.vpaddq(ymmA, ymmB, anyptr_gpC); a.vpaddw(ymmA, ymmB, ymmC); a.vpaddw(ymmA, ymmB, anyptr_gpC); a.vpaddsb(ymmA, ymmB, ymmC); a.vpaddsb(ymmA, ymmB, anyptr_gpC); a.vpaddsw(ymmA, ymmB, ymmC); a.vpaddsw(ymmA, ymmB, anyptr_gpC); a.vpaddusb(ymmA, ymmB, ymmC); a.vpaddusb(ymmA, ymmB, anyptr_gpC); a.vpaddusw(ymmA, ymmB, ymmC); a.vpaddusw(ymmA, ymmB, anyptr_gpC); a.vpalignr(ymmA, ymmB, ymmC, 0); a.vpalignr(ymmA, ymmB, anyptr_gpC, 0); a.vpand(ymmA, ymmB, ymmC); a.vpand(ymmA, ymmB, anyptr_gpC); a.vpandn(ymmA, ymmB, ymmC); a.vpandn(ymmA, ymmB, anyptr_gpC); a.vpavgb(ymmA, ymmB, ymmC); a.vpavgb(ymmA, ymmB, anyptr_gpC); a.vpavgw(ymmA, ymmB, ymmC); a.vpavgw(ymmA, ymmB, anyptr_gpC); a.vpblendd(xmmA, xmmB, xmmC, 0); a.vpblendd(xmmA, xmmB, anyptr_gpC, 0); a.vpblendd(ymmA, ymmB, ymmC, 0); a.vpblendd(ymmA, ymmB, anyptr_gpC, 0); a.vpblendvb(ymmA, ymmB, ymmC, ymmD); a.vpblendvb(ymmA, ymmB, anyptr_gpC, ymmD); a.vpblendw(ymmA, ymmB, ymmC, 0); a.vpblendw(ymmA, ymmB, anyptr_gpC, 0); a.vpbroadcastb(xmmA, xmmB); a.vpbroadcastb(xmmA, anyptr_gpB); a.vpbroadcastb(ymmA, xmmB); a.vpbroadcastb(ymmA, anyptr_gpB); a.vpbroadcastd(xmmA, xmmB); a.vpbroadcastd(xmmA, anyptr_gpB); a.vpbroadcastd(ymmA, xmmB); a.vpbroadcastd(ymmA, anyptr_gpB); a.vpbroadcastq(xmmA, xmmB); a.vpbroadcastq(xmmA, anyptr_gpB); a.vpbroadcastq(ymmA, xmmB); a.vpbroadcastq(ymmA, anyptr_gpB); a.vpbroadcastw(xmmA, xmmB); a.vpbroadcastw(xmmA, anyptr_gpB); a.vpbroadcastw(ymmA, xmmB); a.vpbroadcastw(ymmA, anyptr_gpB); a.vpcmpeqb(ymmA, ymmB, ymmC); a.vpcmpeqb(ymmA, ymmB, anyptr_gpC); a.vpcmpeqd(ymmA, ymmB, ymmC); a.vpcmpeqd(ymmA, ymmB, anyptr_gpC); a.vpcmpeqq(ymmA, ymmB, ymmC); a.vpcmpeqq(ymmA, ymmB, anyptr_gpC); a.vpcmpeqw(ymmA, ymmB, ymmC); a.vpcmpeqw(ymmA, ymmB, anyptr_gpC); a.vpcmpgtb(ymmA, ymmB, ymmC); a.vpcmpgtb(ymmA, ymmB, anyptr_gpC); a.vpcmpgtd(ymmA, ymmB, ymmC); a.vpcmpgtd(ymmA, ymmB, anyptr_gpC); a.vpcmpgtq(ymmA, ymmB, ymmC); a.vpcmpgtq(ymmA, ymmB, anyptr_gpC); a.vpcmpgtw(ymmA, ymmB, ymmC); a.vpcmpgtw(ymmA, ymmB, anyptr_gpC); a.vperm2i128(ymmA, ymmB, ymmC, 0); a.vperm2i128(ymmA, ymmB, anyptr_gpC, 0); a.vpermd(ymmA, ymmB, ymmC); a.vpermd(ymmA, ymmB, anyptr_gpC); a.vpermps(ymmA, ymmB, ymmC); a.vpermps(ymmA, ymmB, anyptr_gpC); a.vpermpd(ymmA, ymmB, 0); a.vpermpd(ymmA, anyptr_gpB, 0); a.vpermq(ymmA, ymmB, 0); a.vpermq(ymmA, anyptr_gpB, 0); a.vpgatherdd(xmmA, vmxptr_gpB, xmmC); a.vpgatherdd(ymmA, vmyptr_gpB, ymmC); a.vpgatherdq(xmmA, vmxptr_gpB, xmmC); a.vpgatherdq(ymmA, vmyptr_gpB, ymmC); a.vpgatherqd(xmmA, vmxptr_gpB, xmmC); a.vpgatherqd(xmmA, vmyptr_gpB, xmmC); a.vpgatherqq(xmmA, vmxptr_gpB, xmmC); a.vpgatherqq(ymmA, vmyptr_gpB, ymmC); a.vpmovmskb(gzA, ymmB); a.vpmovsxbd(ymmA, anyptr_gpB); a.vpmovsxbd(ymmA, xmmB); a.vpmovsxbq(ymmA, anyptr_gpB); a.vpmovsxbq(ymmA, xmmB); a.vpmovsxbw(ymmA, anyptr_gpB); a.vpmovsxbw(ymmA, xmmB); a.vpmovsxdq(ymmA, anyptr_gpB); a.vpmovsxdq(ymmA, xmmB); a.vpmovsxwd(ymmA, anyptr_gpB); a.vpmovsxwd(ymmA, xmmB); a.vpmovsxwq(ymmA, anyptr_gpB); a.vpmovsxwq(ymmA, xmmB); a.vpmovzxbd(ymmA, anyptr_gpB); a.vpmovzxbd(ymmA, xmmB); a.vpmovzxbq(ymmA, anyptr_gpB); a.vpmovzxbq(ymmA, xmmB); a.vpmovzxbw(ymmA, anyptr_gpB); a.vpmovzxbw(ymmA, xmmB); a.vpmovzxdq(ymmA, anyptr_gpB); a.vpmovzxdq(ymmA, xmmB); a.vpmovzxwd(ymmA, anyptr_gpB); a.vpmovzxwd(ymmA, xmmB); a.vpmovzxwq(ymmA, anyptr_gpB); a.vpmovzxwq(ymmA, xmmB); a.vpshufd(ymmA, anyptr_gpB, 0); a.vpshufd(ymmA, ymmB, 0); a.vpshufhw(ymmA, anyptr_gpB, 0); a.vpshufhw(ymmA, ymmB, 0); a.vpshuflw(ymmA, anyptr_gpB, 0); a.vpshuflw(ymmA, ymmB, 0); a.vpslld(ymmA, ymmB, 0); a.vpslldq(ymmA, ymmB, 0); a.vpsllq(ymmA, ymmB, 0); a.vpsllw(ymmA, ymmB, 0); a.vpsrad(ymmA, ymmB, 0); a.vpsraw(ymmA, ymmB, 0); a.vpsrld(ymmA, ymmB, 0); a.vpsrldq(ymmA, ymmB, 0); a.vpsrlq(ymmA, ymmB, 0); a.vpsrlw(ymmA, ymmB, 0); a.vphaddd(ymmA, ymmB, anyptr_gpC); a.vphaddd(ymmA, ymmB, ymmC); a.vphaddsw(ymmA, ymmB, anyptr_gpC); a.vphaddsw(ymmA, ymmB, ymmC); a.vphaddw(ymmA, ymmB, anyptr_gpC); a.vphaddw(ymmA, ymmB, ymmC); a.vphsubd(ymmA, ymmB, anyptr_gpC); a.vphsubd(ymmA, ymmB, ymmC); a.vphsubsw(ymmA, ymmB, anyptr_gpC); a.vphsubsw(ymmA, ymmB, ymmC); a.vphsubw(ymmA, ymmB, anyptr_gpC); a.vphsubw(ymmA, ymmB, ymmC); a.vpmaddubsw(ymmA, ymmB, anyptr_gpC); a.vpmaddubsw(ymmA, ymmB, ymmC); a.vpmaddwd(ymmA, ymmB, anyptr_gpC); a.vpmaddwd(ymmA, ymmB, ymmC); a.vpmaskmovd(anyptr_gpA, xmmB, xmmC); a.vpmaskmovd(anyptr_gpA, ymmB, ymmC); a.vpmaskmovd(xmmA, xmmB, anyptr_gpC); a.vpmaskmovd(ymmA, ymmB, anyptr_gpC); a.vpmaskmovq(anyptr_gpA, xmmB, xmmC); a.vpmaskmovq(anyptr_gpA, ymmB, ymmC); a.vpmaskmovq(xmmA, xmmB, anyptr_gpC); a.vpmaskmovq(ymmA, ymmB, anyptr_gpC); a.vpmaxsb(ymmA, ymmB, anyptr_gpC); a.vpmaxsb(ymmA, ymmB, ymmC); a.vpmaxsd(ymmA, ymmB, anyptr_gpC); a.vpmaxsd(ymmA, ymmB, ymmC); a.vpmaxsw(ymmA, ymmB, anyptr_gpC); a.vpmaxsw(ymmA, ymmB, ymmC); a.vpmaxub(ymmA, ymmB, anyptr_gpC); a.vpmaxub(ymmA, ymmB, ymmC); a.vpmaxud(ymmA, ymmB, anyptr_gpC); a.vpmaxud(ymmA, ymmB, ymmC); a.vpmaxuw(ymmA, ymmB, anyptr_gpC); a.vpmaxuw(ymmA, ymmB, ymmC); a.vpminsb(ymmA, ymmB, anyptr_gpC); a.vpminsb(ymmA, ymmB, ymmC); a.vpminsd(ymmA, ymmB, anyptr_gpC); a.vpminsd(ymmA, ymmB, ymmC); a.vpminsw(ymmA, ymmB, anyptr_gpC); a.vpminsw(ymmA, ymmB, ymmC); a.vpminub(ymmA, ymmB, anyptr_gpC); a.vpminub(ymmA, ymmB, ymmC); a.vpminud(ymmA, ymmB, anyptr_gpC); a.vpminud(ymmA, ymmB, ymmC); a.vpminuw(ymmA, ymmB, anyptr_gpC); a.vpminuw(ymmA, ymmB, ymmC); a.vpmuldq(ymmA, ymmB, anyptr_gpC); a.vpmuldq(ymmA, ymmB, ymmC); a.vpmulhrsw(ymmA, ymmB, anyptr_gpC); a.vpmulhrsw(ymmA, ymmB, ymmC); a.vpmulhuw(ymmA, ymmB, anyptr_gpC); a.vpmulhuw(ymmA, ymmB, ymmC); a.vpmulhw(ymmA, ymmB, anyptr_gpC); a.vpmulhw(ymmA, ymmB, ymmC); a.vpmulld(ymmA, ymmB, anyptr_gpC); a.vpmulld(ymmA, ymmB, ymmC); a.vpmullw(ymmA, ymmB, anyptr_gpC); a.vpmullw(ymmA, ymmB, ymmC); a.vpmuludq(ymmA, ymmB, anyptr_gpC); a.vpmuludq(ymmA, ymmB, ymmC); a.vpor(ymmA, ymmB, anyptr_gpC); a.vpor(ymmA, ymmB, ymmC); a.vpsadbw(ymmA, ymmB, anyptr_gpC); a.vpsadbw(ymmA, ymmB, ymmC); a.vpshufb(ymmA, ymmB, anyptr_gpC); a.vpshufb(ymmA, ymmB, ymmC); a.vpsignb(ymmA, ymmB, anyptr_gpC); a.vpsignb(ymmA, ymmB, ymmC); a.vpsignd(ymmA, ymmB, anyptr_gpC); a.vpsignd(ymmA, ymmB, ymmC); a.vpsignw(ymmA, ymmB, anyptr_gpC); a.vpsignw(ymmA, ymmB, ymmC); a.vpslld(ymmA, ymmB, anyptr_gpC); a.vpslld(ymmA, ymmB, xmmC); a.vpsllq(ymmA, ymmB, anyptr_gpC); a.vpsllq(ymmA, ymmB, xmmC); a.vpsllvd(xmmA, xmmB, anyptr_gpC); a.vpsllvd(xmmA, xmmB, xmmC); a.vpsllvd(ymmA, ymmB, anyptr_gpC); a.vpsllvd(ymmA, ymmB, ymmC); a.vpsllvq(xmmA, xmmB, anyptr_gpC); a.vpsllvq(xmmA, xmmB, xmmC); a.vpsllvq(ymmA, ymmB, anyptr_gpC); a.vpsllvq(ymmA, ymmB, ymmC); a.vpsllw(ymmA, ymmB, anyptr_gpC); a.vpsllw(ymmA, ymmB, xmmC); a.vpsrad(ymmA, ymmB, anyptr_gpC); a.vpsrad(ymmA, ymmB, xmmC); a.vpsravd(xmmA, xmmB, anyptr_gpC); a.vpsravd(xmmA, xmmB, xmmC); a.vpsravd(ymmA, ymmB, anyptr_gpC); a.vpsravd(ymmA, ymmB, ymmC); a.vpsraw(ymmA, ymmB, anyptr_gpC); a.vpsraw(ymmA, ymmB, xmmC); a.vpsrld(ymmA, ymmB, anyptr_gpC); a.vpsrld(ymmA, ymmB, xmmC); a.vpsrlq(ymmA, ymmB, anyptr_gpC); a.vpsrlq(ymmA, ymmB, xmmC); a.vpsrlvd(xmmA, xmmB, anyptr_gpC); a.vpsrlvd(xmmA, xmmB, xmmC); a.vpsrlvd(ymmA, ymmB, anyptr_gpC); a.vpsrlvd(ymmA, ymmB, ymmC); a.vpsrlvq(xmmA, xmmB, anyptr_gpC); a.vpsrlvq(xmmA, xmmB, xmmC); a.vpsrlvq(ymmA, ymmB, anyptr_gpC); a.vpsrlvq(ymmA, ymmB, ymmC); a.vpsrlw(ymmA, ymmB, anyptr_gpC); a.vpsrlw(ymmA, ymmB, xmmC); a.vpsubb(ymmA, ymmB, anyptr_gpC); a.vpsubb(ymmA, ymmB, ymmC); a.vpsubd(ymmA, ymmB, anyptr_gpC); a.vpsubd(ymmA, ymmB, ymmC); a.vpsubq(ymmA, ymmB, anyptr_gpC); a.vpsubq(ymmA, ymmB, ymmC); a.vpsubsb(ymmA, ymmB, anyptr_gpC); a.vpsubsb(ymmA, ymmB, ymmC); a.vpsubsw(ymmA, ymmB, anyptr_gpC); a.vpsubsw(ymmA, ymmB, ymmC); a.vpsubusb(ymmA, ymmB, anyptr_gpC); a.vpsubusb(ymmA, ymmB, ymmC); a.vpsubusw(ymmA, ymmB, anyptr_gpC); a.vpsubusw(ymmA, ymmB, ymmC); a.vpsubw(ymmA, ymmB, anyptr_gpC); a.vpsubw(ymmA, ymmB, ymmC); a.vpunpckhbw(ymmA, ymmB, anyptr_gpC); a.vpunpckhbw(ymmA, ymmB, ymmC); a.vpunpckhdq(ymmA, ymmB, anyptr_gpC); a.vpunpckhdq(ymmA, ymmB, ymmC); a.vpunpckhqdq(ymmA, ymmB, anyptr_gpC); a.vpunpckhqdq(ymmA, ymmB, ymmC); a.vpunpckhwd(ymmA, ymmB, anyptr_gpC); a.vpunpckhwd(ymmA, ymmB, ymmC); a.vpunpcklbw(ymmA, ymmB, anyptr_gpC); a.vpunpcklbw(ymmA, ymmB, ymmC); a.vpunpckldq(ymmA, ymmB, anyptr_gpC); a.vpunpckldq(ymmA, ymmB, ymmC); a.vpunpcklqdq(ymmA, ymmB, anyptr_gpC); a.vpunpcklqdq(ymmA, ymmB, ymmC); a.vpunpcklwd(ymmA, ymmB, anyptr_gpC); a.vpunpcklwd(ymmA, ymmB, ymmC); a.vpxor(ymmA, ymmB, anyptr_gpC); a.vpxor(ymmA, ymmB, ymmC); // FMA3. a.nop(); a.vfmadd132pd(xmmA, xmmB, anyptr_gpC); a.vfmadd132pd(xmmA, xmmB, xmmC); a.vfmadd132pd(ymmA, ymmB, anyptr_gpC); a.vfmadd132pd(ymmA, ymmB, ymmC); a.vfmadd132ps(xmmA, xmmB, anyptr_gpC); a.vfmadd132ps(xmmA, xmmB, xmmC); a.vfmadd132ps(ymmA, ymmB, anyptr_gpC); a.vfmadd132ps(ymmA, ymmB, ymmC); a.vfmadd132sd(xmmA, xmmB, anyptr_gpC); a.vfmadd132sd(xmmA, xmmB, xmmC); a.vfmadd132ss(xmmA, xmmB, anyptr_gpC); a.vfmadd132ss(xmmA, xmmB, xmmC); a.vfmadd213pd(xmmA, xmmB, anyptr_gpC); a.vfmadd213pd(xmmA, xmmB, xmmC); a.vfmadd213pd(ymmA, ymmB, anyptr_gpC); a.vfmadd213pd(ymmA, ymmB, ymmC); a.vfmadd213ps(xmmA, xmmB, anyptr_gpC); a.vfmadd213ps(xmmA, xmmB, xmmC); a.vfmadd213ps(ymmA, ymmB, anyptr_gpC); a.vfmadd213ps(ymmA, ymmB, ymmC); a.vfmadd213sd(xmmA, xmmB, anyptr_gpC); a.vfmadd213sd(xmmA, xmmB, xmmC); a.vfmadd213ss(xmmA, xmmB, anyptr_gpC); a.vfmadd213ss(xmmA, xmmB, xmmC); a.vfmadd231pd(xmmA, xmmB, anyptr_gpC); a.vfmadd231pd(xmmA, xmmB, xmmC); a.vfmadd231pd(ymmA, ymmB, anyptr_gpC); a.vfmadd231pd(ymmA, ymmB, ymmC); a.vfmadd231ps(xmmA, xmmB, anyptr_gpC); a.vfmadd231ps(xmmA, xmmB, xmmC); a.vfmadd231ps(ymmA, ymmB, anyptr_gpC); a.vfmadd231ps(ymmA, ymmB, ymmC); a.vfmadd231sd(xmmA, xmmB, anyptr_gpC); a.vfmadd231sd(xmmA, xmmB, xmmC); a.vfmadd231ss(xmmA, xmmB, anyptr_gpC); a.vfmadd231ss(xmmA, xmmB, xmmC); a.vfmaddsub132pd(xmmA, xmmB, anyptr_gpC); a.vfmaddsub132pd(xmmA, xmmB, xmmC); a.vfmaddsub132pd(ymmA, ymmB, anyptr_gpC); a.vfmaddsub132pd(ymmA, ymmB, ymmC); a.vfmaddsub132ps(xmmA, xmmB, anyptr_gpC); a.vfmaddsub132ps(xmmA, xmmB, xmmC); a.vfmaddsub132ps(ymmA, ymmB, anyptr_gpC); a.vfmaddsub132ps(ymmA, ymmB, ymmC); a.vfmaddsub213pd(xmmA, xmmB, anyptr_gpC); a.vfmaddsub213pd(xmmA, xmmB, xmmC); a.vfmaddsub213pd(ymmA, ymmB, anyptr_gpC); a.vfmaddsub213pd(ymmA, ymmB, ymmC); a.vfmaddsub213ps(xmmA, xmmB, anyptr_gpC); a.vfmaddsub213ps(xmmA, xmmB, xmmC); a.vfmaddsub213ps(ymmA, ymmB, anyptr_gpC); a.vfmaddsub213ps(ymmA, ymmB, ymmC); a.vfmaddsub231pd(xmmA, xmmB, anyptr_gpC); a.vfmaddsub231pd(xmmA, xmmB, xmmC); a.vfmaddsub231pd(ymmA, ymmB, anyptr_gpC); a.vfmaddsub231pd(ymmA, ymmB, ymmC); a.vfmaddsub231ps(xmmA, xmmB, anyptr_gpC); a.vfmaddsub231ps(xmmA, xmmB, xmmC); a.vfmaddsub231ps(ymmA, ymmB, anyptr_gpC); a.vfmaddsub231ps(ymmA, ymmB, ymmC); a.vfmsub132pd(xmmA, xmmB, anyptr_gpC); a.vfmsub132pd(xmmA, xmmB, xmmC); a.vfmsub132pd(ymmA, ymmB, anyptr_gpC); a.vfmsub132pd(ymmA, ymmB, ymmC); a.vfmsub132ps(xmmA, xmmB, anyptr_gpC); a.vfmsub132ps(xmmA, xmmB, xmmC); a.vfmsub132ps(ymmA, ymmB, anyptr_gpC); a.vfmsub132ps(ymmA, ymmB, ymmC); a.vfmsub132sd(xmmA, xmmB, anyptr_gpC); a.vfmsub132sd(xmmA, xmmB, xmmC); a.vfmsub132ss(xmmA, xmmB, anyptr_gpC); a.vfmsub132ss(xmmA, xmmB, xmmC); a.vfmsub213pd(xmmA, xmmB, anyptr_gpC); a.vfmsub213pd(xmmA, xmmB, xmmC); a.vfmsub213pd(ymmA, ymmB, anyptr_gpC); a.vfmsub213pd(ymmA, ymmB, ymmC); a.vfmsub213ps(xmmA, xmmB, anyptr_gpC); a.vfmsub213ps(xmmA, xmmB, xmmC); a.vfmsub213ps(ymmA, ymmB, anyptr_gpC); a.vfmsub213ps(ymmA, ymmB, ymmC); a.vfmsub213sd(xmmA, xmmB, anyptr_gpC); a.vfmsub213sd(xmmA, xmmB, xmmC); a.vfmsub213ss(xmmA, xmmB, anyptr_gpC); a.vfmsub213ss(xmmA, xmmB, xmmC); a.vfmsub231pd(xmmA, xmmB, anyptr_gpC); a.vfmsub231pd(xmmA, xmmB, xmmC); a.vfmsub231pd(ymmA, ymmB, anyptr_gpC); a.vfmsub231pd(ymmA, ymmB, ymmC); a.vfmsub231ps(xmmA, xmmB, anyptr_gpC); a.vfmsub231ps(xmmA, xmmB, xmmC); a.vfmsub231ps(ymmA, ymmB, anyptr_gpC); a.vfmsub231ps(ymmA, ymmB, ymmC); a.vfmsub231sd(xmmA, xmmB, anyptr_gpC); a.vfmsub231sd(xmmA, xmmB, xmmC); a.vfmsub231ss(xmmA, xmmB, anyptr_gpC); a.vfmsub231ss(xmmA, xmmB, xmmC); a.vfmsubadd132pd(xmmA, xmmB, anyptr_gpC); a.vfmsubadd132pd(xmmA, xmmB, xmmC); a.vfmsubadd132pd(ymmA, ymmB, anyptr_gpC); a.vfmsubadd132pd(ymmA, ymmB, ymmC); a.vfmsubadd132ps(xmmA, xmmB, anyptr_gpC); a.vfmsubadd132ps(xmmA, xmmB, xmmC); a.vfmsubadd132ps(ymmA, ymmB, anyptr_gpC); a.vfmsubadd132ps(ymmA, ymmB, ymmC); a.vfmsubadd213pd(xmmA, xmmB, anyptr_gpC); a.vfmsubadd213pd(xmmA, xmmB, xmmC); a.vfmsubadd213pd(ymmA, ymmB, anyptr_gpC); a.vfmsubadd213pd(ymmA, ymmB, ymmC); a.vfmsubadd213ps(xmmA, xmmB, anyptr_gpC); a.vfmsubadd213ps(xmmA, xmmB, xmmC); a.vfmsubadd213ps(ymmA, ymmB, anyptr_gpC); a.vfmsubadd213ps(ymmA, ymmB, ymmC); a.vfmsubadd231pd(xmmA, xmmB, anyptr_gpC); a.vfmsubadd231pd(xmmA, xmmB, xmmC); a.vfmsubadd231pd(ymmA, ymmB, anyptr_gpC); a.vfmsubadd231pd(ymmA, ymmB, ymmC); a.vfmsubadd231ps(xmmA, xmmB, anyptr_gpC); a.vfmsubadd231ps(xmmA, xmmB, xmmC); a.vfmsubadd231ps(ymmA, ymmB, anyptr_gpC); a.vfmsubadd231ps(ymmA, ymmB, ymmC); a.vfnmadd132pd(xmmA, xmmB, anyptr_gpC); a.vfnmadd132pd(xmmA, xmmB, xmmC); a.vfnmadd132pd(ymmA, ymmB, anyptr_gpC); a.vfnmadd132pd(ymmA, ymmB, ymmC); a.vfnmadd132ps(xmmA, xmmB, anyptr_gpC); a.vfnmadd132ps(xmmA, xmmB, xmmC); a.vfnmadd132ps(ymmA, ymmB, anyptr_gpC); a.vfnmadd132ps(ymmA, ymmB, ymmC); a.vfnmadd132sd(xmmA, xmmB, anyptr_gpC); a.vfnmadd132sd(xmmA, xmmB, xmmC); a.vfnmadd132ss(xmmA, xmmB, anyptr_gpC); a.vfnmadd132ss(xmmA, xmmB, xmmC); a.vfnmadd213pd(xmmA, xmmB, anyptr_gpC); a.vfnmadd213pd(xmmA, xmmB, xmmC); a.vfnmadd213pd(ymmA, ymmB, anyptr_gpC); a.vfnmadd213pd(ymmA, ymmB, ymmC); a.vfnmadd213ps(xmmA, xmmB, anyptr_gpC); a.vfnmadd213ps(xmmA, xmmB, xmmC); a.vfnmadd213ps(ymmA, ymmB, anyptr_gpC); a.vfnmadd213ps(ymmA, ymmB, ymmC); a.vfnmadd213sd(xmmA, xmmB, anyptr_gpC); a.vfnmadd213sd(xmmA, xmmB, xmmC); a.vfnmadd213ss(xmmA, xmmB, anyptr_gpC); a.vfnmadd213ss(xmmA, xmmB, xmmC); a.vfnmadd231pd(xmmA, xmmB, anyptr_gpC); a.vfnmadd231pd(xmmA, xmmB, xmmC); a.vfnmadd231pd(ymmA, ymmB, anyptr_gpC); a.vfnmadd231pd(ymmA, ymmB, ymmC); a.vfnmadd231ps(xmmA, xmmB, anyptr_gpC); a.vfnmadd231ps(xmmA, xmmB, xmmC); a.vfnmadd231ps(ymmA, ymmB, anyptr_gpC); a.vfnmadd231ps(ymmA, ymmB, ymmC); a.vfnmadd231sd(xmmA, xmmB, anyptr_gpC); a.vfnmadd231sd(xmmA, xmmB, xmmC); a.vfnmadd231ss(xmmA, xmmB, anyptr_gpC); a.vfnmadd231ss(xmmA, xmmB, xmmC); a.vfnmsub132pd(xmmA, xmmB, anyptr_gpC); a.vfnmsub132pd(xmmA, xmmB, xmmC); a.vfnmsub132pd(ymmA, ymmB, anyptr_gpC); a.vfnmsub132pd(ymmA, ymmB, ymmC); a.vfnmsub132ps(xmmA, xmmB, anyptr_gpC); a.vfnmsub132ps(xmmA, xmmB, xmmC); a.vfnmsub132ps(ymmA, ymmB, anyptr_gpC); a.vfnmsub132ps(ymmA, ymmB, ymmC); a.vfnmsub132sd(xmmA, xmmB, anyptr_gpC); a.vfnmsub132sd(xmmA, xmmB, xmmC); a.vfnmsub132ss(xmmA, xmmB, anyptr_gpC); a.vfnmsub132ss(xmmA, xmmB, xmmC); a.vfnmsub213pd(xmmA, xmmB, anyptr_gpC); a.vfnmsub213pd(xmmA, xmmB, xmmC); a.vfnmsub213pd(ymmA, ymmB, anyptr_gpC); a.vfnmsub213pd(ymmA, ymmB, ymmC); a.vfnmsub213ps(xmmA, xmmB, anyptr_gpC); a.vfnmsub213ps(xmmA, xmmB, xmmC); a.vfnmsub213ps(ymmA, ymmB, anyptr_gpC); a.vfnmsub213ps(ymmA, ymmB, ymmC); a.vfnmsub213sd(xmmA, xmmB, anyptr_gpC); a.vfnmsub213sd(xmmA, xmmB, xmmC); a.vfnmsub213ss(xmmA, xmmB, anyptr_gpC); a.vfnmsub213ss(xmmA, xmmB, xmmC); a.vfnmsub231pd(xmmA, xmmB, anyptr_gpC); a.vfnmsub231pd(xmmA, xmmB, xmmC); a.vfnmsub231pd(ymmA, ymmB, anyptr_gpC); a.vfnmsub231pd(ymmA, ymmB, ymmC); a.vfnmsub231ps(xmmA, xmmB, anyptr_gpC); a.vfnmsub231ps(xmmA, xmmB, xmmC); a.vfnmsub231ps(ymmA, ymmB, anyptr_gpC); a.vfnmsub231ps(ymmA, ymmB, ymmC); a.vfnmsub231sd(xmmA, xmmB, anyptr_gpC); a.vfnmsub231sd(xmmA, xmmB, xmmC); a.vfnmsub231ss(xmmA, xmmB, anyptr_gpC); a.vfnmsub231ss(xmmA, xmmB, xmmC); // FMA4. a.nop(); a.vfmaddpd(xmmA, xmmB, xmmC, xmmD); a.vfmaddpd(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmaddpd(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmaddpd(ymmA, ymmB, ymmC, ymmD); a.vfmaddpd(ymmA, ymmB, anyptr_gpC, ymmD); a.vfmaddpd(ymmA, ymmB, ymmC, anyptr_gpD); a.vfmaddps(xmmA, xmmB, xmmC, xmmD); a.vfmaddps(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmaddps(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmaddps(ymmA, ymmB, ymmC, ymmD); a.vfmaddps(ymmA, ymmB, anyptr_gpC, ymmD); a.vfmaddps(ymmA, ymmB, ymmC, anyptr_gpD); a.vfmaddsd(xmmA, xmmB, xmmC, xmmD); a.vfmaddsd(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmaddsd(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmaddss(xmmA, xmmB, xmmC, xmmD); a.vfmaddss(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmaddss(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmaddsubpd(xmmA, xmmB, xmmC, xmmD); a.vfmaddsubpd(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmaddsubpd(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmaddsubpd(ymmA, ymmB, ymmC, ymmD); a.vfmaddsubpd(ymmA, ymmB, anyptr_gpC, ymmD); a.vfmaddsubpd(ymmA, ymmB, ymmC, anyptr_gpD); a.vfmaddsubps(xmmA, xmmB, xmmC, xmmD); a.vfmaddsubps(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmaddsubps(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmaddsubps(ymmA, ymmB, ymmC, ymmD); a.vfmaddsubps(ymmA, ymmB, anyptr_gpC, ymmD); a.vfmaddsubps(ymmA, ymmB, ymmC, anyptr_gpD); a.vfmsubaddpd(xmmA, xmmB, xmmC, xmmD); a.vfmsubaddpd(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmsubaddpd(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmsubaddpd(ymmA, ymmB, ymmC, ymmD); a.vfmsubaddpd(ymmA, ymmB, anyptr_gpC, ymmD); a.vfmsubaddpd(ymmA, ymmB, ymmC, anyptr_gpD); a.vfmsubaddps(xmmA, xmmB, xmmC, xmmD); a.vfmsubaddps(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmsubaddps(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmsubaddps(ymmA, ymmB, ymmC, ymmD); a.vfmsubaddps(ymmA, ymmB, anyptr_gpC, ymmD); a.vfmsubaddps(ymmA, ymmB, ymmC, anyptr_gpD); a.vfmsubpd(xmmA, xmmB, xmmC, xmmD); a.vfmsubpd(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmsubpd(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmsubpd(ymmA, ymmB, ymmC, ymmD); a.vfmsubpd(ymmA, ymmB, anyptr_gpC, ymmD); a.vfmsubpd(ymmA, ymmB, ymmC, anyptr_gpD); a.vfmsubps(xmmA, xmmB, xmmC, xmmD); a.vfmsubps(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmsubps(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmsubps(ymmA, ymmB, ymmC, ymmD); a.vfmsubps(ymmA, ymmB, anyptr_gpC, ymmD); a.vfmsubps(ymmA, ymmB, ymmC, anyptr_gpD); a.vfmsubsd(xmmA, xmmB, xmmC, xmmD); a.vfmsubsd(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmsubsd(xmmA, xmmB, xmmC, anyptr_gpD); a.vfmsubss(xmmA, xmmB, xmmC, xmmD); a.vfmsubss(xmmA, xmmB, anyptr_gpC, xmmD); a.vfmsubss(xmmA, xmmB, xmmC, anyptr_gpD); a.vfnmaddpd(xmmA, xmmB, xmmC, xmmD); a.vfnmaddpd(xmmA, xmmB, anyptr_gpC, xmmD); a.vfnmaddpd(xmmA, xmmB, xmmC, anyptr_gpD); a.vfnmaddpd(ymmA, ymmB, ymmC, ymmD); a.vfnmaddpd(ymmA, ymmB, anyptr_gpC, ymmD); a.vfnmaddpd(ymmA, ymmB, ymmC, anyptr_gpD); a.vfnmaddps(xmmA, xmmB, xmmC, xmmD); a.vfnmaddps(xmmA, xmmB, anyptr_gpC, xmmD); a.vfnmaddps(xmmA, xmmB, xmmC, anyptr_gpD); a.vfnmaddps(ymmA, ymmB, ymmC, ymmD); a.vfnmaddps(ymmA, ymmB, anyptr_gpC, ymmD); a.vfnmaddps(ymmA, ymmB, ymmC, anyptr_gpD); a.vfnmaddsd(xmmA, xmmB, xmmC, xmmD); a.vfnmaddsd(xmmA, xmmB, anyptr_gpC, xmmD); a.vfnmaddsd(xmmA, xmmB, xmmC, anyptr_gpD); a.vfnmaddss(xmmA, xmmB, xmmC, xmmD); a.vfnmaddss(xmmA, xmmB, anyptr_gpC, xmmD); a.vfnmaddss(xmmA, xmmB, xmmC, anyptr_gpD); a.vfnmsubpd(xmmA, xmmB, xmmC, xmmD); a.vfnmsubpd(xmmA, xmmB, anyptr_gpC, xmmD); a.vfnmsubpd(xmmA, xmmB, xmmC, anyptr_gpD); a.vfnmsubpd(ymmA, ymmB, ymmC, ymmD); a.vfnmsubpd(ymmA, ymmB, anyptr_gpC, ymmD); a.vfnmsubpd(ymmA, ymmB, ymmC, anyptr_gpD); a.vfnmsubps(xmmA, xmmB, xmmC, xmmD); a.vfnmsubps(xmmA, xmmB, anyptr_gpC, xmmD); a.vfnmsubps(xmmA, xmmB, xmmC, anyptr_gpD); a.vfnmsubps(ymmA, ymmB, ymmC, ymmD); a.vfnmsubps(ymmA, ymmB, anyptr_gpC, ymmD); a.vfnmsubps(ymmA, ymmB, ymmC, anyptr_gpD); a.vfnmsubsd(xmmA, xmmB, xmmC, xmmD); a.vfnmsubsd(xmmA, xmmB, anyptr_gpC, xmmD); a.vfnmsubsd(xmmA, xmmB, xmmC, anyptr_gpD); a.vfnmsubss(xmmA, xmmB, xmmC, xmmD); a.vfnmsubss(xmmA, xmmB, anyptr_gpC, xmmD); a.vfnmsubss(xmmA, xmmB, xmmC, anyptr_gpD); // XOP. a.nop(); a.vfrczpd(xmmA, xmmB); a.vfrczpd(xmmA, anyptr_gpB); a.vfrczpd(ymmA, ymmB); a.vfrczpd(ymmA, anyptr_gpB); a.vfrczps(xmmA, xmmB); a.vfrczps(xmmA, anyptr_gpB); a.vfrczps(ymmA, ymmB); a.vfrczps(ymmA, anyptr_gpB); a.vfrczsd(xmmA, xmmB); a.vfrczsd(xmmA, anyptr_gpB); a.vfrczss(xmmA, xmmB); a.vfrczss(xmmA, anyptr_gpB); a.vpcmov(xmmA, xmmB, xmmC, xmmD); a.vpcmov(xmmA, xmmB, anyptr_gpC, xmmD); a.vpcmov(xmmA, xmmB, xmmC, anyptr_gpD); a.vpcmov(ymmA, ymmB, ymmC, ymmD); a.vpcmov(ymmA, ymmB, anyptr_gpC, ymmD); a.vpcmov(ymmA, ymmB, ymmC, anyptr_gpD); a.vpcomb(xmmA, xmmB, xmmC, 0); a.vpcomb(xmmA, xmmB, anyptr_gpC, 0); a.vpcomd(xmmA, xmmB, xmmC, 0); a.vpcomd(xmmA, xmmB, anyptr_gpC, 0); a.vpcomq(xmmA, xmmB, xmmC, 0); a.vpcomq(xmmA, xmmB, anyptr_gpC, 0); a.vpcomw(xmmA, xmmB, xmmC, 0); a.vpcomw(xmmA, xmmB, anyptr_gpC, 0); a.vpcomub(xmmA, xmmB, xmmC, 0); a.vpcomub(xmmA, xmmB, anyptr_gpC, 0); a.vpcomud(xmmA, xmmB, xmmC, 0); a.vpcomud(xmmA, xmmB, anyptr_gpC, 0); a.vpcomuq(xmmA, xmmB, xmmC, 0); a.vpcomuq(xmmA, xmmB, anyptr_gpC, 0); a.vpcomuw(xmmA, xmmB, xmmC, 0); a.vpcomuw(xmmA, xmmB, anyptr_gpC, 0); a.vpermil2pd(xmmA, xmmB, xmmC, xmmD); a.vpermil2pd(xmmA, xmmB, anyptr_gpC, xmmD); a.vpermil2pd(xmmA, xmmB, xmmC, anyptr_gpD); a.vpermil2pd(ymmA, ymmB, ymmC, ymmD); a.vpermil2pd(ymmA, ymmB, anyptr_gpC, ymmD); a.vpermil2pd(ymmA, ymmB, ymmC, anyptr_gpD); a.vpermil2ps(xmmA, xmmB, xmmC, xmmD); a.vpermil2ps(xmmA, xmmB, anyptr_gpC, xmmD); a.vpermil2ps(xmmA, xmmB, xmmC, anyptr_gpD); a.vpermil2ps(ymmA, ymmB, ymmC, ymmD); a.vpermil2ps(ymmA, ymmB, anyptr_gpC, ymmD); a.vpermil2ps(ymmA, ymmB, ymmC, anyptr_gpD); a.vphaddbd(xmmA, xmmB); a.vphaddbd(xmmA, anyptr_gpB); a.vphaddbq(xmmA, xmmB); a.vphaddbq(xmmA, anyptr_gpB); a.vphaddbw(xmmA, xmmB); a.vphaddbw(xmmA, anyptr_gpB); a.vphadddq(xmmA, xmmB); a.vphadddq(xmmA, anyptr_gpB); a.vphaddwd(xmmA, xmmB); a.vphaddwd(xmmA, anyptr_gpB); a.vphaddwq(xmmA, xmmB); a.vphaddwq(xmmA, anyptr_gpB); a.vphaddubd(xmmA, xmmB); a.vphaddubd(xmmA, anyptr_gpB); a.vphaddubq(xmmA, xmmB); a.vphaddubq(xmmA, anyptr_gpB); a.vphaddubw(xmmA, xmmB); a.vphaddubw(xmmA, anyptr_gpB); a.vphaddudq(xmmA, xmmB); a.vphaddudq(xmmA, anyptr_gpB); a.vphadduwd(xmmA, xmmB); a.vphadduwd(xmmA, anyptr_gpB); a.vphadduwq(xmmA, xmmB); a.vphadduwq(xmmA, anyptr_gpB); a.vphsubbw(xmmA, xmmB); a.vphsubbw(xmmA, anyptr_gpB); a.vphsubdq(xmmA, xmmB); a.vphsubdq(xmmA, anyptr_gpB); a.vphsubwd(xmmA, xmmB); a.vphsubwd(xmmA, anyptr_gpB); a.vpmacsdd(xmmA, xmmB, xmmC, xmmD); a.vpmacsdd(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmacsdqh(xmmA, xmmB, xmmC, xmmD); a.vpmacsdqh(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmacsdql(xmmA, xmmB, xmmC, xmmD); a.vpmacsdql(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmacswd(xmmA, xmmB, xmmC, xmmD); a.vpmacswd(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmacsww(xmmA, xmmB, xmmC, xmmD); a.vpmacsww(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmacssdd(xmmA, xmmB, xmmC, xmmD); a.vpmacssdd(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmacssdqh(xmmA, xmmB, xmmC, xmmD); a.vpmacssdqh(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmacssdql(xmmA, xmmB, xmmC, xmmD); a.vpmacssdql(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmacsswd(xmmA, xmmB, xmmC, xmmD); a.vpmacsswd(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmacssww(xmmA, xmmB, xmmC, xmmD); a.vpmacssww(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmadcsswd(xmmA, xmmB, xmmC, xmmD); a.vpmadcsswd(xmmA, xmmB, anyptr_gpC, xmmD); a.vpmadcswd(xmmA, xmmB, xmmC, xmmD); a.vpmadcswd(xmmA, xmmB, anyptr_gpC, xmmD); a.vpperm(xmmA, xmmB, xmmC, xmmD); a.vpperm(xmmA, xmmB, anyptr_gpC, xmmD); a.vpperm(xmmA, xmmB, xmmC, anyptr_gpD); a.vprotb(xmmA, xmmB, xmmC); a.vprotb(xmmA, anyptr_gpB, xmmC); a.vprotb(xmmA, xmmB, anyptr_gpC); a.vprotb(xmmA, xmmB, 0); a.vprotb(xmmA, anyptr_gpB, 0); a.vprotd(xmmA, xmmB, xmmC); a.vprotd(xmmA, anyptr_gpB, xmmC); a.vprotd(xmmA, xmmB, anyptr_gpC); a.vprotd(xmmA, xmmB, 0); a.vprotd(xmmA, anyptr_gpB, 0); a.vprotq(xmmA, xmmB, xmmC); a.vprotq(xmmA, anyptr_gpB, xmmC); a.vprotq(xmmA, xmmB, anyptr_gpC); a.vprotq(xmmA, xmmB, 0); a.vprotq(xmmA, anyptr_gpB, 0); a.vprotw(xmmA, xmmB, xmmC); a.vprotw(xmmA, anyptr_gpB, xmmC); a.vprotw(xmmA, xmmB, anyptr_gpC); a.vprotw(xmmA, xmmB, 0); a.vprotw(xmmA, anyptr_gpB, 0); a.vpshab(xmmA, xmmB, xmmC); a.vpshab(xmmA, anyptr_gpB, xmmC); a.vpshab(xmmA, xmmB, anyptr_gpC); a.vpshad(xmmA, xmmB, xmmC); a.vpshad(xmmA, anyptr_gpB, xmmC); a.vpshad(xmmA, xmmB, anyptr_gpC); a.vpshaq(xmmA, xmmB, xmmC); a.vpshaq(xmmA, anyptr_gpB, xmmC); a.vpshaq(xmmA, xmmB, anyptr_gpC); a.vpshaw(xmmA, xmmB, xmmC); a.vpshaw(xmmA, anyptr_gpB, xmmC); a.vpshaw(xmmA, xmmB, anyptr_gpC); a.vpshlb(xmmA, xmmB, xmmC); a.vpshlb(xmmA, anyptr_gpB, xmmC); a.vpshlb(xmmA, xmmB, anyptr_gpC); a.vpshld(xmmA, xmmB, xmmC); a.vpshld(xmmA, anyptr_gpB, xmmC); a.vpshld(xmmA, xmmB, anyptr_gpC); a.vpshlq(xmmA, xmmB, xmmC); a.vpshlq(xmmA, anyptr_gpB, xmmC); a.vpshlq(xmmA, xmmB, anyptr_gpC); a.vpshlw(xmmA, xmmB, xmmC); a.vpshlw(xmmA, anyptr_gpB, xmmC); a.vpshlw(xmmA, xmmB, anyptr_gpC); // BMI. a.nop(); a.andn(gzA, gzB, gzC); a.andn(gzA, gzB, anyptr_gpC); a.bextr(gzA, gzB, gzC); a.bextr(gzA, anyptr_gpB, gzC); a.blsi(gzA, gzB); a.blsi(gzA, anyptr_gpB); a.blsmsk(gzA, gzB); a.blsmsk(gzA, anyptr_gpB); a.blsr(gzA, gzB); a.blsr(gzA, anyptr_gpB); // LZCNT. a.nop(); a.lzcnt(gzA, gzB); a.lzcnt(gzA, anyptr_gpB); // TZCNT. a.nop(); a.tzcnt(gzA, gzB); a.tzcnt(gzA, anyptr_gpB); // BMI2. a.nop(); a.bzhi(gzA, gzB, gzC); a.bzhi(gzA, anyptr_gpB, gzC); a.mulx(gzA, gzB, gzC); a.mulx(gzA, gzB, anyptr_gpC); a.pdep(gzA, gzB, gzC); a.pdep(gzA, gzB, anyptr_gpC); a.pext(gzA, gzB, gzC); a.pext(gzA, gzB, anyptr_gpC); a.rorx(gzA, gzB, 0); a.rorx(gzA, anyptr_gpB, 0); a.sarx(gzA, gzB, gzC); a.sarx(gzA, anyptr_gpB, gzC); a.shlx(gzA, gzB, gzC); a.shlx(gzA, anyptr_gpB, gzC); a.shrx(gzA, gzB, gzC); a.shrx(gzA, anyptr_gpB, gzC); // RDRAND. a.nop(); a.rdrand(gzA); // F16C. a.nop(); a.vcvtph2ps(xmmA, xmmB); a.vcvtph2ps(xmmA, anyptr_gpB); a.vcvtph2ps(ymmA, xmmB); a.vcvtph2ps(ymmA, anyptr_gpB); a.vcvtps2ph(xmmA, xmmB, 0); a.vcvtps2ph(anyptr_gpA, xmmB, 0); a.vcvtps2ph(xmmA, ymmB, 0); a.vcvtps2ph(anyptr_gpA, ymmB, 0); // Mark the end of the stream. a.nop(); } } // asmgen namespace // [Guard] #endif // _TEST_ASMJIT_TEST_OPCODE_H
28.580105
89
0.661916
f6c15329173e762668aad1272af67af78700f423
1,346
h
C
wpilibc/src/main/native/include/frc/IterativeRobot.h
gcjurgiel/allwpilib
99f3a64dff0eba07be9b2e6c53753aafa0c852d8
[ "BSD-3-Clause" ]
1
2021-04-07T01:51:18.000Z
2021-04-07T01:51:18.000Z
wpilibc/src/main/native/include/frc/IterativeRobot.h
gcjurgiel/allwpilib
99f3a64dff0eba07be9b2e6c53753aafa0c852d8
[ "BSD-3-Clause" ]
6
2021-02-19T00:40:42.000Z
2021-04-01T22:15:54.000Z
wpilibc/src/main/native/include/frc/IterativeRobot.h
gcjurgiel/allwpilib
99f3a64dff0eba07be9b2e6c53753aafa0c852d8
[ "BSD-3-Clause" ]
1
2022-02-16T16:13:24.000Z
2022-02-16T16:13:24.000Z
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #pragma once #include <atomic> #include "frc/IterativeRobotBase.h" namespace frc { /** * IterativeRobot implements the IterativeRobotBase robot program framework. * * The IterativeRobot class is intended to be subclassed by a user creating a * robot program. * * Periodic() functions from the base class are called each time a new packet is * received from the driver station. * * @deprecated Use TimedRobot instead. It's a drop-in replacement that provides * more regular execution periods. */ class IterativeRobot : public IterativeRobotBase { public: WPI_DEPRECATED( "Use TimedRobot instead. It's a drop-in replacement that provides more " "regular execution periods.") IterativeRobot(); ~IterativeRobot() override = default; /** * Provide an alternate "main loop" via StartCompetition(). * * This specific StartCompetition() implements "main loop" behavior synced * with the DS packets. */ void StartCompetition() override; /** * Ends the main loop in StartCompetition(). */ void EndCompetition() override; private: std::atomic<bool> m_exit{false}; }; } // namespace frc
26.392157
80
0.722883
6b1b0dce7a9457661b58aab682375db5168b2d26
1,620
h
C
client/src/gui/FrmSaveChat.h
bateman/speech-translation-tools
cb1c92895b329b32678d5037cbe36bc43bdf3e5d
[ "MIT" ]
null
null
null
client/src/gui/FrmSaveChat.h
bateman/speech-translation-tools
cb1c92895b329b32678d5037cbe36bc43bdf3e5d
[ "MIT" ]
null
null
null
client/src/gui/FrmSaveChat.h
bateman/speech-translation-tools
cb1c92895b329b32678d5037cbe36bc43bdf3e5d
[ "MIT" ]
null
null
null
#ifndef __FRMSAVECHAT_H__ #define __FRMSAVECHAT__ #include <wx/wx.h> #include <wx/artprov.h> #include <wx/xrc/xmlres.h> #include <wx/string.h> #include <wx/stattext.h> #include <wx/gdicmn.h> #include <wx/font.h> #include <wx/colour.h> #include <wx/settings.h> #include <wx/bitmap.h> #include <wx/image.h> #include <wx/icon.h> #include <wx/statbmp.h> #include <wx/sizer.h> #include <wx/radiobut.h> #include <wx/checkbox.h> #include <wx/filepicker.h> #include <wx/button.h> #include <wx/panel.h> #include "../../res/ico_save.xpm" #include <time.h> #include <wx/checkbox.h> #include <wx/filepicker.h> #include <stdio.h> #include "..\translateController\translateVariable.h" #include "..\GlobalVariables.h" class FrmSaveChat : public wxDialog { private: void OnClose(wxCloseEvent& event); void saveChatCSV(const char* filename); void saveChatTXT(const char* filename); FILE*config; char destination[3000]; protected: wxStaticText* lblTitle; wxStaticBitmap* m_bitmap2; wxCheckBox* chkCSV; wxCheckBox* chkTXT; wxStaticText* lblSaveIn; wxDirPickerCtrl* fpkBrowse; wxButton* btnConfirm; // Virtual event handlers, overide them in your derived class void btnConfirmClick(wxCommandEvent& event); void checkBoxSelection(wxCommandEvent& event); public: FrmSaveChat(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString &title = labels.saveMenu, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION | wxSYSTEM_MENU | wxSTAY_ON_TOP | wxCLOSE_BOX | wxRESIZE_BORDER); ~FrmSaveChat(); }; #endif
25.714286
98
0.719753
87e3c1eb8130d429a641f5d94f4e00991a9692cf
260
cats
C
contrib/GTK/CATS/gtk/gtkhseparator.cats
steinwaywhw/ATS-Postiats-contrib
6e5268649a3b91158445cb665d9102f1ee1cdfbf
[ "MIT" ]
46
2015-01-12T16:24:42.000Z
2021-05-21T14:21:22.000Z
contrib/GTK/CATS/gtk/gtkhseparator.cats
steinwaywhw/ATS-Postiats-contrib
6e5268649a3b91158445cb665d9102f1ee1cdfbf
[ "MIT" ]
12
2015-01-16T20:36:07.000Z
2019-04-04T14:40:27.000Z
contrib/GTK/CATS/gtk/gtkhseparator.cats
steinwaywhw/ATS-Postiats-contrib
6e5268649a3b91158445cb665d9102f1ee1cdfbf
[ "MIT" ]
17
2015-03-04T07:01:17.000Z
2021-09-08T16:08:46.000Z
/* ** source: gtkhseparator.h */ /* ****** ****** */ /* ** There is a floating reference for GtkHSeparators */ #define atscntrb_gtk_hseparator_new() \ g_object_ref_sink(G_OBJECT(gtk_hseparator_new())) /* ****** ****** */ /* end of [gtkhseparator.cats] */
17.333333
51
0.615385
c66821a339b7a2f51e4a91a226269067e3bf9a01
667
h
C
oppred.h
davidtea/Predator-Prey
e31840e7bc83d72baa3a16a0b73dfbb571460d2a
[ "MIT" ]
null
null
null
oppred.h
davidtea/Predator-Prey
e31840e7bc83d72baa3a16a0b73dfbb571460d2a
[ "MIT" ]
null
null
null
oppred.h
davidtea/Predator-Prey
e31840e7bc83d72baa3a16a0b73dfbb571460d2a
[ "MIT" ]
null
null
null
#ifndef OPPRED_H #define OPPRED_H #include "creature.h" class OPpred : public Creature { public: OPpred(); OPpred(int x, int y); ~OPpred(){}; void Move(Creature* grid[][YLEN]); void Breed(Creature* grid[][YLEN]); void Die(Creature* grid[][YLEN]); void Eat(Creature* grid[][YLEN]);//eats everything around it, except for its own type, teleports, //and walls. Doesn't breed, only spawns from teleport, lasts 50 steps. int* AvailPrey(Creature* grid[][YLEN]);//like availspots for creature, except checks for prey instead void Show(ostream &out); private: int starvecounter; }; #endif // OPPRED_H
25.653846
106
0.647676
f42be6f43b2cba34f3c0cbdd1b3193dcc7c9b75a
2,127
h
C
features/query/include/conn-pool.h
couchbase/eventing
970ee10786b6ee813c4d76ede81599e7d0698e28
[ "Apache-2.0" ]
25
2017-01-12T16:39:39.000Z
2021-04-26T19:48:32.000Z
features/query/include/conn-pool.h
couchbase/eventing
970ee10786b6ee813c4d76ede81599e7d0698e28
[ "Apache-2.0" ]
null
null
null
features/query/include/conn-pool.h
couchbase/eventing
970ee10786b6ee813c4d76ede81599e7d0698e28
[ "Apache-2.0" ]
158
2017-05-24T06:00:09.000Z
2022-03-28T09:18:04.000Z
// Copyright (c) 2019 Couchbase, Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an "AS IS" // BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express // or implied. See the License for the specific language governing // permissions and limitations under the License. #ifndef CONN_POOL_H #define CONN_POOL_H #include <libcouchbase/couchbase.h> #include <mutex> #include <queue> #include <string> #include <utility> #include <v8.h> #include "info.h" namespace Connection { struct Info : public ::Info { Info() = delete; Info(bool is_fatal) : ::Info(is_fatal) {} Info(bool is_fatal, const std::string &msg) : ::Info(is_fatal, msg) {} Info(lcb_INSTANCE *instance) : ::Info(false), connection(instance) {} lcb_INSTANCE *connection{nullptr}; }; class Pool { public: explicit Pool(std::size_t capacity, std::string conn_str, v8::Isolate *isolate) : isolate_(isolate), src_bucket_(std::move(conn_str)), capacity_(capacity) {} ~Pool(); Pool() = delete; Pool(Pool &&) = delete; Pool(const Pool &) = delete; Pool &operator=(Pool &&) = delete; Pool &operator=(const Pool &) = delete; void DestroyAllConnectionsInPoolLocked(); Connection::Info GetConnection(); void RestoreConnection(lcb_INSTANCE *connection); void RefreshTopConnection(); private: void ScavengeIfNeeded(); Connection::Info CreateConnection() const; Connection::Info FormatErrorAndDestroyConn(const std::string &message, lcb_INSTANCE *connection, lcb_STATUS error) const; v8::Isolate *isolate_; std::string src_bucket_; const std::size_t capacity_; std::size_t current_size_{0}; std::deque<lcb_INSTANCE *> pool_; std::mutex pool_sync_; }; } // namespace Connection #endif
30.385714
72
0.685943
715cee512f2d9da990529bb55a4fab82434d6c34
11,448
h
C
unicorn/qemu/include/exec/cpu_ldst.h
clayne/unicorn_pe
592bed62735d746c910609546c0db00c5771ae01
[ "MIT" ]
491
2019-01-02T02:43:49.000Z
2022-03-29T11:43:07.000Z
unicorn/qemu/include/exec/cpu_ldst.h
clayne/unicorn_pe
592bed62735d746c910609546c0db00c5771ae01
[ "MIT" ]
29
2019-01-02T03:04:34.000Z
2022-03-23T10:23:58.000Z
unicorn/qemu/include/exec/cpu_ldst.h
clayne/unicorn_pe
592bed62735d746c910609546c0db00c5771ae01
[ "MIT" ]
161
2019-01-02T03:02:47.000Z
2022-03-03T08:48:53.000Z
/* * Software MMU support * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <http://www.gnu.org/licenses/>. * */ /* * Generate inline load/store functions for all MMU modes (typically * at least _user and _kernel) as well as _data versions, for all data * sizes. * * Used by target op helpers. * * MMU mode suffixes are defined in target cpu.h. */ #ifndef CPU_LDST_H #define CPU_LDST_H #if defined(CONFIG_USER_ONLY) /* All direct uses of g2h and h2g need to go away for usermode softmmu. */ #define g2h(x) ((void *)((unsigned long)(target_ulong)(x) + GUEST_BASE)) #if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS #define h2g_valid(x) 1 #else #define h2g_valid(x) ({ \ unsigned long __guest = (unsigned long)(x) - GUEST_BASE; \ (__guest < (1ul << TARGET_VIRT_ADDR_SPACE_BITS)) && \ (!RESERVED_VA || (__guest < RESERVED_VA)); \ }) #endif #define h2g_nocheck(x) ({ \ unsigned long __ret = (unsigned long)(x) - GUEST_BASE; \ (abi_ulong)__ret; \ }) #define h2g(x) ({ \ /* Check if given address fits target address space */ \ assert(h2g_valid(x)); \ h2g_nocheck(x); \ }) #define saddr(x) g2h(x) #define laddr(x) g2h(x) #else /* !CONFIG_USER_ONLY */ /* NOTE: we use double casts if pointers and target_ulong have different sizes */ #define saddr(x) (uint8_t *)(intptr_t)(x) #define laddr(x) (uint8_t *)(intptr_t)(x) #endif #define ldub_raw(p) ldub_p(laddr((p))) #define ldsb_raw(p) ldsb_p(laddr((p))) #define lduw_raw(p) lduw_p(laddr((p))) #define ldsw_raw(p) ldsw_p(laddr((p))) #define ldl_raw(p) ldl_p(laddr((p))) #define ldq_raw(p) ldq_p(laddr((p))) #define ldfl_raw(p) ldfl_p(laddr((p))) #define ldfq_raw(p) ldfq_p(laddr((p))) #define stb_raw(p, v) stb_p(saddr((p)), v) #define stw_raw(p, v) stw_p(saddr((p)), v) #define stl_raw(p, v) stl_p(saddr((p)), v) #define stq_raw(p, v) stq_p(saddr((p)), v) #define stfl_raw(p, v) stfl_p(saddr((p)), v) #define stfq_raw(p, v) stfq_p(saddr((p)), v) #if defined(CONFIG_USER_ONLY) /* if user mode, no other memory access functions */ #define ldub(p) ldub_raw(p) #define ldsb(p) ldsb_raw(p) #define lduw(p) lduw_raw(p) #define ldsw(p) ldsw_raw(p) #define ldl(p) ldl_raw(p) #define ldq(p) ldq_raw(p) #define ldfl(p) ldfl_raw(p) #define ldfq(p) ldfq_raw(p) #define stb(p, v) stb_raw(p, v) #define stw(p, v) stw_raw(p, v) #define stl(p, v) stl_raw(p, v) #define stq(p, v) stq_raw(p, v) #define stfl(p, v) stfl_raw(p, v) #define stfq(p, v) stfq_raw(p, v) #define cpu_ldub_code(env1, p) ldub_raw(p) #define cpu_ldsb_code(env1, p) ldsb_raw(p) #define cpu_lduw_code(env1, p) lduw_raw(p) #define cpu_ldsw_code(env1, p) ldsw_raw(p) #define cpu_ldl_code(env1, p) ldl_raw(p) #define cpu_ldq_code(env1, p) ldq_raw(p) #define cpu_ldub_data(env, addr) ldub_raw(addr) #define cpu_lduw_data(env, addr) lduw_raw(addr) #define cpu_ldsw_data(env, addr) ldsw_raw(addr) #define cpu_ldl_data(env, addr) ldl_raw(addr) #define cpu_ldq_data(env, addr) ldq_raw(addr) #define cpu_stb_data(env, addr, data) stb_raw(addr, data) #define cpu_stw_data(env, addr, data) stw_raw(addr, data) #define cpu_stl_data(env, addr, data) stl_raw(addr, data) #define cpu_stq_data(env, addr, data) stq_raw(addr, data) #define cpu_ldub_kernel(env, addr) ldub_raw(addr) #define cpu_lduw_kernel(env, addr) lduw_raw(addr) #define cpu_ldsw_kernel(env, addr) ldsw_raw(addr) #define cpu_ldl_kernel(env, addr) ldl_raw(addr) #define cpu_ldq_kernel(env, addr) ldq_raw(addr) #define cpu_stb_kernel(env, addr, data) stb_raw(addr, data) #define cpu_stw_kernel(env, addr, data) stw_raw(addr, data) #define cpu_stl_kernel(env, addr, data) stl_raw(addr, data) #define cpu_stq_kernel(env, addr, data) stq_raw(addr, data) #define ldub_kernel(p) ldub_raw(p) #define ldsb_kernel(p) ldsb_raw(p) #define lduw_kernel(p) lduw_raw(p) #define ldsw_kernel(p) ldsw_raw(p) #define ldl_kernel(p) ldl_raw(p) #define ldq_kernel(p) ldq_raw(p) #define ldfl_kernel(p) ldfl_raw(p) #define ldfq_kernel(p) ldfq_raw(p) #define stb_kernel(p, v) stb_raw(p, v) #define stw_kernel(p, v) stw_raw(p, v) #define stl_kernel(p, v) stl_raw(p, v) #define stq_kernel(p, v) stq_raw(p, v) #define stfl_kernel(p, v) stfl_raw(p, v) #define stfq_kernel(p, vt) stfq_raw(p, v) #define cpu_ldub_data(env, addr) ldub_raw(addr) #define cpu_lduw_data(env, addr) lduw_raw(addr) #define cpu_ldl_data(env, addr) ldl_raw(addr) #define cpu_stb_data(env, addr, data) stb_raw(addr, data) #define cpu_stw_data(env, addr, data) stw_raw(addr, data) #define cpu_stl_data(env, addr, data) stl_raw(addr, data) #else /* XXX: find something cleaner. * Furthermore, this is false for 64 bits targets */ #define ldul_user ldl_user #define ldul_kernel ldl_kernel #define ldul_hypv ldl_hypv #define ldul_executive ldl_executive #define ldul_supervisor ldl_supervisor /* The memory helpers for tcg-generated code need tcg_target_long etc. */ #include "tcg.h" uint8_t helper_ldb_mmu(CPUArchState *env, target_ulong addr, int mmu_idx); uint16_t helper_ldw_mmu(CPUArchState *env, target_ulong addr, int mmu_idx); uint32_t helper_ldl_mmu(CPUArchState *env, target_ulong addr, int mmu_idx); uint64_t helper_ldq_mmu(CPUArchState *env, target_ulong addr, int mmu_idx); void helper_stb_mmu(CPUArchState *env, target_ulong addr, uint8_t val, int mmu_idx); void helper_stw_mmu(CPUArchState *env, target_ulong addr, uint16_t val, int mmu_idx); void helper_stl_mmu(CPUArchState *env, target_ulong addr, uint32_t val, int mmu_idx); void helper_stq_mmu(CPUArchState *env, target_ulong addr, uint64_t val, int mmu_idx); uint8_t helper_ldb_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx); uint16_t helper_ldw_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx); uint32_t helper_ldl_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx); uint64_t helper_ldq_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx); #define CPU_MMU_INDEX 0 #define MEMSUFFIX MMU_MODE0_SUFFIX #define DATA_SIZE 1 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 2 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 4 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 8 #include "exec/cpu_ldst_template.h" #undef CPU_MMU_INDEX #undef MEMSUFFIX #define CPU_MMU_INDEX 1 #define MEMSUFFIX MMU_MODE1_SUFFIX #define DATA_SIZE 1 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 2 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 4 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 8 #include "exec/cpu_ldst_template.h" #undef CPU_MMU_INDEX #undef MEMSUFFIX #if (NB_MMU_MODES >= 3) #define CPU_MMU_INDEX 2 #define MEMSUFFIX MMU_MODE2_SUFFIX #define DATA_SIZE 1 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 2 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 4 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 8 #include "exec/cpu_ldst_template.h" #undef CPU_MMU_INDEX #undef MEMSUFFIX #endif /* (NB_MMU_MODES >= 3) */ #if (NB_MMU_MODES >= 4) #define CPU_MMU_INDEX 3 #define MEMSUFFIX MMU_MODE3_SUFFIX #define DATA_SIZE 1 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 2 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 4 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 8 #include "exec/cpu_ldst_template.h" #undef CPU_MMU_INDEX #undef MEMSUFFIX #endif /* (NB_MMU_MODES >= 4) */ #if (NB_MMU_MODES >= 5) #define CPU_MMU_INDEX 4 #define MEMSUFFIX MMU_MODE4_SUFFIX #define DATA_SIZE 1 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 2 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 4 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 8 #include "exec/cpu_ldst_template.h" #undef CPU_MMU_INDEX #undef MEMSUFFIX #endif /* (NB_MMU_MODES >= 5) */ #if (NB_MMU_MODES >= 6) #define CPU_MMU_INDEX 5 #define MEMSUFFIX MMU_MODE5_SUFFIX #define DATA_SIZE 1 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 2 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 4 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 8 #include "exec/cpu_ldst_template.h" #undef CPU_MMU_INDEX #undef MEMSUFFIX #endif /* (NB_MMU_MODES >= 6) */ #if (NB_MMU_MODES > 6) #error "NB_MMU_MODES > 6 is not supported for now" #endif /* (NB_MMU_MODES > 6) */ /* these access are slower, they must be as rare as possible */ #define CPU_MMU_INDEX (cpu_mmu_index(env)) #define MEMSUFFIX _data #define DATA_SIZE 1 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 2 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 4 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 8 #include "exec/cpu_ldst_template.h" #undef CPU_MMU_INDEX #undef MEMSUFFIX #define ldub(p) ldub_data(p) #define ldsb(p) ldsb_data(p) #define lduw(p) lduw_data(p) #define ldsw(p) ldsw_data(p) #define ldl(p) ldl_data(p) #define ldq(p) ldq_data(p) #define stb(p, v) stb_data(p, v) #define stw(p, v) stw_data(p, v) #define stl(p, v) stl_data(p, v) #define stq(p, v) stq_data(p, v) #define CPU_MMU_INDEX (cpu_mmu_index(env)) #define MEMSUFFIX _code #define SOFTMMU_CODE_ACCESS #define DATA_SIZE 1 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 2 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 4 #include "exec/cpu_ldst_template.h" #define DATA_SIZE 8 #include "exec/cpu_ldst_template.h" #undef CPU_MMU_INDEX #undef MEMSUFFIX #undef SOFTMMU_CODE_ACCESS /** * tlb_vaddr_to_host: * @env: CPUArchState * @addr: guest virtual address to look up * @access_type: 0 for read, 1 for write, 2 for execute * @mmu_idx: MMU index to use for lookup * * Look up the specified guest virtual index in the TCG softmmu TLB. * If the TLB contains a host virtual address suitable for direct RAM * access, then return it. Otherwise (TLB miss, TLB entry is for an * I/O access, etc) return NULL. * * This is the equivalent of the initial fast-path code used by * TCG backends for guest load and store accesses. */ static inline void *tlb_vaddr_to_host(CPUArchState *env, target_ulong addr, int access_type, int mmu_idx) { int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); CPUTLBEntry *tlbentry = &env->tlb_table[mmu_idx][index]; target_ulong tlb_addr; uintptr_t haddr; switch (access_type) { case 0: tlb_addr = tlbentry->addr_read; break; case 1: tlb_addr = tlbentry->addr_write; break; case 2: tlb_addr = tlbentry->addr_code; break; default: g_assert_not_reached(); } if ((addr & TARGET_PAGE_MASK) != (tlb_addr & (TARGET_PAGE_MASK | TLB_INVALID_MASK))) { /* TLB entry is for a different page */ return NULL; } if (tlb_addr & ~TARGET_PAGE_MASK) { /* IO access */ return NULL; } haddr = (uintptr_t)(addr + env->tlb_table[mmu_idx][index].addend); return (void *)haddr; } #endif /* defined(CONFIG_USER_ONLY) */ #endif /* CPU_LDST_H */
28.548628
79
0.727638
0998ec31d250de7262068fbf3aff1eef40c911bb
2,449
h
C
dev/Code/Sandbox/Editor/TrackView/TrackViewCameraNode.h
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
dev/Code/Sandbox/Editor/TrackView/TrackViewCameraNode.h
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
dev/Code/Sandbox/Editor/TrackView/TrackViewCameraNode.h
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ // Original file Copyright Crytek GMBH or its affiliates, used under license. #ifndef CRYINCLUDE_EDITOR_TRACKVIEW_TRACKVIEWCAMERANODE_H #define CRYINCLUDE_EDITOR_TRACKVIEW_TRACKVIEWCAMERANODE_H #pragma once #include "TrackViewAnimNode.h" #include "Objects/CameraObject.h" //////////////////////////////////////////////////////////////////////////// // // This class represents an IAnimNode that is a camera // //////////////////////////////////////////////////////////////////////////// class CTrackViewCameraNode : public CTrackViewAnimNode , public ICameraObjectListener { public: CTrackViewCameraNode(IAnimSequence* pSequence, IAnimNode* pAnimNode, CTrackViewNode* pParentNode) : CTrackViewAnimNode(pSequence, pAnimNode, pParentNode) {} virtual void OnNodeAnimated(IAnimNode* pNode) override; virtual void BindToEditorObjects() override; virtual void UnBindFromEditorObjects() override; // Get camera shake rotation void GetShakeRotation(const float time, Quat& rotation); private: virtual void OnFovChange(const float fov); virtual void OnNearZChange(const float nearZ); virtual void OnFarZChange(const float farZ) {} virtual void OnShakeAmpAChange(const Vec3 amplitude); virtual void OnShakeAmpBChange(const Vec3 amplitude); virtual void OnShakeFreqAChange(const Vec3 frequency); virtual void OnShakeFreqBChange(const Vec3 frequency); virtual void OnShakeMultChange(const float amplitudeAMult, const float amplitudeBMult, const float frequencyAMult, const float frequencyBMult); virtual void OnShakeNoiseChange(const float noiseAAmpMult, const float noiseBAmpMult, const float noiseAFreqMult, const float noiseBFreqMult); virtual void OnShakeWorkingChange(const float timeOffsetA, const float timeOffsetB); virtual void OnCameraShakeSeedChange(const int seed); }; #endif // CRYINCLUDE_EDITOR_TRACKVIEW_TRACKVIEWCAMERANODE_H
42.964912
147
0.738261
5d046063cf142bdce6369263eb6462ce30a4506a
4,728
c
C
[23]_Clone_an_MT19937_RNG/main.c
lucasg/Cryptopals
095e80d0ab9acdda4e5804b45cdba932231086ff
[ "MIT" ]
19
2016-08-01T03:45:39.000Z
2022-02-01T19:48:52.000Z
[23]_Clone_an_MT19937_RNG/main.c
lucasg/Cryptopals
095e80d0ab9acdda4e5804b45cdba932231086ff
[ "MIT" ]
null
null
null
[23]_Clone_an_MT19937_RNG/main.c
lucasg/Cryptopals
095e80d0ab9acdda4e5804b45cdba932231086ff
[ "MIT" ]
6
2019-04-27T02:09:46.000Z
2021-04-05T15:09:51.000Z
#include "mt19937.h" #include <time.h> #include <unistd.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #define MT19937_MAGIC_A (0x9d2c5680) #define MT19937_MAGIC_B (0xefc60000) static uint32_t mt_output[2*MT19937_ARRAY_LEN]; static uint32_t mt_predicted[MT19937_ARRAY_LEN]; /* * Little unit tester for the untempering function in order to make it work */ void test_untemper(const uint32_t val) { size_t i; uint32_t temp_steps[5], untemp_steps[5]; // Tempering steps temp_steps[0] = val; temp_steps[1] = temp_steps[0] ^ (temp_steps[0] >> 11); temp_steps[2] = temp_steps[1] ^ ((temp_steps[1] << 7) & MT19937_MAGIC_A); temp_steps[3] = temp_steps[2] ^ ((temp_steps[2] << 15) & MT19937_MAGIC_B); temp_steps[4] = temp_steps[3] ^ (temp_steps[3] >> 18); // Untempering steps untemp_steps[0] = temp_steps[4]; untemp_steps[1] = untemp_steps[0] ^ (untemp_steps[0] >> 18); untemp_steps[2] = (untemp_steps[1] ) ^ ((untemp_steps[1] << 15) & MT19937_MAGIC_B); untemp_steps[3] = ( untemp_steps[2] ) ^ ((untemp_steps[2] << 7 ) & MT19937_MAGIC_A) ^ ((((untemp_steps[2] << 7) & MT19937_MAGIC_A) << 7) & MT19937_MAGIC_A) ^ ((((((untemp_steps[2] << 7) & MT19937_MAGIC_A) << 7) & MT19937_MAGIC_A) << 7) & MT19937_MAGIC_A) ^ ((((((((untemp_steps[2] << 7) & MT19937_MAGIC_A) << 7) & MT19937_MAGIC_A) << 7) & MT19937_MAGIC_A) << 7) & MT19937_MAGIC_A); untemp_steps[4] = untemp_steps[3] ^ (untemp_steps[3] >> 11) ^ (untemp_steps[3] >> 22); for (i = 0; i < 5; i++) if (untemp_steps[4] != temp_steps[0]) printf("Tempering steps %zu: 0x%02x - 0x%02x \n", i, temp_steps[i], untemp_steps[4-i]); } /* * Actual untempering function. Rely on the fact that logical shifts (llr and lrr) * drops (over/under)flowing bits. */ uint32_t untemper_value(const uint32_t temp_val) { size_t i; uint32_t tmp, untempered; // Step 4 : x ^= x >> 18 untempered = temp_val ^ (temp_val >> 18); // Step 3 : x ^= (x << 15) ^ b untempered ^= ((untempered << 15) & MT19937_MAGIC_B); // Step 2 : x ^= (x << 7) ^ a tmp = ((untempered << 7 ) & MT19937_MAGIC_A); for (i = 0; i < 4; i++) { untempered ^= tmp; tmp = ((tmp << 7 ) & MT19937_MAGIC_A); } // Step 1 : x ^= x >> 11 untempered ^= (untempered >> 11) ^ (untempered >> 22); return untempered; } /* * Compute the array of following untempered states, based on * the previous ones. This function is copied from the mt19337 lib. */ void generate_predicted_states(uint32_t mt_states[]) { uint32_t tmp; unsigned int i; for (i = 0; i < MT19937_ARRAY_LEN; i++) { tmp = (mt_states[i] & 0x80000000) + (mt_states[(i+1) % MT19937_ARRAY_LEN] & 0x7fffffff); mt_states[i] = mt_states[(i+397) % MT19937_ARRAY_LEN] ^ (tmp >> 1); if (tmp % 2) mt_states[i] ^= 0x9908b0df; } } /* * Given a round of mt19937 output, predict the following values by reversing the * tempering function and use the discovered internal states to generate the following ones. */ void predict_rng_output(uint32_t mt_predicted[], const uint32_t mt_output[], size_t pred_len) { size_t i, r; uint32_t mt_states[MT19937_ARRAY_LEN]; for (i = 0; i < MT19937_ARRAY_LEN; i++) mt_states[i] = untemper_value(mt_output[i]); generate_predicted_states(mt_states); for (r = 0; r < pred_len; r += MT19937_ARRAY_LEN) { uint32_t cpy_len = (pred_len - r < MT19937_ARRAY_LEN) ? pred_len : MT19937_ARRAY_LEN; memcpy(mt_predicted + r, mt_states, cpy_len*sizeof(uint32_t)); // Tempering for (i = r; i < r + cpy_len; i++) { mt_predicted[i] ^= (mt_predicted[i] >> 11); mt_predicted[i] ^= (mt_predicted[i] << 7) & MT19937_MAGIC_A; mt_predicted[i] ^= (mt_predicted[i] << 15) & MT19937_MAGIC_B; mt_predicted[i] ^= (mt_predicted[i] >> 18); } generate_predicted_states(mt_states); } } /* * "Clone" an MT19937 RNG from its output */ int main(int argc, char *argv[]) { size_t i; unsigned int result; uint32_t seed = time(NULL); struct mt19937_t mt_engine; mt19937_init(&mt_engine, seed); // Test reverse tempering /*for (i = 0; i < 0xffffffff; i++) test_untemper(0x12345678); */ // Generate two rounds of rng output for (i = 0; i < 2* MT19937_ARRAY_LEN; i++) mt_output[i] = mt19937_get_value(&mt_engine); // Predict output from the first round values predict_rng_output(mt_predicted, mt_output, MT19937_ARRAY_LEN); //Verification result = 0x01; for (i = 0; i < MT19937_ARRAY_LEN; i++) result &= (mt_output[MT19937_ARRAY_LEN + i] == mt_predicted[i]); printf("mt19973 %s cloned", (result) ? "successfully" : "unsuccessfully"); return 0x00; }
28.654545
148
0.643613
8e24e4997d0c9f970f0218631fcf289a595ad36e
2,295
c
C
newmain.c
zawwynnmyat/HC595_PIC
5268906d9a9354e3736d48dabaaefe40f13f4856
[ "MIT" ]
null
null
null
newmain.c
zawwynnmyat/HC595_PIC
5268906d9a9354e3736d48dabaaefe40f13f4856
[ "MIT" ]
null
null
null
newmain.c
zawwynnmyat/HC595_PIC
5268906d9a9354e3736d48dabaaefe40f13f4856
[ "MIT" ]
null
null
null
// PIC16F877A Configuration Bit Settings // 'C' source line config statements #define _XTAL_FREQ 4000000 // CONFIG // CONFIG1 #pragma config FOSC = HS// Oscillator Selection bits (RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN) #pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled and can be enabled by SWDTEN bit of the WDTCON register) #pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled) #pragma config MCLRE = ON // RE3/MCLR pin function select bit (RE3/MCLR pin function is MCLR) #pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled) #pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled) #pragma config BOREN = ON // Brown Out Reset Selection bits (BOR enabled) #pragma config IESO = ON // Internal External Switchover bit (Internal/External Switchover mode is enabled) #pragma config FCMEN = ON // Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is enabled) #pragma config LVP = OFF // Low Voltage Programming Enable bit (RB3 pin has digital I/O, HV on MCLR must be used for programming) // CONFIG2 #pragma config BOR4V = BOR40V // Brown-out Reset Selection bit (Brown-out Reset set to 4.0V) #pragma config WRT = OFF // Flash Program Memory Self Write Enable bits (Write protection off) // #pragma config statements should precede project file includes. // Use project enums instead of #define for ON and OFF. #include <xc.h> #include <stdint.h> #define DS_SER PORTCbits.RC1 #define SHCP_SRCLK PORTCbits.RC0 #define STCP_RCLK PORTCbits.RC2 void sendData(uint8_t data){ for(int i=0;i<8;i++){ DS_SER = (data >> i) & 0x01; SHCP_SRCLK = 1; __delay_us(500); SHCP_SRCLK = 0; __delay_us(500); } STCP_RCLK = 1; __delay_us(500); STCP_RCLK = 0; } void main(void){ TRISC = 0x00; PORTC = 0x00; uint8_t led[8]={0b10000000, 0b11000000,0b11100000,0b11110000,0b11111000, 0b11111100, 0b11111110, 0b11111111}; while(1){ for(int i=0;i<8;i++) { sendData(led[i]); __delay_ms(500); } } }
39.568966
137
0.661874
99ccb0f52bc50c8569733f403754da9e960725ca
372
h
C
include/log.h
nasser-azarbakhsh-hashjin/CppND-System-Monitor
79247b844edd6b96b05564883985562933be1735
[ "MIT" ]
null
null
null
include/log.h
nasser-azarbakhsh-hashjin/CppND-System-Monitor
79247b844edd6b96b05564883985562933be1735
[ "MIT" ]
null
null
null
include/log.h
nasser-azarbakhsh-hashjin/CppND-System-Monitor
79247b844edd6b96b05564883985562933be1735
[ "MIT" ]
null
null
null
#ifndef LOG_H #define LOG_H #include <iostream> #include <fstream> #include <string> #include <vector> class Log { private: std::ofstream logfile_; long counter_{0}; std::vector<std::string> logvector_; public: Log(); ~Log(); void writetologfile(const std::string& logtext); static void writetologfile(const std::string&& logtext); }; #endif
16.909091
60
0.680108
0f30f68b8e3c6369dfe2f452b402565f57640f0d
22,736
c
C
sextractor/src/pattern.c
yerkesobservatory/variousnsundry
c757a628b1c66be08c4ac15fb0dda26af61aebd8
[ "MIT" ]
null
null
null
sextractor/src/pattern.c
yerkesobservatory/variousnsundry
c757a628b1c66be08c4ac15fb0dda26af61aebd8
[ "MIT" ]
null
null
null
sextractor/src/pattern.c
yerkesobservatory/variousnsundry
c757a628b1c66be08c4ac15fb0dda26af61aebd8
[ "MIT" ]
null
null
null
/* * pattern.c * * Manage galaxy image patterns. * *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% * * This file part of: SExtractor * * Copyright: (C) 2007-2012 Emmanuel Bertin -- IAP/CNRS/UPMC * * License: GNU General Public License * * SExtractor is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * SExtractor is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with SExtractor. If not, see <http://www.gnu.org/licenses/>. * * Last modified: 09/07/2012 * *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_MATHIMF_H #include <mathimf.h> #else #define _GNU_SOURCE #include <math.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include "define.h" #include "globals.h" #include "prefs.h" #include "fits/fitscat.h" #include "fitswcs.h" #include "check.h" #include "pattern.h" #include "profit.h" #ifdef HAVE_ATLAS #include ATLAS_LAPACK_H #endif #ifdef HAVE_LAPACKE #include LAPACKE_H #endif static double psf_laguerre(double x, int p, int q); /*------------------------------- variables ---------------------------------*/ /****** pattern_init *********************************************************** PROTO patternstruct pattern_init(profitstruct *profit, pattern_type ptype, int ncomp) PURPOSE Allocate and initialize a new pattern structure. INPUT Pointer to a profit structure, Pattern type, Number of independent components. OUTPUT Pointer to the new pattern structure. NOTES -. AUTHOR E. Bertin (IAP) VERSION 18/11/2009 ***/ patternstruct *pattern_init(profitstruct *profit, pattypenum ptype, int ncomp) { patternstruct *pattern; int ninpix, noutpix; if (!ncomp) ncomp = PATTERN_NCOMP; QCALLOC(pattern, patternstruct, 1); pattern->type = ptype; pattern->ncomp = ncomp; pattern->size[0] = profit->modnaxisn[0]; pattern->size[1] = profit->modnaxisn[1]; switch(pattern->type) { case PATTERN_QUADRUPOLE: case PATTERN_OCTOPOLE: pattern->nmodes = 2; pattern->nfreq = 1; pattern->size[2] = ncomp*pattern->nmodes; break; case PATTERN_POLARFOURIER: pattern->nfreq = PATTERN_FMAX+1; pattern->nmodes = 2*PATTERN_FMAX+1; pattern->size[2] = ncomp*pattern->nmodes; break; case PATTERN_POLARSHAPELETS: pattern->nfreq = 0; pattern->nmodes = 0; pattern->size[2] = (ncomp+1)*(ncomp+2)/2; break; default: error(EXIT_FAILURE, "*Internal Error*: Unknown Pattern type",""); } ninpix = pattern->size[0]*pattern->size[1] * pattern->size[2]; noutpix = profit->objnaxisn[0]*profit->objnaxisn[1] * pattern->size[2]; QMALLOC(pattern->coeff, float, pattern->size[2]); QMALLOC(pattern->norm, float, pattern->size[2]); QMALLOC(pattern->modpix, float, ninpix); QMALLOC(pattern->lmodpix, PIXTYPE, noutpix); if (pattern->ncomp) { QMALLOC(pattern->r, float, pattern->ncomp); } if (pattern->nfreq) { QMALLOC(pattern->mcoeff, float, ncomp*pattern->nfreq); QMALLOC(pattern->acoeff, float, ncomp*pattern->nfreq); } return pattern; } /****** pattern_end *********************************************************** PROTO void pattern_end(patternstruct *pattern) PURPOSE End (deallocate) a pattern structure. INPUT Pattern structure. OUTPUT -. NOTES -. AUTHOR E. Bertin (IAP) VERSION 02/10/2008 ***/ void pattern_end(patternstruct *pattern) { free(pattern->norm); free(pattern->r); free(pattern->modpix); free(pattern->lmodpix); free(pattern->coeff); free(pattern->mcoeff); free(pattern->acoeff); free(pattern); return; } /****** pattern_fit ****************************************************** PROTO void pattern_resample(patternstruct *pattern) PURPOSE Resample a pattern structure. INPUT Pointer to pattern structure. OUTPUT -. NOTES -. AUTHOR E. Bertin (IAP) VERSION 09/07/2012 ***/ void pattern_fit(patternstruct *pattern, profitstruct *profit) { checkstruct *check; double *alpha,*beta,*betat, dval, dprod; float *inpix, *doutpix1, *coefft; PIXTYPE *outpix,*outpix1,*outpix2; PIXTYPE *weightpix; int n,p,p2, nvec, ninpix, noutpix; nvec = pattern->size[2]; pattern_create(pattern, profit); QMALLOC(alpha, double, nvec*nvec); QMALLOC(beta, double, nvec); inpix = pattern->modpix; ninpix = pattern->size[0]*pattern->size[1]; outpix = pattern->lmodpix; noutpix = profit->objnaxisn[0]*profit->objnaxisn[1]; for (p=0; p<nvec; p++) { profit_convolve(profit, inpix); profit_resample(profit, inpix, outpix, 1.0); outpix1 = pattern->lmodpix; for (p2=0; p2<=p; p2++) { weightpix = profit->objweight; outpix2 = outpix; dval = 0.0; for (n=noutpix; n--;) { dprod = *(outpix1++)**(outpix2++); if (*(weightpix++)>0.0) dval += dprod; } alpha[p*nvec+p2] = alpha[p2*nvec+p] = dval; } weightpix = profit->objweight; doutpix1 = profit->resi; outpix2 = outpix; dval = 0.0; for (n=noutpix; n--;) { dprod = *doutpix1**(outpix2++); if (*(weightpix++)>0.0) { dval += dprod; doutpix1++; } } alpha[p*(nvec+1)] += 0.2; beta[p] = dval; inpix += ninpix; outpix += noutpix; } /* Solve the system */ #if defined(HAVE_LAPACKE) LAPACKE_dposv(LAPACK_COL_MAJOR, 'L', nvec, 1, alpha, nvec, beta, nvec); #else clapack_dposv(CblasRowMajor, CblasUpper, nvec, 1, alpha, nvec, beta, nvec); #endif betat = beta; coefft = pattern->coeff; for (p=nvec; p--;) *(coefft++) = (float)*(betat++); pattern_compmodarg(pattern, profit); free(alpha); free(beta); if ((check = prefs.check[CHECK_PATTERNS])) { QCALLOC(outpix, PIXTYPE, noutpix); outpix2 = pattern->lmodpix; for (p=0; p<nvec; p++) { dval = pattern->coeff[p]; outpix1 = outpix; for (n=noutpix; n--;) *(outpix1++) += dval**(outpix2++); } addcheck(check, outpix, profit->objnaxisn[0],profit->objnaxisn[1], profit->ix, profit->iy, 1.0); free(outpix); } /* { catstruct *cat; char name[MAXCHAR]; static int number; int nout; nout = nvec; QCALLOC(outpix, PIXTYPE, ninpix*nout); outpix1 = outpix; doutpix1 = pattern->modpix; for (p=0; p<nvec; p++) { dval = pattern->coeff[p]; for (n=ninpix; n--; ) *(outpix1++) += dval**(doutpix1++); if (pattern->type==PATTERN_POLARFOURIER) { if ((p%pattern->nmodes)%2) outpix1 -= ninpix; } else if (pattern->type==PATTERN_POLARSHAPELETS) { } else if (!(p%2)) outpix1 -= noutpix; } cat=new_cat(1); init_cat(cat); cat->tab->naxis=3; QMALLOC(cat->tab->naxisn, int, 3); cat->tab->naxisn[0]=profit->modnaxisn[0]; cat->tab->naxisn[1]=profit->modnaxisn[1]; cat->tab->naxisn[2]=nout; cat->tab->bitpix=BP_FLOAT; cat->tab->bytepix=4; cat->tab->bodybuf=(char *)outpix; cat->tab->tabsize=cat->tab->naxisn[0]*cat->tab->naxisn[1]*cat->tab->naxisn[2]*sizeof(PIXTYPE); sprintf(name, "tata_%02d.fits", ++number); save_cat(cat, name); cat->tab->bodybuf=NULL; free_cat(&cat, 1); free(outpix); } */ return; } /****** pattern_compmodarg **************************************************** PROTO void pattern_comparg(patternstruct *pattern, profitstruct *profit) PURPOSE Compute modulus and argument for each pair of Fourier components. INPUT Pointer to pattern structure, pointer to profit structure. OUTPUT -. NOTES -. AUTHOR E. Bertin (IAP) VERSION 20/11/2008 ***/ void pattern_compmodarg(patternstruct *pattern, profitstruct *profit) { float *coeff,*mcoeff,*acoeff, *normt, arg,argo,darg, ima,rea; int f,p, nfreq; if (pattern->type == PATTERN_POLARSHAPELETS) return; coeff = pattern->coeff; mcoeff = pattern->mcoeff; acoeff = pattern->acoeff; nfreq = pattern->nfreq; normt = pattern->norm; argo = 0.0; /* To avoid gcc -Wall warnings */ for (p=0; p<pattern->ncomp; p++) { for (f=0; f<nfreq; f++) { if (pattern->type == PATTERN_POLARFOURIER && !f) { *(mcoeff++) = fabs(*coeff) * *(normt++); *(acoeff++) = *(coeff++)<0.0? 180.0 : 0.0; } else { rea = *(coeff++) * *(normt++); ima = *(coeff++) * *(normt++); *(mcoeff++) = sqrt(rea*rea + ima*ima); arg = atan2(ima, rea)/DEG; if (p>0) { argo = *(acoeff-nfreq); darg = arg - fmod(argo+180.0, 360.0) + 180.0;; /*-------- disambiguate increasing or decreasing phase angles */ if (darg > 180.0) darg -= 360.0; else if (darg < -180.0) darg += 360.0; *acoeff = argo + darg; acoeff++; } else *(acoeff++) = arg; argo = arg; } } } return; } /****** pattern_spiral ****************************************************** PROTO float pattern_spiral(patternstruct *pattern) PURPOSE Compute a pattern spiral index. INPUT Pointer to pattern structure. OUTPUT Spiral index. NOTES -. AUTHOR E. Bertin (IAP) VERSION 14/10/2008 ***/ float pattern_spiral(patternstruct *pattern) { double w,x,y, s,sx,sy,sxx,sxy; int f,i,p, pstart; if (pattern->ncomp<2) return 0.0; pstart = (int)(pattern->ncomp/pattern->rmax+0.4999) - 1; if (pstart<0) pstart = 0; else if (pstart>pattern->ncomp-2) pstart = pattern->ncomp-2; s = sx = sy = sxx = sxy = 0.0; for (p=pstart; p<pattern->ncomp; p++) { w = y = 0.0; for (f=0; f<pattern->nfreq; f++) { if (pattern->type == PATTERN_POLARFOURIER && (!f || f==1 || f==3)) continue; i = p*pattern->nfreq + f; w += pattern->mcoeff[i]; y += pattern->mcoeff[i]*pattern->acoeff[i]/f; } x = (double)(p - pstart); if (w>0.0) y /= w; s += w; sx += w*x; sy += w*y; sxx += w*x*x; sxy += w*x*y; } return (s*sxy - sx*sy)/(s*sxx - sx*sx); } /****** pattern_create ****************************************************** PROTO void pattern_create(patternstruct *pattern, profitstruct *profit) PURPOSE create a pattern basis. INPUT Pointer to pattern structure, pointer to the profit structure. OUTPUT -. NOTES -. AUTHOR E. Bertin (IAP) VERSION 01/12/2009 ***/ void pattern_create(patternstruct *pattern, profitstruct *profit) { double *scbuf[PATTERN_FMAX],*scpix[PATTERN_FMAX], *scpixt,*r2buf,*r2pix, x1,x2, x1t,x2t, r,r2,r2min,r2max, mod,ang,ang0, cosang,sinang, angcoeff, posangle,flux, ctheta,stheta, saspect,xscale,yscale, scale, aspect, cd11,cd12,cd21,cd22, x1cout,x2cout, cmod,smod, cnorm,snorm,norm,norm0, dval, det, rad, dnrad, cpnorm,spnorm,pnorm, rl,rl2,rh,rh2,r0,r02, sbd, bt, wb, omwb, bflux, margin2, dposangle; int f,i,p, ix1,ix2, nrad, npix; double *fr2,*fr2t,*fexpr2,*fexpr2t,*ftheta,*fthetat, dm,fac, beta, invbeta2; float *normt, *cpix,*spix, *pmodpix,*pix,*modpix, fnorm; int m,n, nmax, kmax,hnmm; /* Compute Profile CD matrix */ aspect = fabs(*profit->paramlist[PARAM_DISK_ASPECT]); posangle = fmod_m90_p90(*profit->paramlist[PARAM_DISK_POSANG])*DEG; scale = fabs(*profit->paramlist[PARAM_DISK_SCALE]/profit->pixstep); flux = fabs(*profit->paramlist[PARAM_DISK_FLUX])*1.67835; bflux = fabs(*profit->paramlist[PARAM_SPHEROID_FLUX]); bt = bflux / (bflux+flux); if (bt > PATTERN_BTMAX) { wb = (bt - PATTERN_BTMAX) / (1.0 - PATTERN_BTMAX); if (wb > 1.0) wb = 1.0; omwb = 1.0 - wb; flux = wb*bflux + omwb*flux; scale = omwb*scale + wb*fabs(*profit->paramlist[PARAM_SPHEROID_REFF]/profit->pixstep)*1.5; aspect = omwb*aspect + wb*fabs(*profit->paramlist[PARAM_SPHEROID_ASPECT]); posangle /= DEG; dposangle = fmod_m90_p90(*profit->paramlist[PARAM_SPHEROID_POSANG]) - posangle; if (dposangle > 90.0) dposangle -= 180.0; else if (dposangle < -90.0) dposangle += 180.0; posangle = fmod_m90_p90(posangle + wb*dposangle)*DEG; } ctheta = cos(posangle); stheta = sin(posangle); saspect = fabs(aspect); xscale = (scale==0.0)? 0.0 : 1.0/scale; yscale = (scale*saspect == 0.0)? 0.0 : 1.0/(scale*saspect); cd11 = xscale*ctheta; cd12 = xscale*stheta; cd21 = -yscale*stheta; cd22 = yscale*ctheta; x1cout = (double)(pattern->size[0]/2); x2cout = (double)(pattern->size[1]/2); /* Determinant of the change of coordinate system */ det = xscale*yscale; sbd = fabs(flux)*det/(2.0*PI); r2min = det/10.0; /* Stay within an ellipse contained in the pattern raster, both in x and y */ r2max = PATTERN_SCALE*PATTERN_SCALE; margin2 = (1.0-PATTERN_MARGIN)*(1.0-PATTERN_MARGIN); if (r2max > (dval = margin2 * x1cout*x1cout * det*det / (cd12*cd12+cd22*cd22))) r2max = dval; if (r2max > (dval = margin2 * x2cout*x2cout * det*det / (cd21*cd21+cd11*cd11))) r2max = dval; /* Set the limit of the pattern extent */ // rad = 4.0*profit->obj->a*xscale; /* The pattern limit does not exceed 90% of the mapped ellipse "radius" */ // if (rad*rad > 0.9*0.9*r2max) nrad = pattern->ncomp; pattern->rmax = rad = sqrt(r2max); if (!nrad) error(EXIT_FAILURE, "*Error*: insufficient number of vector elements", " for generating the pattern basis"); dnrad = (double)nrad; npix = pattern->size[0]*pattern->size[1]; normt = pattern->norm; switch(pattern->type) { case PATTERN_QUADRUPOLE: case PATTERN_OCTOPOLE: cpix = pattern->modpix; spix = pattern->modpix+npix; angcoeff = (pattern->type==PATTERN_OCTOPOLE)? 4.0 : 2.0; for (p=0; p<nrad; p++, cpix+=npix, spix+=npix) { x1 = -x1cout; x2 = -x2cout; cnorm = snorm = cpnorm = spnorm = 0.0; rl = p*rad/dnrad; rl2 = rl*rl; pattern->r[p] = r0 = (p+1)*rad/dnrad; r02 = r0*r0; rh = (p+2)*rad/dnrad; rh2 = rh*rh; pmodpix = profit->modpix; for (ix2=pattern->size[1]; ix2--; x2+=1.0) { x1t = cd12*x2 + cd11*x1; x2t = cd22*x2 + cd21*x1; for (ix1=pattern->size[0]; ix1--; pmodpix++) { r2 = x1t*x1t+x2t*x2t; if (r2>rl2 && r2<rh2) { r = sqrt(r2); dval = (r<r0) ? (r-rl)/(r0-rl) : (rh-r)/(rh-r0); mod = (dval<0.5)? 2.0*dval*dval : 1.0-2.0*(1.0-dval)*(1.0-dval); ang = angcoeff*atan2(x2t,x1t); #ifdef HAVE_SINCOS sincos(ang, &sinang, &cosang); #else sinang = sin(ang); cosang = cos(ang); #endif *(cpix++) = (float)(cmod = mod*cosang); *(spix++) = (float)(smod = mod*sinang); cnorm += cmod*cmod; snorm += smod*smod; cpnorm += cmod*cmod*(double)(*pmodpix**pmodpix); spnorm += smod*smod*(double)(*pmodpix**pmodpix); } else *(cpix++) = *(spix++) = 0.0; x1t += cd11; x2t += cd21; } } cpix -= npix; cnorm = (cnorm > 0.0? 1.0/sqrt(cnorm) : 1.0); *(normt++) = (float)cnorm*sqrt(cpnorm); for (i=npix; i--;) *(cpix++) *= cnorm; spix -= npix; snorm = (snorm > 0.0? 1.0/sqrt(snorm) : 1.0); *(normt++) = snorm*sqrt(spnorm); for (i=npix; i--;) *(spix++) *= snorm; } break; case PATTERN_POLARFOURIER: /*---- Pre-compute radii and quadrupoles to speed up computations later */ QMALLOC(r2buf, double, npix); r2pix = r2buf; for (f=0; f<PATTERN_FMAX; f++) { QMALLOC(scbuf[f], double, 2*npix); scpix[f] = scbuf[f]; } x1 = -x1cout; x2 = -x2cout; for (ix2=pattern->size[1]; ix2--; x2+=1.0) { x1t = cd12*x2 + cd11*x1; x2t = cd22*x2 + cd21*x1; for (ix1=pattern->size[0]; ix1--;) { *(r2pix++) = x1t*x1t+x2t*x2t; ang = ang0 = atan2(x2t,x1t); for (f=0; f<PATTERN_FMAX; f++) { #ifdef HAVE_SINCOS sincos(ang, scpix[f]+npix, scpix[f]); scpix[f]++; #else *(scpix[f]) = cos(ang); *(scpix[f]+++npix) = sin(ang); #endif ang+=ang0; } x1t += cd11; x2t += cd21; } } modpix = NULL; /* To avoid gcc -Wall warnings */ pix = pattern->modpix; for (p=0; p<nrad; p++) { rl = p*rad/dnrad; rl2 = rl*rl; pattern->r[p] = r0 = (p+1)*rad/dnrad; r02 = r0*r0; rh = (p+2)*rad/dnrad; rh2 = rh*rh; for (f=0; f<=PATTERN_FMAX; f++) { norm = pnorm = 0.0; r2pix = r2buf; pmodpix = profit->modpix; if (!f) { for (i=npix; i--; pmodpix++) { r2 = *(r2pix++); if (r2>rl2 && r2<rh2) { r = sqrt(r2); dval = (r<r0) ? (r-rl)/(r0-rl) : (rh-r)/(rh-r0); *(pix++) = (float)(dval = (dval<0.5)? 2.0*dval*dval : 1.0-2.0*(1.0-dval)*(1.0-dval)); norm += dval*dval; } else *(pix++) = 0.0; } pix -= npix; pnorm = norm*sbd*sbd; norm0 = norm = (norm > 1.0/BIG? 1.0/sqrt(norm) : 1.0); *(normt++) = pnorm > 1.0/BIG? 1.0/sqrt(pnorm) : 0.0; fnorm = (float)norm; for (i=npix; i--;) *(pix++) *= fnorm; modpix = pix; } else { modpix -= npix; scpixt = scbuf[f-1]; for (i=npix; i--; pmodpix++) { *(pix++) = (float)(dval = *(modpix++)**(scpixt++)); norm += dval*dval; pnorm += dval*dval**pmodpix**pmodpix; } pix -= npix; pnorm = norm*sbd*sbd; norm = (norm > 0.0? 1.0/sqrt(norm) : 1.0); *(normt++) = (float)(pnorm > 1.0/BIG? norm0/sqrt(pnorm) : 0.0); fnorm = (float)norm; for (i=npix; i--;) *(pix++) *= fnorm; modpix -= npix; norm = pnorm = 0.0; pmodpix = profit->modpix; for (i=npix; i--; pmodpix++) { *(pix++) = (float)(dval = *(modpix++)**(scpixt++)); norm += dval*dval; pnorm += dval*dval**pmodpix**pmodpix; } pix -= npix; pnorm = norm*sbd*sbd; norm = (norm > 0.0? 1.0/sqrt(norm) : 1.0); *(normt++) = pnorm > 1.0/BIG? norm0/sqrt(pnorm) : 0.0; fnorm = (float)norm; for (i=npix; i--;) *(pix++) *= fnorm; } } } free(r2buf); for (f=0; f<PATTERN_FMAX; f++) free(scbuf[f]); break; case PATTERN_POLARSHAPELETS: nmax = pattern->ncomp; kmax = (nmax+1)*(nmax+2)/2; beta = 0.667; invbeta2 = 1.0/(beta*beta); /*---- Precompute some slow functions */ QMALLOC(fr2, double, npix); QMALLOC(fexpr2, double, npix); QMALLOC(ftheta, double, npix); fr2t = fr2; fexpr2t = fexpr2; fthetat = ftheta; x1 = -x1cout; x2 = -x2cout; for (ix2=pattern->size[1]; ix2--; x2+=1.0) { x1t = cd12*x2 + cd11*x1; x2t = cd22*x2 + cd21*x1; for (ix1=pattern->size[0]; ix1--;) { *(fr2t++) = r2 = (x1t*x1t+x2t*x2t)*invbeta2; *(fexpr2t++) = exp(-r2/2.0); *(fthetat++) = atan2(x2t,x1t); x1t += cd11; x2t += cd21; } } pix = pattern->modpix; for (n=0; n<=nmax; n++) { for (m=n%2; m<=n; m+=2) { dm = (double)m; /*-------- Compute ((n+m)/2)!/((n-m)/2)! */ hnmm = (n-m)/2; fac = 1.0; // for (p=(n+m)/2; p>=hnmm; p--) // if (p) // fac *= (double)p; // fac = sqrt(1.0/(PI*fac))/beta; if ((hnmm%2)) fac = -fac; fr2t = fr2; fexpr2t = fexpr2; fthetat = ftheta; norm = 0.0; for (i=npix; i--;fr2t++) { *(pix++) = (float)(dval = fac*pow(*fr2t, dm/2.0) *psf_laguerre(*fr2t, hnmm, m) **(fexpr2t++)*cos(dm**(fthetat++))); norm += dval*dval; } pix -= npix; pnorm = norm*sbd*sbd; norm = (norm > 0.0? 1.0/sqrt(norm) : 1.0); *(normt++) = pnorm > 1.0/BIG? norm/sqrt(pnorm) : 0.0; fnorm = (float)norm; for (i=npix; i--;) *(pix++) *= fnorm; if (m!=0) { fr2t = fr2; fexpr2t = fexpr2; fthetat = ftheta; norm = 0.0; for (i=npix; i--; fr2t++) { *(pix++) = (float)(dval = fac*pow(*fr2t, dm/2.0) *psf_laguerre(*fr2t, hnmm, m) **(fexpr2t++)*sin(dm**(fthetat++))); norm += dval*dval; } pix -= npix; pnorm = norm*sbd*sbd; norm = (norm > 0.0? 1.0/sqrt(norm) : 1.0); *(normt++) = pnorm > 1.0/BIG? norm/sqrt(pnorm) : 0.0; fnorm = (float)norm; for (i=npix; i--;) *(pix++) *= fnorm; } } } free(fr2); free(fexpr2); free(ftheta); break; default: error(EXIT_FAILURE, "*Internal Error*: Unknown Pattern type",""); } return; } /****** psf_laguerre ********************************************************** PROTO double psf_laguerre(double x, int p, int q) PURPOSE Return Laguerre polynomial value. INPUT x, p, q. OUTPUT Value of the Laguerre polynomial. NOTES -. AUTHOR E. Bertin (IAP) VERSION 12/11/2007 ***/ static double psf_laguerre(double x, int p, int q) { double dn,dq, lpm1,lpm2, l; int n; dq = q - 1.0; if (p==0) return 1.0; else if (p==1) return (2.0 - x + dq); else { l = 0.0; lpm2 = 1.0; lpm1 = 2.0 - x + dq; dn = 2.0; for (n=p-1; n--; dn+=1.0) { l = (2.0+(dq-x)/dn)*lpm1 - (1.0+dq/dn)*lpm2; lpm2 = lpm1; lpm1 = l; } } return l; }
27.558788
94
0.526698
b5971c18af56e352dba274ce20336b32109bd9ca
196
h
C
src/anal/checkirreg.proto.h
PerseusDL/morpheus
b1b33c56ef2338fe0dcd1893628ed638f00c0986
[ "CC-BY-3.0" ]
20
2015-04-12T21:09:51.000Z
2021-04-17T08:03:42.000Z
src/anal/checkirreg.proto.h
PerseusDL/morpheus
b1b33c56ef2338fe0dcd1893628ed638f00c0986
[ "CC-BY-3.0" ]
10
2015-11-23T17:49:14.000Z
2021-05-26T15:28:22.000Z
src/anal/checkirreg.proto.h
PerseusDL/morpheus
b1b33c56ef2338fe0dcd1893628ed638f00c0986
[ "CC-BY-3.0" ]
11
2015-02-10T17:38:20.000Z
2022-03-15T12:53:39.000Z
/* checkirreg.c */ int try_irregvb(gk_word *); int ChckIrrLemms(gk_word *, char *, char *); int CheckIrregForm(gk_word *, char *, char *); int chckirrvform(char *, char *); int mfi_prvb(char *);
24.5
46
0.673469
245cde22df3bfaeb651946e62b24364d449b9dfa
345
h
C
raxxFaceSwap/SideMenuTableViewCell.h
raxxpack/raxxFaceSwap
9ecac4eba714a9dc356accb2b51a36522b167e70
[ "Apache-2.0" ]
1
2015-06-12T15:34:57.000Z
2015-06-12T15:34:57.000Z
raxxFaceSwap/SideMenuTableViewCell.h
raxxpack/raxxFaceSwap
9ecac4eba714a9dc356accb2b51a36522b167e70
[ "Apache-2.0" ]
null
null
null
raxxFaceSwap/SideMenuTableViewCell.h
raxxpack/raxxFaceSwap
9ecac4eba714a9dc356accb2b51a36522b167e70
[ "Apache-2.0" ]
null
null
null
// // SideMenuTableViewCell.h // raxxFaceSwap // // Created by Rahim Mitha on 2014-04-30. // Copyright (c) 2014 Rahim Mitha. All rights reserved. // #import <UIKit/UIKit.h> @interface SideMenuTableViewCell : UITableViewCell @property (nonatomic, strong) UIImageView* leftImageView; @property (nonatomic, strong) UILabel* nameLabel; @end
20.294118
57
0.73913
a78c7a1358b2276bde3093e5f542b8b06a31c748
337
c
C
P4/testcases/simple_testcase4.c
Xanthorapedia/CS537
8153847aa1e393c3d1770f6901a6c5de7975fd68
[ "MIT" ]
null
null
null
P4/testcases/simple_testcase4.c
Xanthorapedia/CS537
8153847aa1e393c3d1770f6901a6c5de7975fd68
[ "MIT" ]
null
null
null
P4/testcases/simple_testcase4.c
Xanthorapedia/CS537
8153847aa1e393c3d1770f6901a6c5de7975fd68
[ "MIT" ]
null
null
null
#include <stdio.h> #include "537malloc.h" int main() { printf("Allocating 1 byte of memory\n"); char *ptr = malloc537(sizeof(char)); printf("Double Free : Freeing memory at %p twice\n", ptr); free537(ptr); printf("1st free, should be a success\n"); free537(ptr); printf("This statement should not be printed!\n"); return 0; }
21.0625
59
0.679525
6874b8d8a5bfcef8f3881027390e1211c9105804
5,802
c
C
snort-2.9.15.1/src/dynamic-preprocessors/appid/flow.c
wenze1367/snort-2.9.15-read-annotation
d5c76ec0e699b173caabd917b921412c03233149
[ "BSD-2-Clause" ]
null
null
null
snort-2.9.15.1/src/dynamic-preprocessors/appid/flow.c
wenze1367/snort-2.9.15-read-annotation
d5c76ec0e699b173caabd917b921412c03233149
[ "BSD-2-Clause" ]
null
null
null
snort-2.9.15.1/src/dynamic-preprocessors/appid/flow.c
wenze1367/snort-2.9.15-read-annotation
d5c76ec0e699b173caabd917b921412c03233149
[ "BSD-2-Clause" ]
2
2020-11-26T13:27:14.000Z
2022-03-20T02:12:55.000Z
/* ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <stdlib.h> #include <stdint.h> #include "flow.h" #include "service_api.h" #include "fw_appid.h" static AppIdFlowData *fd_free_list; void AppIdFlowdataFree(tAppIdData *flowp) { AppIdFlowData *tmp_fd; while ((tmp_fd = flowp->flowData)) { flowp->flowData = tmp_fd->next; if (tmp_fd->fd_data && tmp_fd->fd_free) tmp_fd->fd_free(tmp_fd->fd_data); tmp_fd->next = fd_free_list; fd_free_list = tmp_fd; } } void AppIdFlowdataFini() { AppIdFlowData *tmp_fd; while ((tmp_fd = fd_free_list)) { fd_free_list = fd_free_list->next; free(tmp_fd); } } void *AppIdFlowdataGet(tAppIdData *flowp, unsigned id) { AppIdFlowData *tmp_fd; for (tmp_fd = flowp->flowData; tmp_fd && tmp_fd->fd_id != id; tmp_fd = tmp_fd->next); return tmp_fd ? tmp_fd->fd_data : NULL; } void *AppIdFlowdataRemove(tAppIdData *flowp, unsigned id) { AppIdFlowData **pfd; AppIdFlowData *fd; for (pfd = &flowp->flowData; *pfd && (*pfd)->fd_id != id; pfd = &(*pfd)->next); if ((fd = *pfd)) { *pfd = fd->next; fd->next = fd_free_list; fd_free_list = fd; return fd->fd_data; } return NULL; } void AppIdFlowdataDelete(tAppIdData *flowp, unsigned id) { AppIdFlowData **pfd; AppIdFlowData *fd; for (pfd = &flowp->flowData; *pfd && (*pfd)->fd_id != id; pfd = &(*pfd)->next); if ((fd = *pfd)) { *pfd = fd->next; if (fd->fd_data && fd->fd_free) fd->fd_free(fd->fd_data); fd->next = fd_free_list; fd_free_list = fd; } } void AppIdFlowdataDeleteAllByMask(tAppIdData *flowp, unsigned mask) { AppIdFlowData **pfd; AppIdFlowData *fd; pfd = &flowp->flowData; while (*pfd) { if ((*pfd)->fd_id & mask) { fd = *pfd; *pfd = fd->next; if (fd->fd_data && fd->fd_free) fd->fd_free(fd->fd_data); fd->next = fd_free_list; fd_free_list = fd; } else { pfd = &(*pfd)->next; } } } int AppIdFlowdataAdd(tAppIdData *flowp, void *data, unsigned id, AppIdFreeFCN fcn) { AppIdFlowData *tmp_fd; if (fd_free_list) { tmp_fd = fd_free_list; fd_free_list = tmp_fd->next; } else if (!(tmp_fd = malloc(sizeof(*tmp_fd)))) return -1; tmp_fd->fd_id = id; tmp_fd->fd_data = data; tmp_fd->fd_free = fcn; tmp_fd->next = flowp->flowData; flowp->flowData = tmp_fd; return 0; } int AppIdFlowdataAddId(tAppIdData *flowp, uint16_t port, const tRNAServiceElement *svc_element) { if (flowp->serviceData) return -1; flowp->serviceData = svc_element; flowp->service_port = port; return 0; } #ifdef RNA_DEBUG_EXPECTED_FLOWS static void flowAppSharedDataDelete(tAppIdData *sharedData) { _dpd.errMsg("Deleting %p\n",sharedData); appSharedDataDelete(sharedData); } #endif tAppIdData *AppIdEarlySessionCreate(tAppIdData *flowp, SFSnortPacket *ctrlPkt, sfaddr_t *cliIp, uint16_t cliPort, sfaddr_t *srvIp, uint16_t srvPort, uint8_t proto, int16_t app_id, int flags) { char src_ip[INET6_ADDRSTRLEN]; char dst_ip[INET6_ADDRSTRLEN]; struct _ExpectNode** node; tAppIdData *data; if (app_id_debug_session_flag) { inet_ntop(sfaddr_family(cliIp), (void *)sfaddr_get_ptr(cliIp), src_ip, sizeof(src_ip)); inet_ntop(sfaddr_family(srvIp), (void *)sfaddr_get_ptr(srvIp), dst_ip, sizeof(dst_ip)); } data = appSharedDataAlloc(proto, (struct in6_addr*)sfaddr_get_ip6_ptr(cliIp), 0); if (data) data->common.policyId = appIdPolicyId; node = (flags & APPID_EARLY_SESSION_FLAG_FW_RULE) ? &ctrlPkt->expectedSession : NULL; if (_dpd.sessionAPI->set_application_protocol_id_expected(ctrlPkt, cliIp, cliPort, srvIp, srvPort, proto, app_id, PP_APP_ID, data, #ifdef RNA_DEBUG_EXPECTED_FLOWS (void (*)(void *))flowAppSharedDataDelete #else (void (*)(void *))appSharedDataDelete #endif , node) ) { if (app_id_debug_session_flag) _dpd.logMsg("AppIdDbg %s failed to create a related flow for %s-%u -> %s-%u %u\n", app_id_debug_session, src_ip, (unsigned)cliPort, dst_ip, (unsigned)srvPort, (unsigned)proto); appSharedDataDelete(data); return NULL; } else if (app_id_debug_session_flag) _dpd.logMsg("AppIdDbg %s created a related flow for %s-%u -> %s-%u %u\n", app_id_debug_session, src_ip, (unsigned)cliPort, dst_ip, (unsigned)srvPort, (unsigned)proto); return data; }
29.602041
116
0.615133
71dd76b229c7e51584b1138b2ef22b400f356b7a
126
c
C
4.15/hello/hello_extern.c
ahidaka/HelloLinuxDriver
bfe70a990720ea75dfa5a31181f262684fc65ec0
[ "Apache-2.0" ]
null
null
null
4.15/hello/hello_extern.c
ahidaka/HelloLinuxDriver
bfe70a990720ea75dfa5a31181f262684fc65ec0
[ "Apache-2.0" ]
null
null
null
4.15/hello/hello_extern.c
ahidaka/HelloLinuxDriver
bfe70a990720ea75dfa5a31181f262684fc65ec0
[ "Apache-2.0" ]
null
null
null
#include <linux/module.h> static int a[4] = {0, 1, 2, 3}; static int i = 0; int hello_extern(void) { return(a[i++ & 3]); }
12.6
31
0.579365
ec494a43a68d906c73a32af1cae16746eab209ad
2,830
h
C
aws-cpp-sdk-iotwireless/include/aws/iotwireless/model/JoinResourceTypeEventConfiguration.h
Nexuscompute/aws-sdk-cpp
e7ef485e46e6962c9e084b8c9b104c1bfcceaf26
[ "Apache-2.0" ]
1
2022-01-05T18:20:03.000Z
2022-01-05T18:20:03.000Z
aws-cpp-sdk-iotwireless/include/aws/iotwireless/model/JoinResourceTypeEventConfiguration.h
Nexuscompute/aws-sdk-cpp
e7ef485e46e6962c9e084b8c9b104c1bfcceaf26
[ "Apache-2.0" ]
null
null
null
aws-cpp-sdk-iotwireless/include/aws/iotwireless/model/JoinResourceTypeEventConfiguration.h
Nexuscompute/aws-sdk-cpp
e7ef485e46e6962c9e084b8c9b104c1bfcceaf26
[ "Apache-2.0" ]
1
2021-11-09T11:58:03.000Z
2021-11-09T11:58:03.000Z
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/iotwireless/IoTWireless_EXPORTS.h> #include <aws/iotwireless/model/LoRaWANJoinResourceTypeEventConfiguration.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoTWireless { namespace Model { /** * <p>Join resource type event configuration object for enabling or disabling * topic.</p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/iotwireless-2020-11-22/JoinResourceTypeEventConfiguration">AWS * API Reference</a></p> */ class AWS_IOTWIRELESS_API JoinResourceTypeEventConfiguration { public: JoinResourceTypeEventConfiguration(); JoinResourceTypeEventConfiguration(Aws::Utils::Json::JsonView jsonValue); JoinResourceTypeEventConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>Join resource type event configuration object for enabling or disabling * LoRaWAN related event topics.</p> */ inline const LoRaWANJoinResourceTypeEventConfiguration& GetLoRaWAN() const{ return m_loRaWAN; } /** * <p>Join resource type event configuration object for enabling or disabling * LoRaWAN related event topics.</p> */ inline bool LoRaWANHasBeenSet() const { return m_loRaWANHasBeenSet; } /** * <p>Join resource type event configuration object for enabling or disabling * LoRaWAN related event topics.</p> */ inline void SetLoRaWAN(const LoRaWANJoinResourceTypeEventConfiguration& value) { m_loRaWANHasBeenSet = true; m_loRaWAN = value; } /** * <p>Join resource type event configuration object for enabling or disabling * LoRaWAN related event topics.</p> */ inline void SetLoRaWAN(LoRaWANJoinResourceTypeEventConfiguration&& value) { m_loRaWANHasBeenSet = true; m_loRaWAN = std::move(value); } /** * <p>Join resource type event configuration object for enabling or disabling * LoRaWAN related event topics.</p> */ inline JoinResourceTypeEventConfiguration& WithLoRaWAN(const LoRaWANJoinResourceTypeEventConfiguration& value) { SetLoRaWAN(value); return *this;} /** * <p>Join resource type event configuration object for enabling or disabling * LoRaWAN related event topics.</p> */ inline JoinResourceTypeEventConfiguration& WithLoRaWAN(LoRaWANJoinResourceTypeEventConfiguration&& value) { SetLoRaWAN(std::move(value)); return *this;} private: LoRaWANJoinResourceTypeEventConfiguration m_loRaWAN; bool m_loRaWANHasBeenSet; }; } // namespace Model } // namespace IoTWireless } // namespace Aws
32.906977
156
0.730035
70ad240e0494fd2f03530ac63631eb331f3f5690
1,167
h
C
Utils/eigen_glm.h
jkabalar/SceneGraphFusion
be2b67cafe8ccb3295fd4c1408fce28177ae13ff
[ "BSD-2-Clause" ]
67
2021-05-06T06:55:27.000Z
2022-03-29T12:54:24.000Z
Utils/eigen_glm.h
jkabalar/SceneGraphFusion
be2b67cafe8ccb3295fd4c1408fce28177ae13ff
[ "BSD-2-Clause" ]
18
2021-05-24T02:55:48.000Z
2022-03-30T08:58:17.000Z
Utils/eigen_glm.h
jkabalar/SceneGraphFusion
be2b67cafe8ccb3295fd4c1408fce28177ae13ff
[ "BSD-2-Clause" ]
10
2021-06-03T21:49:17.000Z
2022-03-05T09:05:01.000Z
// // Created by sc on 8/20/20. // #ifndef GT_GRAPH_VIEWER_EIGEN2GLM_H #define GT_GRAPH_VIEWER_EIGEN2GLM_H #ifdef COMPILE_WITH_EIGEN #include <Eigen/Dense> #include <glm/matrix.hpp> //#include <glm/detail/qualifier.hpp> template<typename T, int m, int n> inline glm::mat<m, n, float, glm::precision::highp> E2GLM(const Eigen::Matrix<T, m, n>& em) { glm::mat<m, n, float, glm::precision::highp> mat; for (int i = 0; i < m; ++i) { for (int j = 0; j < n; ++j) { mat[j][i] = em(i, j); } } return mat; } template<typename T, int m, int n> inline Eigen::Matrix<T, m, n> GLM2E(const glm::mat<m, n, float, glm::precision::highp> &mat) { Eigen::Matrix<T, m, n> em; for (int i = 0; i < m; ++i) { for (int j = 0; j < n; ++j) { em(i, j) = mat[j][i]; } } return em; } template<typename T, int m> inline glm::vec<m, float, glm::precision::highp> E2GLM(const Eigen::Matrix<T, m, 1>& em) { glm::vec<m, float, glm::precision::highp> v; for (int i = 0; i < m; ++i) { v[i] = em(i); } return v; } #endif #endif //GT_GRAPH_VIEWER_EIGEN2GLM_H
22.018868
94
0.553556
b34fcc1f7dd20e88e6a696468ef634127658cc49
2,621
c
C
install/lib/file/f_rdwr.c
minblock/msdos
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
[ "Apache-2.0" ]
null
null
null
install/lib/file/f_rdwr.c
minblock/msdos
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
[ "Apache-2.0" ]
null
null
null
install/lib/file/f_rdwr.c
minblock/msdos
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
[ "Apache-2.0" ]
null
null
null
/***************************************************************************/ /* */ /* F_RDWR.C */ /* */ /* Copyright (c) 1991 - Microsoft Corp. */ /* All rights reserved. */ /* Microsoft Confidential */ /* */ /* Reads or writes a requested number of bytes into a specified buffer. */ /* The number of bytes requested may be > 64K without causing a problem. */ /* */ /* int BigReadWrite( int iFile, char far *Buf, long lToRead ) */ /* */ /* ARGUMENTS: iFile - Open DOS file handle, file pointer must be set */ /* to position for start of read or write */ /* Buf - Far ptr to caller's buffer */ /* lBytes - Number of bytes to read or write */ /* fRdWr - Flags 0 for read and 1 for write */ /* RETURN: int - OK if no error - ERROR if read or write error */ /* */ /* Created 10-28-89 johnhe */ /***************************************************************************/ #include <stdio.h> #include <dos.h> #include <alias.h> #include <strlib.h> #include <window.h> int BigReadWrite( int iFile, char far *Buf, long lBytes, int RdWr ) { unsigned uDone; /* Number of bytes transfered */ unsigned uToDo; /* Count of bytes move in the loop */ /*lint -e64 */ static unsigned (*Func[])( int, void far *, unsigned, unsigned *) = { _dos_read, _dos_write }; /*lint -e64 */ if ( RdWr ) /* Be sure RdWr is either 0 or 1 */ RdWr = 1; /*lint -e530 */ /* Loop to do reads or writes in */ /* allowable size blocks 0xff00 */ while ( lBytes > 0L ) { Buf = NormalizePtr( Buf ); /* Precaution to prevent segment wrap*/ /* Figure out number of bytes to do */ uToDo = (long)MAX_BLOCK < lBytes ? MAX_BLOCK : (unsigned)lBytes; /* Do the read or write */ if ( (*Func[ RdWr ])( iFile, (void far *)Buf, uToDo, &uDone ) != OK || uDone != uToDo ) return( ERROR ); /* ERROR EXIT */ /* Increment the buffer pointer */ Buf = HugeAdd( Buf, (long)uToDo ); /* also normalizes the ptr */ lBytes -= (LONG)(uDone); /* Adjust remaining bytes */ UpdateByteCount( (long)(uToDo) ); /* Update the status gage */ } return( OK ); /* NORMAL EXIT */ } /*lint +e530 */ 
40.953125
77
0.457841
feab38027ba7eafd9cfbdf83ef69c10101758c21
1,173
h
C
SurfNewsHD/IPhone/More/Offlines/OfflinesMagazineController.h
liufeng-working/SurfNewsHD
0500a7a90fd9f80c47e6704380e0c5320f9689a0
[ "MIT" ]
null
null
null
SurfNewsHD/IPhone/More/Offlines/OfflinesMagazineController.h
liufeng-working/SurfNewsHD
0500a7a90fd9f80c47e6704380e0c5320f9689a0
[ "MIT" ]
null
null
null
SurfNewsHD/IPhone/More/Offlines/OfflinesMagazineController.h
liufeng-working/SurfNewsHD
0500a7a90fd9f80c47e6704380e0c5320f9689a0
[ "MIT" ]
null
null
null
// // OfflinesMagazineController.h // SurfNewsHD // // Created by SYZ on 13-8-6. // Copyright (c) 2013年 apple. All rights reserved. // #import "PhoneSurfController.h" #import "OfflineIssueInfo.h" #import "OfflineDownloader.h" @interface OfflinesMagazineCell : UITableViewCell { UILabel *nameLabel; UILabel *statusLabel; UIButton *selectedButton; UIView *lineView; } @property(nonatomic, strong) OfflineIssueInfo *offlineIssueInfo; - (void)setOfflineIssueInfo:(OfflineIssueInfo *)offlineIssueInfo deleteModel:(BOOL)del; - (void)deleteModelAnimation; //删除选择框出来时的动画 - (void)normalModelAnimation; //取消删除时的动画 - (void)applyTheme; - (void)didSelectedAction; @end @interface OfflinesMagazineController : PhoneSurfController <UITableViewDelegate, UITableViewDataSource,OfflineDownloaderDelegate> { NSMutableArray *offlinesArray; UIButton *cleanButton; UIButton *okDeleteButton; UIButton *cancleDeleteButton; UIButton *pauseButton; UIButton *startButton; UIButton *cleanAllButton; UITableView *tableView; UIView *toolBarView; BOOL deleteModel; UIView *bgView; } - (void)deleteButtonCountChange; @end
23.46
130
0.749361
513ab9c03711820e07a22065eb917191b4d8a68f
1,197
h
C
core/AbstractWebEngine/TabOrigin.h
knowac/tizen-browser-30
0ea06a4cd6bdca3dc3da674dd8189bf528c166f8
[ "Apache-2.0" ]
1
2019-01-31T21:44:00.000Z
2019-01-31T21:44:00.000Z
core/AbstractWebEngine/TabOrigin.h
knowac/tizen-browser-1.6.4
a37a3ea5b8c01d86bd3dac00d228800e5eed4619
[ "Apache-2.0" ]
null
null
null
core/AbstractWebEngine/TabOrigin.h
knowac/tizen-browser-1.6.4
a37a3ea5b8c01d86bd3dac00d228800e5eed4619
[ "Apache-2.0" ]
1
2019-01-31T21:44:04.000Z
2019-01-31T21:44:04.000Z
/* * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ORIGIN_H_ #define ORIGIN_H_ namespace tizen_browser { namespace basic_webengine { /* * Container for webview origin id value */ class TabOrigin { public: static const int UNKNOWN = -1; static const int QUICKACCESS = -2; TabOrigin() : m_value(UNKNOWN) { } TabOrigin(int from) : m_value(from) { } int getValue() const { return m_value; } void setValue(int value) { m_value = value; } bool isFromWebView() const { return m_value >= 0; } bool isFromQuickAccess() const { return m_value == QUICKACCESS; } private: int m_value; }; } } #endif
26.021739
75
0.708438
b66bc3e25bc17b2a2dd0704012be3e0730e10e3e
83
h
C
Pod/Classes/Projection/MOBProjectionEPSG32600.h
jkdubr/Proj4
dcdf91821720b90423e7d6774d14948d165fbb12
[ "MIT" ]
3
2015-01-29T15:53:20.000Z
2019-03-06T03:36:56.000Z
Pod/Classes/Projection/MOBProjectionEPSG32600.h
jkdubr/Proj4
dcdf91821720b90423e7d6774d14948d165fbb12
[ "MIT" ]
1
2016-01-12T13:53:40.000Z
2016-01-12T13:53:40.000Z
Pod/Classes/Projection/MOBProjectionEPSG32600.h
jkdubr/Proj4
dcdf91821720b90423e7d6774d14948d165fbb12
[ "MIT" ]
null
null
null
#import "MOBProjection.h" @interface MOBProjectionEPSG32600 : MOBProjection @end
13.833333
49
0.807229
ab2fd29cce580d2d45bc6cee53ba2dbded58f8c4
7,062
h
C
CoX/Driver/Memory_EEPROM_NUC/Memory_EEPROM_93LC46A/93LC46A_Driver/lib/93LC46A.h
coocox/cox
c94e4a65417301b76a02108be5a9eeea3663ef70
[ "BSD-3-Clause" ]
58
2015-01-23T11:12:14.000Z
2022-03-23T01:52:14.000Z
CoX/Driver/Memory_EEPROM_NUC/Memory_EEPROM_93LC46A/93LC46A_Driver/lib/93LC46A.h
eventus17/cox
c94e4a65417301b76a02108be5a9eeea3663ef70
[ "BSD-3-Clause" ]
1
2017-12-30T05:40:50.000Z
2017-12-30T05:40:50.000Z
CoX/Driver/Memory_EEPROM_NUC/Memory_EEPROM_93LC46A/93LC46A_Driver/lib/93LC46A.h
eventus17/cox
c94e4a65417301b76a02108be5a9eeea3663ef70
[ "BSD-3-Clause" ]
68
2015-01-22T11:03:59.000Z
2022-01-29T14:18:40.000Z
//***************************************************************************** // //! \file 93LC46A.h //! \brief Prototypes for the 93LC46A Driver. //! \version V1.0.0.0 //! \date 12/28/2012 //! \author CooCox //! \copy //! //! Copyright (c) 2011, CooCox //! All rights reserved. //! //! Redistribution and use in source and binary forms, with or without //! modification, are permitted provided that the following conditions //! are met: //! //! * Redistributions of source code must retain the above copyright //! notice, this list of conditions and the following disclaimer. //! * Redistributions in binary form must reproduce the above copyright //! notice, this list of conditions and the following disclaimer in the //! documentation and/or other materials provided with the distribution. //! * Neither the name of the <ORGANIZATION> nor the names of its //! contributors may be used to endorse or promote products derived //! from this software without specific prior written permission. //! //! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" //! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE //! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE //! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE //! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR //! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF //! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS //! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN //! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) //! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF //! THE POSSIBILITY OF SUCH DAMAGE. //***************************************************************************** #ifndef __93LC46A_H__ #define __93LC46A_H__ //***************************************************************************** // // If building with a C++ compiler, make all of the definitions in this header // have a C binding. // //***************************************************************************** #ifdef __cplusplus extern "C" { #endif //***************************************************************************** // //! \addtogroup CoX_Driver_Lib //! @{ // //***************************************************************************** //***************************************************************************** // //! \addtogroup Memory //! @{ // //***************************************************************************** //***************************************************************************** // //! \addtogroup GPIO_Eeprom //! @{ // //***************************************************************************** //***************************************************************************** //***************************************************************************** //! \addtogroup 93LC46A_Driver //! @{ // //***************************************************************************** //***************************************************************************** //! \addtogroup 93LC46A_User_Config //! @{ // //***************************************************************************** //***************************************************************************** //! \addtogroup 93LC46A_PIN_Config //! @{ // //***************************************************************************** #define _93LC46A_PIN_PORT xGPIO_PORTB_BASE #define _93LC46A_PERIPH_PORT xSYSCTL_PERIPH_GPIOB #define _93LC46A_PIN_SEL xGPIO_PIN_12 #define _93LC46A_PIN_CLOCK xGPIO_PIN_13 #define _93LC46A_PIN_DI xGPIO_PIN_14 #define _93LC46A_PIN_DO xGPIO_PIN_15 //***************************************************************************** // //! @} // //***************************************************************************** //***************************************************************************** //! \addtogroup 93LC46A_OP_CODE //! @{ // //***************************************************************************** #define _93LC46A_WriteEnable 0x0260 #define _93LC46A_WriteDisable 0x0200 #define _93LC46A_EraseAll 0x0240 #define _93LC46A_WriteAll 0x0220 #define _93LC46A_Write 0x0280 #define _93LC46A_Read 0x0300 #define _93LC46A_Erase 0x0380 //***************************************************************************** // //! @} // //***************************************************************************** //***************************************************************************** //! \addtogroup 93LC46A_DELAYTIME //! @{ // //***************************************************************************** #define DELAY_TIME_1 50 #define DELAY_TIME_2 20 #define DELAY_TIME_3 30 //***************************************************************************** // //! @} // //***************************************************************************** //***************************************************************************** // //! @} // //***************************************************************************** //***************************************************************************** // //! \addtogroup COX_93LC46A_Exported_APIs //! @{ // //***************************************************************************** void eep_93LC46A_Write(const char data, char addr); void eep_93LC46A_Cmd(short cmd); void eep_93LC46A_Read(char* data, unsigned char addr); void eep_93LC46A_Init(); void eep_93LC46A_Erase(unsigned char addr); //***************************************************************************** // //! @} // //***************************************************************************** //***************************************************************************** // //! @} // //***************************************************************************** //***************************************************************************** // //! @} // //***************************************************************************** //***************************************************************************** // //! @} // //***************************************************************************** //***************************************************************************** // //! @} // //***************************************************************************** //***************************************************************************** // //! Mark the end of the C bindings section for C++ compilers. // //***************************************************************************** #ifdef __cplusplus } #endif #endif //__93LC46A_H__
36.030612
79
0.338006
ab3a5e398a454026ca73eb8596c082b42490469e
1,910
h
C
src/tunit/include/tunit/class_initialize_attribute.h
gammasoft71/tunit
9bbe236db66593495fa4549cd0abf7c4239407fd
[ "MIT" ]
3
2021-03-06T17:24:02.000Z
2021-12-16T09:28:02.000Z
src/tunit/include/tunit/class_initialize_attribute.h
gammasoft71/xtd_tunit
9bbe236db66593495fa4549cd0abf7c4239407fd
[ "MIT" ]
null
null
null
src/tunit/include/tunit/class_initialize_attribute.h
gammasoft71/xtd_tunit
9bbe236db66593495fa4549cd0abf7c4239407fd
[ "MIT" ]
null
null
null
/// @file /// @brief Contains tunit::class_initialize_attribute class. #pragma once #include "test.h" /// @brief The tunit namespace contains a unit test library. namespace tunit { /// @brief This attribute is use to add initialize class method to class test attribute. class class_initialize_attribute { public: /// @brief Creates new instance of classinitialize_attribute attribute. /// @param name Name of attribute /// @param test_class tunit::class_test containing initialize method. /// @param method Initialize class method. template<typename TestClass> class_initialize_attribute(const std::string& name, TestClass& test_class, void (*method)()) noexcept : class_initialize_attribute(name, test_class, method, tunit::line_info()) {} /// @brief Creates new instance of classinitialize_attribute attribute. /// @param name Name of attribute /// @param test_class tunit::class_test containing initialize method. /// @param method Initialize class method. /// @param line_info Contains information about current file and current line. template<typename TestClass> class_initialize_attribute(const std::string& name, TestClass& test_class, void (*method)(), const tunit::line_info& caller) noexcept {test_class.add_class_initialize({name, method, caller});} }; } /// @brief add initialize class method to class test. /// @param method_name cleanup class method to add. /// @ingroup tunit #define class_initialize_(method_name) \ __##method_name##_static() {} \ class __class_initialize_attribute : public tunit::class_initialize_attribute { \ public:\ template<typename test_class> __class_initialize_attribute(test_class& test) : class_initialize_attribute(#method_name, test, &method_name, {__func__, __FILE__, __LINE__}) {__##method_name##_static();} \ } __class_initialize_attribute {*this}; \ static void method_name()
48.974359
207
0.74712
af238e34b8d6819a74380ed1324e05c2bf8f198e
407
h
C
Daves_Garage_E05_Rainbow_Marquee/src/marquee.h
krizzo/Daves_Garage_Tiki_Fire_Umbrella
5ab714e7132444ed7f51baeffd538eb1ffbab16c
[ "MIT" ]
2
2021-02-16T07:46:10.000Z
2021-11-15T10:46:32.000Z
Daves_Garage_E05_Rainbow_Marquee/src/marquee.h
krizzo/Daves_Garage_Tiki_Fire_Umbrella
5ab714e7132444ed7f51baeffd538eb1ffbab16c
[ "MIT" ]
null
null
null
Daves_Garage_E05_Rainbow_Marquee/src/marquee.h
krizzo/Daves_Garage_Tiki_Fire_Umbrella
5ab714e7132444ed7f51baeffd538eb1ffbab16c
[ "MIT" ]
null
null
null
#include <Arduino.h> #define FASTLED_INTERNAL #include <FastLED.h> void DrawMarquee(void); void DrawMarquee() { static byte j = HUE_BLUE; j += 4; byte k = j; CRGB c; for (int i = 0; i < NUM_LEDS; i++) g_LEDs[i] = c.setHue(k+=8); static int scroll = 0; for (int i = scroll % 5; i < NUM_LEDS; i += 5) g_LEDs[i] = CRGB::Black; scroll++; delay(50); }
15.074074
50
0.545455
826d18e1a590dc849b5c368d30b9ba9cd0da9d64
10,908
h
C
UDHNetworking/UDHNetworking/UDHNetworkURLRequestSerialization.h
DanteCY/UDHNetworking
611e2ae1d4b7bfe64002fa1b0b446aad9a1d2fe9
[ "MIT" ]
null
null
null
UDHNetworking/UDHNetworking/UDHNetworkURLRequestSerialization.h
DanteCY/UDHNetworking
611e2ae1d4b7bfe64002fa1b0b446aad9a1d2fe9
[ "MIT" ]
null
null
null
UDHNetworking/UDHNetworking/UDHNetworkURLRequestSerialization.h
DanteCY/UDHNetworking
611e2ae1d4b7bfe64002fa1b0b446aad9a1d2fe9
[ "MIT" ]
null
null
null
// // UDHNetworkURLRequestSerialization.h // UDHNetworking // // Created by hcy on 2019/6/24. // Copyright © 2019 yd. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @protocol UDHNetworkURLRequestSerialization <NSObject, NSSecureCoding, NSCopying> /** Returns a request with the specified parameters encoded into a copy of the original request. @param request The original request. @param parameters The parameters to be encoded. @param error The error that occurred while attempting to encode the request parameters. @return A serialized request. */ - (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request withParameters:(nullable id)parameters error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW; @end @protocol UDHNetworkMultipartFormData /** Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary. The filename and MIME type for this data in the form will be automatically generated, using the last path component of the `fileURL` and system associated MIME type for the `fileURL` extension, respectively. @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. @param name The name to be associated with the specified data. This parameter must not be `nil`. @param error If an error occurs, upon return contains an `NSError` object that describes the problem. @return `YES` if the file data was successfully appended, otherwise `NO`. */ - (BOOL)appendPartWithFileURL:(NSURL *)fileURL name:(NSString *)name error:(NSError * _Nullable __autoreleasing *)error; /** Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. @param name The name to be associated with the specified data. This parameter must not be `nil`. @param fileName The file name to be used in the `Content-Disposition` header. This parameter must not be `nil`. @param mimeType The declared MIME type of the file data. This parameter must not be `nil`. @param error If an error occurs, upon return contains an `NSError` object that describes the problem. @return `YES` if the file data was successfully appended otherwise `NO`. */ - (BOOL)appendPartWithFileURL:(NSURL *)fileURL name:(NSString *)name fileName:(NSString *)fileName mimeType:(NSString *)mimeType error:(NSError * _Nullable __autoreleasing *)error; /** Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary. @param inputStream The input stream to be appended to the form data @param name The name to be associated with the specified input stream. This parameter must not be `nil`. @param fileName The filename to be associated with the specified input stream. This parameter must not be `nil`. @param length The length of the specified input stream in bytes. @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. */ - (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream name:(NSString *)name fileName:(NSString *)fileName length:(int64_t)length mimeType:(NSString *)mimeType; /** Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. @param data The data to be encoded and appended to the form data. @param name The name to be associated with the specified data. This parameter must not be `nil`. @param fileName The filename to be associated with the specified data. This parameter must not be `nil`. @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. */ - (void)appendPartWithFileData:(NSData *)data name:(NSString *)name fileName:(NSString *)fileName mimeType:(NSString *)mimeType; /** Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary. @param data The data to be encoded and appended to the form data. @param name The name to be associated with the specified data. This parameter must not be `nil`. */ - (void)appendPartWithFormData:(NSData *)data name:(NSString *)name; /** Appends HTTP headers, followed by the encoded data and the multipart form boundary. @param headers The HTTP headers to be appended to the form data. @param body The data to be encoded and appended to the form data. This parameter must not be `nil`. */ - (void)appendPartWithHeaders:(nullable NSDictionary <NSString *, NSString *> *)headers body:(NSData *)body; /** Throttles request bandwidth by limiting the packet size and adding a delay for each chunk read from the upload stream. When uploading over a 3G or EDGE connection, requests may fail with "request body stream exhausted". Setting a maximum packet size and delay according to the recommended values (`kAFUploadStream3GSuggestedPacketSize` and `kAFUploadStream3GSuggestedDelay`) lowers the risk of the input stream exceeding its allocated bandwidth. Unfortunately, there is no definite way to distinguish between a 3G, EDGE, or LTE connection over `NSURLConnection`. As such, it is not recommended that you throttle bandwidth based solely on network reachability. Instead, you should consider checking for the "request body stream exhausted" in a failure block, and then retrying the request with throttled bandwidth. @param numberOfBytes Maximum packet size, in number of bytes. The default packet size for an input stream is 16kb. @param delay Duration of delay each time a packet is read. By default, no delay is set. */ - (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes delay:(NSTimeInterval)delay; @end @interface UDHNetworkURLRequestSerialization : NSObject<UDHNetworkURLRequestSerialization> @property (nonatomic, assign) NSStringEncoding stringEncoding; @property (nonatomic, assign) BOOL allowsCellularAccess; @property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy; @property (nonatomic, assign) BOOL HTTPShouldHandleCookies; @property (nonatomic, assign) BOOL HTTPShouldUsePipelining; @property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType; @property (nonatomic, assign) NSTimeInterval timeoutInterval; @property (readonly, nonatomic, strong) NSDictionary <NSString *, NSString *> *HTTPRequestHeaders; + (instancetype)serializer; - (void)setValue:(nullable NSString *)value forHTTPHeaderField:(NSString *)field; - (nullable NSString *)valueForHTTPHeaderField:(NSString *)field; - (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username password:(NSString *)password; - (void)clearAuthorizationHeader; @property (nonatomic, strong) NSSet <NSString *> *HTTPMethodsEncodingParametersInURI; - (void)setQueryStringSerializationWithBlock:(nullable NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block; - (NSMutableURLRequest *)requestWithMethod:(NSString *)method URLString:(NSString *)URLString parameters:(nullable id)parameters error:(NSError * _Nullable __autoreleasing *)error; - (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method URLString:(NSString *)URLString parameters:(nullable NSDictionary <NSString *, id> *)parameters constructingBodyWithBlock:(nullable void (^)(id <UDHNetworkMultipartFormData> formData))block error:(NSError * _Nullable __autoreleasing *)error; - (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request writingStreamContentsToFile:(NSURL *)fileURL completionHandler:(nullable void (^)(NSError * _Nullable error))handler; @end @interface UDHNetworkJSONRequestSerializer : UDHNetworkURLRequestSerialization /** Options for writing the request JSON data from Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONWritingOptions". `0` by default. */ @property (nonatomic, assign) NSJSONWritingOptions writingOptions; /** Creates and returns a JSON serializer with specified reading and writing options. @param writingOptions The specified JSON writing options. */ + (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions; @end #pragma mark - /** `AFPropertyListRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSPropertyListSerializer`, setting the `Content-Type` of the encoded request to `application/x-plist`. */ @interface UDHNetworkPropertyListRequestSerializer : UDHNetworkURLRequestSerialization /** The property list format. Possible values are described in "NSPropertyListFormat". */ @property (nonatomic, assign) NSPropertyListFormat format; /** @warning The `writeOptions` property is currently unused. */ @property (nonatomic, assign) NSPropertyListWriteOptions writeOptions; /** Creates and returns a property list serializer with a specified format, read options, and write options. @param format The property list format. @param writeOptions The property list write options. @warning The `writeOptions` property is currently unused. */ + (instancetype)serializerWithFormat:(NSPropertyListFormat)format writeOptions:(NSPropertyListWriteOptions)writeOptions; @end NS_ASSUME_NONNULL_END
49.135135
695
0.720939
259dc66dd75e13c93e5f4342a030711d929d730f
363
h
C
Code/src/aboutform.h
scigeliu/ViaLacteaVisualAnalytics
2ac79301ceaaab0415ec7105b8267552262c7650
[ "Apache-2.0" ]
1
2021-12-15T15:15:50.000Z
2021-12-15T15:15:50.000Z
Code/src/aboutform.h
scigeliu/ViaLacteaVisualAnalytics
2ac79301ceaaab0415ec7105b8267552262c7650
[ "Apache-2.0" ]
null
null
null
Code/src/aboutform.h
scigeliu/ViaLacteaVisualAnalytics
2ac79301ceaaab0415ec7105b8267552262c7650
[ "Apache-2.0" ]
null
null
null
#ifndef ABOUTFORM_H #define ABOUTFORM_H #include <QWidget> #include <QUrl> namespace Ui { class AboutForm; } class AboutForm : public QWidget { Q_OBJECT public: explicit AboutForm(QWidget *parent = 0); ~AboutForm(); private slots: void on_neaniasLogo_clicked(); private: Ui::AboutForm *ui; QUrl neaniasUrl; }; #endif // ABOUTFORM_H
12.964286
44
0.69697
057be6d43e74f7e4d483065785538495f6b0af9f
938
h
C
src/core/lvp_mem.h
panda-media/LiteVideoPlayer
c75df060e02ae7c1edb63e6889d15793c6b21b9f
[ "MIT" ]
1
2020-07-20T10:20:43.000Z
2020-07-20T10:20:43.000Z
src/core/lvp_mem.h
panda-media/LiteVideoPlayer
c75df060e02ae7c1edb63e6889d15793c6b21b9f
[ "MIT" ]
null
null
null
src/core/lvp_mem.h
panda-media/LiteVideoPlayer
c75df060e02ae7c1edb63e6889d15793c6b21b9f
[ "MIT" ]
null
null
null
/* * @Description: memory funtion * @Author: fgodtdev@hotmail.com * @Date: 2019-08-26 09:37:08 * whole lib is based on ffmpeg so we use av_malloc */ #ifndef _LVP_MEM_H_ #define _LVP_MEM_H_ #include <stdlib.h> #include <libavutil/mem.h> /** * @description: alloc memory * @param t alloc mem size * @return NULL for error */ static inline void *lvp_mem_malloc(size_t t){ return av_malloc(t); } /** * @description: alloc memory and set all zero * @param t alloc mem size * @return NULL for error */ static inline void *lvp_mem_mallocz(size_t t){ return av_mallocz(t); } static inline void *lvp_mem_calloc(size_t num,size_t size){ return av_calloc(num,size); } /** * @description: lvp_mem_free memory * @param data lvp_mem_free data */ static inline void lvp_mem_free(void *data){ av_free(data); } static inline void* lvp_mem_realloc(void *data,size_t size){ return av_realloc(data,size); } #endif
19.957447
60
0.703625
b010ea9d8bde6d401002bb95cfb918c94819143e
3,196
h
C
src/turrets.h
Moomed-Hamed/tower-defense-game
fb4959eadf8d73c69cba8420418af7880cebb79d
[ "MIT" ]
null
null
null
src/turrets.h
Moomed-Hamed/tower-defense-game
fb4959eadf8d73c69cba8420418af7880cebb79d
[ "MIT" ]
null
null
null
src/turrets.h
Moomed-Hamed/tower-defense-game
fb4959eadf8d73c69cba8420418af7880cebb79d
[ "MIT" ]
null
null
null
#include "enemies.h" #define MAX_TURRETS 256 #define TURRET_SMALL 1 struct Turret { uint type; vec3 position; vec3 aim_direction; // where the turret is currently aiming vec3 target_pos; // where the turret is trying to aim float cooldown; // seconds until turret can fire }; void spawn_turret(Turret* turrets, vec3 pos, uint type = TURRET_SMALL) { for (uint i = 0; i < MAX_TURRETS; i++) { if (turrets[i].type == NULL) { turrets[i].type = type; turrets[i].position = pos + vec3(0.5, 0, 0.5); turrets[i].aim_direction = glm::normalize(vec3(1, 0, 1)); turrets[i].target_pos = {}; turrets[i].cooldown = -1; return; } } } void update_turrets(Turret* turrets) { for (uint i = 0; i < MAX_TURRETS; i++) { if (turrets[i].type != NULL) { // do stuff } } } // rendering struct Turret_Cannon_Drawable { vec3 position; mat3 rotation; }; struct Turret_Platform_Drawable { vec3 position; vec3 color; }; struct Turret_Renderer { uint num_turrets; Turret_Cannon_Drawable cannons[MAX_TURRETS]; Turret_Platform_Drawable platforms[MAX_TURRETS]; Drawable_Mesh_UV cannon_mesh, platform_mesh; Shader cannon_shader, platform_shader; }; void init(Turret_Renderer* renderer) { load(&renderer->cannon_mesh, "assets/meshes/turret.mesh_uv", "assets/textures/pallete.bmp", sizeof(renderer->cannons)); mesh_add_attrib_vec3(3, sizeof(Turret_Cannon_Drawable), 0); // world pos mesh_add_attrib_mat3(4, sizeof(Turret_Cannon_Drawable), sizeof(vec3)); // rotation load(&(renderer->cannon_shader), "assets/shaders/bullet.vert", "assets/shaders/tile.frag"); bind(renderer->cannon_shader); set_int(renderer->cannon_shader, "positions", 0); set_int(renderer->cannon_shader, "normals" , 1); set_int(renderer->cannon_shader, "albedo" , 2); set_int(renderer->cannon_shader, "texture_sampler", 4); load(&renderer->platform_mesh, "assets/meshes/turret_platform.mesh_uv", "assets/textures/pallete.bmp", sizeof(renderer->cannons)); mesh_add_attrib_vec3(3, sizeof(Turret_Platform_Drawable), 0); // world pos load(&(renderer->platform_shader), "assets/shaders/enemy.vert", "assets/shaders/tile.frag"); bind(renderer->platform_shader); set_int(renderer->platform_shader, "positions", 0); set_int(renderer->platform_shader, "normals" , 1); set_int(renderer->platform_shader, "albedo" , 2); set_int(renderer->cannon_shader, "texture_sampler", 4); } void update_renderer(Turret_Renderer* renderer, Turret* turrets) { uint num_turrets = 0; Turret_Cannon_Drawable* cannon_memory = renderer->cannons; Turret_Platform_Drawable* platform_memory = renderer->platforms; for (uint i = 0; i < MAX_TURRETS; i++) { if (turrets[i].type != NULL) { cannon_memory->position = turrets[i].position; cannon_memory->rotation = point_at(turrets[i].aim_direction, vec3(0, 1, 0)); platform_memory->position = turrets[i].position; num_turrets++; cannon_memory++; platform_memory++; } } renderer->num_turrets = num_turrets; update(renderer->cannon_mesh , num_turrets * sizeof(Turret_Cannon_Drawable) , (byte*)renderer->cannons); update(renderer->platform_mesh, num_turrets * sizeof(Turret_Platform_Drawable), (byte*)renderer->platforms); }
27.791304
131
0.727472
7f215b99374936105b2febb71c813d5abdd1587d
313
h
C
Hello/Hello/NLoginViewController.h
gansidui/iOS-example
418b39ef21074593dcc4958c57d8712fb19ff8b4
[ "MIT" ]
1
2020-10-01T08:35:41.000Z
2020-10-01T08:35:41.000Z
Hello/Hello/NLoginViewController.h
gansidui/iOS-example
418b39ef21074593dcc4958c57d8712fb19ff8b4
[ "MIT" ]
null
null
null
Hello/Hello/NLoginViewController.h
gansidui/iOS-example
418b39ef21074593dcc4958c57d8712fb19ff8b4
[ "MIT" ]
null
null
null
// // NLoginViewController.h // Hello // // Created by dackli on 16/5/9. // Copyright © 2016年 gansidui. All rights reserved. // #import <UIKit/UIKit.h> #import "UserSelectViewController.h" @interface NLoginViewController : UITableViewController<UITableViewDataSource,UserSelectViewControllerDelegate> @end
20.866667
111
0.766773
c7a86243ded2c0ea7e8feb8d03ea2fb428baddd3
409
h
C
src/TacticsVictory/common/Battle/Scene/Objects/Units/UnitS.h
Sasha7b9/U-Cube
442927ff1391bfe78cdf520ad303c7dc29086b46
[ "MIT" ]
null
null
null
src/TacticsVictory/common/Battle/Scene/Objects/Units/UnitS.h
Sasha7b9/U-Cube
442927ff1391bfe78cdf520ad303c7dc29086b46
[ "MIT" ]
null
null
null
src/TacticsVictory/common/Battle/Scene/Objects/Units/UnitS.h
Sasha7b9/U-Cube
442927ff1391bfe78cdf520ad303c7dc29086b46
[ "MIT" ]
null
null
null
// 2021/02/26 16:01:57 (c) Aleksandr Shevchenko e-mail : Sasha7b9@tut.by #pragma once #include "Scene/Objects/ObjectS.h" class UnitSpecificS : public ObjectSpecificS { URHO3D_OBJECT(UnitSpecificS, ObjectSpecificS); public: UnitSpecificS(Unit *object) : ObjectSpecificS(object), unit(object) {} protected: virtual void Update(float timeStep) override; private: Unit *unit = nullptr; };
18.590909
74
0.728606
2a12a051021cc72f9bbfa5dcb29f994ff16f18f5
4,852
h
C
src/nrf_802154_stats.h
AdamZelikNS/nRF-IEEE-802.15.4-radio-driver
6593395479b7a4f1969bdfb8196dd8e914c6455d
[ "BSD-3-Clause" ]
null
null
null
src/nrf_802154_stats.h
AdamZelikNS/nRF-IEEE-802.15.4-radio-driver
6593395479b7a4f1969bdfb8196dd8e914c6455d
[ "BSD-3-Clause" ]
null
null
null
src/nrf_802154_stats.h
AdamZelikNS/nRF-IEEE-802.15.4-radio-driver
6593395479b7a4f1969bdfb8196dd8e914c6455d
[ "BSD-3-Clause" ]
null
null
null
/* * Copyright (c) 2017 - 2021, Nordic Semiconductor ASA * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of Nordic Semiconductor ASA nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * */ #ifndef NRF_802154_STATS_H_ #define NRF_802154_STATS_H_ #include "nrf_802154_types.h" #include "nrf_802154_utils.h" #if !defined(UNIT_TEST) // Don't use directly. Use provided nrf_802154_stat_xxxx API macros. extern volatile nrf_802154_stats_t g_nrf_802154_stats; extern volatile nrf_802154_stat_totals_t g_nrf_802154_stat_totals; /**@brief Increment one of the @ref nrf_802154_stat_counters_t fields. * * @param field_name Identifier of struct member to increment */ #define nrf_802154_stat_counter_increment(field_name) \ do \ { \ nrf_802154_mcu_critical_state_t mcu_cs; \ \ nrf_802154_mcu_critical_enter(mcu_cs); \ (g_nrf_802154_stats.counters.field_name)++; \ nrf_802154_mcu_critical_exit(mcu_cs); \ } \ while (0) /**@brief Write one of the @ref nrf_802154_stat_timestamps_t fields. * * @param field_name Identifier of struct member to write * @param value Value to write */ #define nrf_802154_stat_timestamp_write(field_name, value) \ do \ { \ (g_nrf_802154_stats.timestamps.field_name) = (value); \ } \ while (0) /**@brief Read one of the @ref nrf_802154_stat_timestamps_t fields. */ #define nrf_802154_stat_timestamp_read(field_name) \ (g_nrf_802154_stats.timestamps.field_name) #define nrf_802154_stat_totals_increment(field_name, value) \ do \ { \ nrf_802154_mcu_critical_state_t mcu_cs; \ \ nrf_802154_mcu_critical_enter(mcu_cs); \ (g_nrf_802154_stat_totals.field_name) += (value); \ nrf_802154_mcu_critical_exit(mcu_cs); \ } \ while (0) extern void nrf_802154_stat_totals_get_notify(void); #else // !defined(UNIT_TEST) #define nrf_802154_stat_counter_increment(field_name) \ nrf_802154_stat_counter_increment_func(offsetof(nrf_802154_stat_counters_t, field_name)) #define nrf_802154_stat_timestamp_write(field_name, value) \ nrf_802154_stat_timestamp_write_func(offsetof(nrf_802154_stat_timestamps_t, field_name), \ (value)) #define nrf_802154_stat_timestamp_read(field_name) \ nrf_802154_stat_timestamp_read_func(offsetof(nrf_802154_stat_timestamps_t, field_name)) // Functions for which mocks are generated. void nrf_802154_stat_counter_increment_func(size_t field_offset); void nrf_802154_stat_timestamp_write_func(size_t field_offset, uint32_t value); uint32_t nrf_802154_stat_timestamp_read_func(size_t field_offset); #endif // !defined(UNIT_TEST) #endif /* NRF_802154_STATS_H_ */
43.711712
94
0.650453
bd05aac6f7e3c19d999ab7d599d27d72500cabc4
9,031
c
C
libbt/libnat/libnat/upnp/os_win.c
breezechen/zevent
f86219b3ce4afbb516b22c41ce125b0f916c490c
[ "Apache-2.0" ]
1
2021-11-19T06:14:16.000Z
2021-11-19T06:14:16.000Z
libbt/libnat/libnat/upnp/os_win.c
geniejl/zevent
5dd3de57adf1deecc8f008db387ebfa460767fda
[ "Apache-2.0" ]
null
null
null
libbt/libnat/libnat/upnp/os_win.c
geniejl/zevent
5dd3de57adf1deecc8f008db387ebfa460767fda
[ "Apache-2.0" ]
2
2017-07-15T02:40:52.000Z
2021-11-19T06:14:18.000Z
/* Copyright (c) 2006 Adam Warrington ** $Id: os_win.c 2615 2006-03-12 06:14:59Z ghs $ ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to deal ** in the Software without restriction, including without limitation the rights ** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ** copies of the Software, and to permit persons to whom the Software is ** furnished to do so, subject to the following conditions: ** ** The above copyright notice and this permission notice shall be included in ** all copies or substantial portions of the Software. ** ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ** SOFTWARE. ** ****************************************************************************** ** ** This file, os_win.c, contains the implementation fo the operating system ** specific calls for the win32 operating system. These calls include ** functionality for sockets and for threads. */ #include "error.h" #include "os_common.h" /* Helper Function Prototypes */ static int Initialize_Winsock_Library(); static int Is_Valid_Library(WSADATA * wsaData); static int Initialize_Sockaddr_in(struct sockaddr_in* server, struct hostent** hp, const char * host, short int port); /* This function takes an OsSocket object, and attempts to allocate that socket of UDP type. This can then be used to send udp data to specified locations. */ int LNat_Win_Socket_Udp_Setup(const char *local_ip,OsSocket ** s) { int ret; int blockMode = 1; /* flag to set socket to nonblock */ struct sockaddr_in sa; /* allocate a new OsSocket structure */ *s = (OsSocket *)malloc(sizeof(OsSocket)); if(*s == NULL) { return BAD_MALLOC; } /* initialize the winsock library */ if((ret = Initialize_Winsock_Library()) != OK) { free(*s); return ret; } /* Set up the sockets */ if(((*s)->sock = socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET) { WSACleanup(); /* call cleanup because user doesn't need to close sock */ free(*s); return SOCKET_INVALID; } /* we want a non-blocking socket so our select calls can timeout */ /* ioctlsocket returns nonzero on failure */ if(ioctlsocket((*s)->sock, FIONBIO, (u_long FAR*)&blockMode)) { WSACleanup(); /* call cleanup because user doesn't need to close sock */ return SOCKET_IOCTL_FAILURE; } sa.sin_family = AF_INET; sa.sin_addr.s_addr = inet_addr(local_ip); sa.sin_port = 0; ret = bind((*s)->sock, (SOCKADDR*)&sa, sizeof(sa)); return OK; } /* This function will close a udp socket type and clean it up appropriately. */ int LNat_Win_Socket_Udp_Close(OsSocket ** s) { return LNat_Win_Socket_Close(s); } /* This function will send data over a udp socket to address host_addr, and port port. You need to specify the buffer */ int LNat_Win_Socket_Udp_Send(OsSocket * s, const char * host_addr, short int port, char * buf, int amt, int * amt_sent) { return LNat_Common_Socket_Udp_Send(s, host_addr, port, buf, amt, amt_sent); } /* This function will recieve data over a udp socket form address host_addr, and port port. You need to specify the buffer to store it in, and the amt you are expecting to receive. */ int LNat_Win_Socket_Udp_Recv(OsSocket * s, const char * host_addr, short int port, char * buf, int amt, int * amt_recv, int timeout_sec) { return LNat_Common_Socket_Udp_Recv(s, host_addr, port, buf, amt, amt_recv, timeout_sec); } /* This function takes an OsSocket object, host char*, and port, and initializes a connection to the host at port port. The OsSocket's variables will be returned through it's parameters. */ int LNat_Win_Socket_Connect(OsSocket ** s, const char * host_addr, short int port, int timeout_sec) { int blockMode = 1; /* flag to set socket to nonblock */ struct sockaddr_in server; /* socket address stuff */ struct hostent * hp; /* host stuff */ int ret; /* allocate a new OsSocket structure */ *s = (OsSocket *)malloc(sizeof(OsSocket)); if(*s == NULL) { return BAD_MALLOC; } /* initialize the winsock library */ if((ret = Initialize_Winsock_Library()) != OK) { free(*s); return ret; } /* open a tcp socket for the internet */ if(((*s)->sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) { WSACleanup(); /* call cleanup because user doesn't need to close sock */ free(*s); return SOCKET_INVALID; } /* we want a non-blocking socket so our select calls can timeout */ /* ioctlsocket returns nonzero on failure */ if(ioctlsocket((*s)->sock, FIONBIO, (u_long FAR*)&blockMode)) { WSACleanup(); /* call cleanup because user doesn't need to close sock */ return SOCKET_IOCTL_FAILURE; } /* initialize the address variable to tell connect where to connect to. It contains things like the port, host, and that it should connect over the internet */ if((ret = Initialize_Sockaddr_in(&server, &hp, host_addr, port)) != OK) { WSACleanup(); free(*s); return ret; } /* make the connection */ connect((*s)->sock, (struct sockaddr *)&server, sizeof(server)); if(Select_Till_Readywrite(*s, timeout_sec) != OK) { WSACleanup(); /* call cleanup because user doesn't need to close sock */ free(*s); return SOCKET_CONNECT_FAILED; } return OK; } /* close the socket and call WSACleanup. WSACleanup will either unload the winsock dll, or decrement a reference count to it if multiple WSAStartups are still active. Need one cleanup per startup. */ int LNat_Win_Socket_Close(OsSocket ** s) { (void)closesocket((*s)->sock); WSACleanup(); free(*s); return OK; } /* function to send the data of length amt, in buffer buf, over a connected socket s. If send is successful, return OK. set the amount actually sent in amt_sent parameter */ int LNat_Win_Socket_Send(OsSocket * s, char * buf, int amt, int * amt_sent) { return LNat_Common_Socket_Send(s, buf, amt, amt_sent); } /* function to recv the data of length amt, into an already allocated buffer buf, over a connected socket s. If recv is successful, return oK. Set the amount actually recieved in amt_recv parameter */ int LNat_Win_Socket_Recv(OsSocket * s, char * buf, int amt, int * amt_recv, int timeout_sec) { return LNat_Common_Socket_Recv(s, buf, amt, amt_recv, timeout_sec); } /* get the local ip address from a connected socket */ int LNat_Win_Get_Local_Ip(OsSocket * s, char ** local_ip) { return LNat_Common_Get_Local_Ip(s, local_ip); } /* function to initialize the winsock library, and validate that we are using the correct version of the library. */ static int Initialize_Winsock_Library() { WORD wVersionRequested; /* socket dll version info */ WSADATA wsaData; /* data for socket lib initialization */ /* we need to call WSAStartup before we try to use any of the winsock dll calls. Request version 1.1 of winsock */ wVersionRequested = MAKEWORD(2, 2); if(WSAStartup(wVersionRequested, &wsaData) != 0) { WSACleanup(); /* call cleanup because user doesn't need to close sock */ return SOCKET_WSASTARTUP_FAILED; } /* make sure we are using the correct winsock library */ if(Is_Valid_Library(&wsaData) != OK) { WSACleanup(); /* call cleanup because user doesn't need to close sock */ return SOCKET_INVALID_LIB; } return OK; } /* function to take in a WSADATA structure that was set during the WSAStartup phase, and detect if we are using the winsock 1.1 version of the library or newer */ static Is_Valid_Library(WSADATA * wsaData) { float socklib_ver; socklib_ver = HIBYTE(wsaData->wVersion)/10.0F; socklib_ver += LOBYTE(wsaData->wVersion); if(socklib_ver < 2.2) { return SOCKET_INVALID_LIB; } return OK; } static int Initialize_Sockaddr_in(struct sockaddr_in* server, struct hostent** hp, const char * host_addr, short int port) { return Common_Initialize_Sockaddr_in(server, hp, host_addr, port); }
35.140078
84
0.658067
44164692d648084983560ab68fb0d7c59388bf35
2,945
h
C
include/kacanopen/master/utils.h
grzegorzludwa/kacanopen
6689f80c8b174530e400895541ae38d116c6a305
[ "BSD-3-Clause" ]
6
2020-05-22T04:48:18.000Z
2021-06-16T14:48:51.000Z
include/kacanopen/master/utils.h
grzegorzludwa/kacanopen
6689f80c8b174530e400895541ae38d116c6a305
[ "BSD-3-Clause" ]
2
2020-12-14T10:51:10.000Z
2020-12-15T11:46:17.000Z
include/kacanopen/master/utils.h
grzegorzludwa/kacanopen
6689f80c8b174530e400895541ae38d116c6a305
[ "BSD-3-Clause" ]
5
2019-02-19T23:39:08.000Z
2021-06-16T14:48:56.000Z
/* * Copyright (c) 2015, Thomas Keh * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #pragma once #include "kacanopen/master/types.h" #include <cstdint> #include <string> namespace kaco { /// This class provides various static utility functions. struct Utils { /// Converts data types to a string. static std::string type_to_string(Type type); /// Converts CanOpen data types to a string. static std::string data_type_to_string(DataType type); /// Returns the size of a data type in bytes. static uint8_t get_type_size(Type type); /// Maps type codes from an EDS file to a data type /// \see enum DataType in types.h static Type type_code_to_type(uint16_t code); /// Converts entry names to lower case and replaces all spaces and '-' by /// underscores. static std::string escape(const std::string& str); /// Converts a string containing a hexadecimal numer to unsigned. static unsigned long long hexstr_to_uint(std::string str); /// Converts a string containing a decimal numer to unsigned. static unsigned long long decstr_to_uint(std::string str); /// Converts a string representation of AccessType from an EDS file to /// AccessType. static AccessType string_to_access_type(std::string str); /// Converts access types to a string. static std::string access_type_to_string(AccessType type); private: static const bool debug = false; }; } // end namespace kaco
37.75641
78
0.744312
67f72cc691999109e9c4ecd966d972aabe6f86b0
2,117
h
C
base/task_scheduler/scheduler_worker_pool_params.h
metux/chromium-deb
3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
base/task_scheduler/scheduler_worker_pool_params.h
metux/chromium-deb
3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
base/task_scheduler/scheduler_worker_pool_params.h
metux/chromium-deb
3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_ #define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_ #include "base/task_scheduler/scheduler_worker_params.h" #include "base/time/time.h" namespace base { class BASE_EXPORT SchedulerWorkerPoolParams final { public: enum class StandbyThreadPolicy { // Create threads as needed on demand, reclaimed as necessary. LAZY, // When possible, keep one idle thread alive on standby, reclaimed as // necessary. ONE, }; // Constructs a set of params used to initialize a pool. The pool will contain // up to |max_threads|. |standby_thread_policy| indicates whether an idle // thread should be kept alive on standby. |suggested_reclaim_time| sets a // suggestion on when to reclaim idle threads. The pool is free to ignore this // value for performance or correctness reasons. |backward_compatibility| // indicates whether backward compatibility is enabled. SchedulerWorkerPoolParams( StandbyThreadPolicy standby_thread_policy, int max_threads, TimeDelta suggested_reclaim_time, SchedulerBackwardCompatibility backward_compatibility = SchedulerBackwardCompatibility::DISABLED); SchedulerWorkerPoolParams(const SchedulerWorkerPoolParams& other); SchedulerWorkerPoolParams& operator=(const SchedulerWorkerPoolParams& other); StandbyThreadPolicy standby_thread_policy() const { return standby_thread_policy_; } int max_threads() const { return max_threads_; } TimeDelta suggested_reclaim_time() const { return suggested_reclaim_time_; } SchedulerBackwardCompatibility backward_compatibility() const { return backward_compatibility_; } private: StandbyThreadPolicy standby_thread_policy_; int max_threads_; TimeDelta suggested_reclaim_time_; SchedulerBackwardCompatibility backward_compatibility_; }; } // namespace base #endif // BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_
36.5
80
0.789797
52052b42743a8cabb00a6f3b80da0d6e92f364bd
750
h
C
AMPhotoBrowser/AMPhotoBrowser/Class/Photo/AMPhotoBrowserCell.h
AAAma/AMPhotoBrowser
ad25414168f05142780e5d97bbf10d34cb5efc57
[ "MIT" ]
null
null
null
AMPhotoBrowser/AMPhotoBrowser/Class/Photo/AMPhotoBrowserCell.h
AAAma/AMPhotoBrowser
ad25414168f05142780e5d97bbf10d34cb5efc57
[ "MIT" ]
null
null
null
AMPhotoBrowser/AMPhotoBrowser/Class/Photo/AMPhotoBrowserCell.h
AAAma/AMPhotoBrowser
ad25414168f05142780e5d97bbf10d34cb5efc57
[ "MIT" ]
null
null
null
// // AMPhotoBrowserCell.h // BaseProjectObjC // // Created by xiaoniu on 2018/7/12. // Copyright © 2018 AAAma. All rights reserved. // #import <UIKit/UIKit.h> #import <Masonry/Masonry.h> #import "AMMacroUtils.h" @class AMPhotoBrowserCell; @protocol AMPhotoBrowserCellDelegate <NSObject> - (void)browserCellClickEvent:(AMPhotoBrowserCell *)cell; - (void)browserDragDownForOpaque:(CGFloat)opaqueValue; - (void)browserDragDownStatus:(BOOL)drag; @end @interface AMPhotoBrowserCell : UICollectionViewCell @property (nonatomic, strong, readonly) UIImageView *imageView; @property (nonatomic, strong, readonly) UIScrollView *scrollView; @property (nonatomic, weak) id<AMPhotoBrowserCellDelegate> delegate; - (void)setupImage:(UIImage *)image; @end
27.777778
68
0.776
170f8de6a2746904702ae30b688d0a66dd880ec2
1,057
h
C
src/sdOrderingHandler.h
SpatDIF/SpatDIFLib
bf5d705cf1d62d4849a95a2197b0e9f77bbd2f3b
[ "BSD-2-Clause" ]
2
2016-11-19T03:32:54.000Z
2017-06-10T23:27:40.000Z
src/sdOrderingHandler.h
SpatDIF/SpatDIFLib
bf5d705cf1d62d4849a95a2197b0e9f77bbd2f3b
[ "BSD-2-Clause" ]
2
2017-04-19T15:07:51.000Z
2018-01-23T10:39:57.000Z
src/sdOrderingHandler.h
SpatDIF/SpatDIFLib
bf5d705cf1d62d4849a95a2197b0e9f77bbd2f3b
[ "BSD-2-Clause" ]
1
2017-11-09T14:18:20.000Z
2017-11-09T14:18:20.000Z
// // sdOrderingHandler.h // libSpatDIFTest // // Created by Chikashi Miyama on 23/09/16. // Copyright © 2016 ICST. All rights reserved. // #pragma once class sdOrderingHandler{ public: sdOrderingHandler(EOrdering ordering = EOrdering::SD_TIME):ordering(ordering){} const EOrdering &getOrdering(void) const{ return ordering; } std::string getOrderingAsString(void) const{ return ordering == EOrdering::SD_TIME ? std::string("time") : std::string("track"); // invoke move semantics bacause of rvalue } void setOrdering(const EOrdering &ordering ){ sdOrderingHandler::ordering = ordering; } void setOrdering(const std::string &ordering){ if(ordering == "time"){ sdOrderingHandler::ordering = EOrdering::SD_TIME; }else if(ordering == "track"){ sdOrderingHandler::ordering = EOrdering::SD_TRACK; }else{ throw InvalidDescriptorException(ordering); } } protected: EOrdering ordering; //!< ordering flag };
27.815789
134
0.644276
41d4dca2af97bef8b909716fd2374bd0428d1700
253
h
C
pyqt-env/lib/python3.8/site-packages/qt5_applications/Qt/lib/QtQuickTemplates2.framework/Versions/5/Headers/qtquicktemplates2version.h
rawheel/Tvshows-Listing-Desktop-App
9a47f866c8861990ae2d8355efd6cce8ce51fae3
[ "MIT" ]
null
null
null
pyqt-env/lib/python3.8/site-packages/qt5_applications/Qt/lib/QtQuickTemplates2.framework/Versions/5/Headers/qtquicktemplates2version.h
rawheel/Tvshows-Listing-Desktop-App
9a47f866c8861990ae2d8355efd6cce8ce51fae3
[ "MIT" ]
null
null
null
pyqt-env/lib/python3.8/site-packages/qt5_applications/Qt/lib/QtQuickTemplates2.framework/Versions/5/Headers/qtquicktemplates2version.h
rawheel/Tvshows-Listing-Desktop-App
9a47f866c8861990ae2d8355efd6cce8ce51fae3
[ "MIT" ]
null
null
null
/* This file was generated by syncqt. */ #ifndef QT_QTQUICKTEMPLATES2_VERSION_H #define QT_QTQUICKTEMPLATES2_VERSION_H #define QTQUICKTEMPLATES2_VERSION_STR "5.15.2" #define QTQUICKTEMPLATES2_VERSION 0x050F02 #endif // QT_QTQUICKTEMPLATES2_VERSION_H
25.3
46
0.841897
708da4f1f4330c85dcb7e4a0021b5fd3d5341c09
836
h
C
src/gui/widgets/controls/sliderwitheditint2.h
mhough/braingl
53e2078adc10731ee62feec11dcb767c4c6c0d35
[ "MIT" ]
5
2016-03-17T07:02:11.000Z
2021-12-12T14:43:58.000Z
src/gui/widgets/controls/sliderwitheditint2.h
mhough/braingl
53e2078adc10731ee62feec11dcb767c4c6c0d35
[ "MIT" ]
null
null
null
src/gui/widgets/controls/sliderwitheditint2.h
mhough/braingl
53e2078adc10731ee62feec11dcb767c4c6c0d35
[ "MIT" ]
3
2015-10-29T15:21:01.000Z
2020-11-25T09:41:21.000Z
/* * sliderwithedit.h * * Created on: 15.05.2012 * @author Ralph Schurade */ #ifndef SLIDERWITHEDITINT2_H_ #define SLIDERWITHEDITINT2_H_ #include <QFrame> class MySlider; class QLineEdit; class QPushButton; class SliderWithEditInt2 : public QFrame { Q_OBJECT public: SliderWithEditInt2( QWidget* parent = 0 ); virtual ~SliderWithEditInt2(); void setValue( int value ); int getValue(); void setMin( int min ); void setMax( int max ); public slots: void sliderMoved( int value ); void editEdited(); void minusPressed(); void plusPressed(); signals: void valueChanged( int value ); private: MySlider* m_slider; QLineEdit* m_edit; QPushButton* m_button1; QPushButton* m_button2; }; #endif /* SLIDERWITHEDITINT_H_ */
17.061224
47
0.649522
cb259830b99345940ab51eb1979a4d41efde1f06
1,421
h
C
ThirdParty/webrtc/src/webrtc/modules/audio_device/android/audio_common.h
JokeJoe8806/licode-windows
2bfdaf6e87669df2b9960da50c6800bc3621b80b
[ "MIT" ]
8
2018-12-27T14:57:13.000Z
2021-04-07T07:03:15.000Z
ThirdParty/webrtc/src/webrtc/modules/audio_device/android/audio_common.h
JokeJoe8806/licode-windows
2bfdaf6e87669df2b9960da50c6800bc3621b80b
[ "MIT" ]
1
2019-03-13T01:35:03.000Z
2020-10-08T04:13:04.000Z
ThirdParty/webrtc/src/webrtc/modules/audio_device/android/audio_common.h
JokeJoe8806/licode-windows
2bfdaf6e87669df2b9960da50c6800bc3621b80b
[ "MIT" ]
9
2018-12-28T11:45:12.000Z
2021-05-11T02:15:31.000Z
/* * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_COMMON_H_ #define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_COMMON_H_ namespace webrtc { enum { kDefaultSampleRate = 44100, kNumChannels = 1, // Number of bytes per audio frame. // Example: 16-bit PCM in mono => 1*(16/8)=2 [bytes/frame] kBytesPerFrame = kNumChannels * (16 / 8), // Delay estimates for the two different supported modes. These values // are based on real-time round-trip delay estimates on a large set of // devices and they are lower bounds since the filter length is 128 ms, // so the AEC works for delays in the range [50, ~170] ms and [150, ~270] ms. // Note that, in most cases, the lowest delay estimate will not be utilized // since devices that support low-latency output audio often supports // HW AEC as well. kLowLatencyModeDelayEstimateInMilliseconds = 50, kHighLatencyModeDelayEstimateInMilliseconds = 150, }; } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_COMMON_H_
39.472222
79
0.750176
27e44f77722b1337eae8d9b7ad9f0e77dd3d802c
3,585
h
C
drivers/temperature/MCP9804.h
f4deb/cen-electronic
74302fb38cf41e060ccaf9435ccd8e8792f3e565
[ "MIT" ]
1
2019-07-24T08:30:33.000Z
2019-07-24T08:30:33.000Z
drivers/temperature/MCP9804.h
f4deb/cen-electronic
74302fb38cf41e060ccaf9435ccd8e8792f3e565
[ "MIT" ]
126
2015-01-01T20:03:57.000Z
2018-05-06T19:55:31.000Z
drivers/temperature/MCP9804.h
f4deb/cen-electronic
74302fb38cf41e060ccaf9435ccd8e8792f3e565
[ "MIT" ]
9
2015-04-10T07:18:04.000Z
2020-11-04T11:40:21.000Z
#ifndef MCP_9804_H #define MCP_9804_H // void setRegMCP9804 ( UINT8 reg, UINT8 MSB , UINT8 LSB ); /******************************************************** * setConfRegMCP980 * * Envoie la valeur "MSB" et "LSB" au registre de * * configuration * * @param : MSB : Poid fort transfere dans le registre * * LSB : Poid faible transfere dans le registre* * @return : none * ********************************************************/ void setConfRegMCP9804(unsigned char MSB, unsigned char LSB); /******************************************************** * setTempUpperRegMCP9804 * * Envoie la valeur "MSB" et "LSB" au registre de * * Temperature haute * * @param : MSB : Poid fort transfere dans le registre * * LSB : Poid faible transfere dans le registre* * @return : none * ********************************************************/ void setTempUpperRegMCP9804(unsigned char MSB, unsigned char LSB); /******************************************************** * setTempLowerRegMCP9804 * * Envoie la valeur "MSB" et "LSB" au registre de * * Temperature basse * * @param : MSB : Poid fort transfere dans le registre * * LSB : Poid faible transfere dans le registre* * @return : none * ********************************************************/ void setTempLowerRegMCP9804(unsigned char MSB, unsigned char LSB); /******************************************************** * setTempCriticRegMCP9804 * * Envoie la valeur "MSB" et "LSB" au registre de * * Temperature critique * * @param : MSB : Poid fort transfere dans le registre * * LSB : Poid faible transfere dans le registre* * @return : none * ********************************************************/ void setTempCriticRegMCP9804(unsigned char MSB, unsigned char LSB); /**************************************************************** * initRegMCP9804 * * Envoie parametre de reglage du capteur * * Temperature critique * * @param : CONFMSB,CONFLSB : registre config * * TUPMSB , TUPLSB : registre temperature haute * * TLOWMSB , TLOWLSB : registre temperature basse * * TCRITMSB , TCRITLSB :registre temperature critique * * @return : none * ***************************************************************/ void initRegMCP9804(unsigned char CONFMSB, unsigned char CONFLSB, unsigned char TUPMSB, unsigned char TUPLSB, unsigned char TLOWMSB, unsigned char TLOWLSB, unsigned char TCRITMSB, unsigned char TCRITLSB); /**************************************************************** * ReadTempAmbMCP9804 * * Lit la temperature du capteur * * @param : * * @return : int temperature * ***************************************************************/ int ReadTempAmbMCP9804(void); #endif
48.445946
68
0.393305