repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
jamiejones85/ESP32-BMS
include/IO.h
#ifndef IO_H #define IO_H #define CHARGE_IN 39 #define DRIVE_IN 36 class IO { public: void setup(); bool isChargeEnabled(); bool isDriveEnabled(bool inverterInForwardReverse); void setChargeOverride(bool override); bool getChargeOverride(); private: bool chargeOverride; }; #endif
jamiejones85/ESP32-BMS
include/BmsCan.h
#ifndef BMS_CAN_H #define BMS_CAN_H #include <Arduino.h> #include <ACAN_ESP32.h> #include <ACAN2515.h> static const byte MCP2515_SCK = GPIO_NUM_18 ; // SCK input of MCP2515 static const byte MCP2515_SI = GPIO_NUM_23 ; // SI input of MCP2515 static const byte MCP2515_SO = GPIO_NUM_19 ; // SO output of MCP2515 static ...
natersoz/patterns
linked_list/linked_list.h
<gh_stars>0 /** * @file linked_list.h */ #pragma once #include <iterator> #include <type_traits> /** * @class linked_list * * A double-linked list data structure. Nodes are intended to be owned * by a specific client and are never kept within more than one list * at a time. Node ownership is held by the clien...
natersoz/patterns
observer/intrusive_list_member/observer.h
<reponame>natersoz/patterns<gh_stars>0 /** * @file observer.h */ #pragma once #include <boost/intrusive/list.hpp> /// Forward declare the Observable so that friendship can be established. template <typename NotificationType> class Observable; /** * @class Observer. * Observer implementation using boost::inclusiv...
natersoz/patterns
observer/intrusive_list_inherit/observable.h
/** * @file observable.h */ #pragma once #include <cstddef> #include "observer.h" /** * @class Observable * Use within a class as an aggregate implementation of the Observable 'Subject' * @see Design Patterns Gamma, Helm, et al. * 'Observer' pattern 'Subject' class. p. 294. * * @tparam NotificationType The t...
natersoz/patterns
observer/std_list/observer.h
/** * @file observer.h */ #pragma once /** * @class Observer. * Observer implementation using std::list. * * This interface defines the requirements of an Observer * that can be attached and detached to the Observable class. * Attached Observers receive event notifications from the Observable. * * @see Desi...
natersoz/patterns
observer/std_list/observable.h
/** * @file observable.h */ #pragma once #include <cstddef> #include <list> #include "observer.h" /** * @class Observable * Use within a class as an aggregate implementation of the Observable 'Subject' * @see Design Patterns Gamma, Helm, et al. * 'Observer' pattern 'Subject' class. p. 294. * * @tparam Notif...
natersoz/patterns
observer/linked_list/observer.h
/** * @file observer.h */ #pragma once #include "linked_list.h" /** * @class Observer. * Observer implementation using boost::inclusive::list. * * This interface defines the requirements of an Observer * that can be attached and detached to the Observable class. * Attached Observers receive event notification...
Omegaki113r/lv_port_esp32
main/main.c
/* You can either follow instruction from the https://github.com/lvgl/lv_port_esp32.git to clone the original repo and proceed with that OR you can use my fork of the above repo to follow along. THe latest code will be in my repo this is the command you need to use to clone my repo git ...
xiaowu2016/ZCButtonControl
ZCButtonControl/TableView.h
<filename>ZCButtonControl/TableView.h // // TableView.h // ZCButtonControl // // Created by zhangchao on 16/5/23. // Copyright © 2016年 zhangchao. All rights reserved. // #import <UIKit/UIKit.h> @protocol viewDelegate <NSObject> - (void)ShouldEnterDetailViewControllerWithItem:(id)item; @end typedef NS_ENUM(NSIn...
xiaowu2016/ZCButtonControl
ZCButtonControl/TableViewCell.h
// // TableViewCell.h // ZCButtonControl // // Created by zhangchao on 16/5/23. // Copyright © 2016年 zhangchao. All rights reserved. // #import <UIKit/UIKit.h> @interface TableViewCell : UITableViewCell @property (nonatomic,strong) NSString *model; @end
xiaowu2016/ZCButtonControl
ZCButtonControl/ZCControl/ZCBaseView.h
<reponame>xiaowu2016/ZCButtonControl // // ZCBaseView.h // ZCButtonControl // // Created by zhangchao on 16/5/26. // Copyright © 2016年 zhangchao. All rights reserved. // #import <UIKit/UIKit.h> @interface ZCBaseView : UIView /** * 当前显示的视图 */ @property (nonatomic,strong) UIView *currentView; /** * 通过传入的标题名,页面...
xiaowu2016/ZCButtonControl
ZCButtonControl/ZCControl/ZCBaseControl.h
// // ZCBaseControl.h // ZCButtonControl // // Created by zhangchao on 16/5/23. // Copyright © 2016年 zhangchao. All rights reserved. // #import <UIKit/UIKit.h> @interface ZCBaseControl : UIControl @property (nonatomic,assign) NSInteger selectIndex; @property (nonatomic,assign) NSInteger count; - (instancetype)in...
xiaowu2016/ZCButtonControl
ZCButtonControl/ZCControl/UIView+Masonry_ZC.h
// // UIView+Masonry_ZC.h // ZCButtonControl // // Created by zhangchao on 16/5/23. // Copyright © 2016年 zhangchao. All rights reserved. // #import <UIKit/UIKit.h> @interface UIView (Masonry_ZC) /** * 对传入的视图进行水平等间距布局 * * @param views 传入的视图数组 */ - (void)distributeSpacingHorizontallyWith:(NSArray*)views; /** ...
vishwavijet-mobinius/OpenTokStaticLib
OpenTokStaticLib/OpenTokStaticLib.h
// // OpenTokStaticLib.h // OpenTokStaticLib // // Created by vishwavijet on 9/30/16. // Copyright © 2016 <EMAIL>. All rights reserved. // #import <Foundation/Foundation.h> #import "OpenTokInitializer.h"
vishwavijet-mobinius/OpenTokStaticLib
OpenTokStaticLib/OpenTokInitializer.h
<filename>OpenTokStaticLib/OpenTokInitializer.h // // OpenTokInitializer.h // OpenTokStaticLib // // Created by vishwavijet on 9/30/16. // Copyright © 2016 <EMAIL>. All rights reserved. // #import <Foundation/Foundation.h> #import <OpenTok/OpenTok.h> @interface OpenTokInitializer : NSObject <OTSessionDelegate> +...
vishwavijet-mobinius/OpenTokStaticLib
Pods/OpenTok/OpenTok.framework/PrivateHeaders/OTNetworkDeviceManagement.h
// // OTNetworkDeviceManagement.h // otkit-objc-libs // // Created by <NAME> on 5/7/15. // // #import "OTSession.h" #ifndef otkit_objc_libs_OTNetworkDeviceManagement_h #define otkit_objc_libs_OTNetworkDeviceManagement_h @interface OTSession () /* */ + (void) setCellularEnabled:(BOOL) enabled; @end #endif
vishwavijet-mobinius/OpenTokStaticLib
Pods/Target Support Files/Pods-OpenTokStaticLib/Pods-OpenTokStaticLib-umbrella.h
#import <UIKit/UIKit.h> FOUNDATION_EXPORT double Pods_OpenTokStaticLibVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_OpenTokStaticLibVersionString[];
krishna116/libuv
src/unix/process.c
/* Copyright Joyent, Inc. and other Node contributors. 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 * righ...
unsat/gentree
igen/runner/ProgramRunnerMt.h
// // Created by kh on 3/25/20. // #ifndef IGEN4_PROGRAMRUNNERMT_H #define IGEN4_PROGRAMRUNNERMT_H #include <igen/Context.h> #include <igen/Config.h> #include <igen/runner/ProgramRunner.h> #include <klib/WorkQueue.h> #include <boost/timer/timer.hpp> #include <boost/thread/tss.hpp> #include <shared_mutex> namespac...
unsat/gentree
igen/Context.h
<gh_stars>1-10 // // Created by KH on 3/5/2020. // #ifndef IGEN4_CONTEXT_H #define IGEN4_CONTEXT_H #include <klib/common.h> #include <boost/container/flat_map.hpp> #include <boost/any.hpp> #include <z3++.h> #include "Z3Scope.h" namespace igen { class Domain; void intrusive_ptr_release(const Doma...
unsat/gentree
igen/c50/CNode.h
<reponame>unsat/gentree // // Created by KH on 3/7/2020. // #ifndef IGEN4_CNODE_H #define IGEN4_CNODE_H #include <boost/container/small_vector.hpp> #include <boost/range/sub_range.hpp> #include <igen/Config.h> namespace igen { class CTree; class CNode; using PCNode = ptr<const CNode>; using PMut...
unsat/gentree
igen/runner/OtterRunner.h
// // Created by kh on 4/12/20. // #ifndef IGEN4_OTTERRUNNER_H #define IGEN4_OTTERRUNNER_H #include <klib/common.h> #include <igen/Config.h> #include <boost/dynamic_bitset.hpp> #include <utility> namespace igen { class OtterRunner : public intrusive_ref_base_mt<OtterRunner> { public: static ptr<const OtterRunn...
unsat/gentree
klib/print_stl.h
// // Created by KH on 3/7/2020. // #ifndef IGEN4_PRINT_STL_H #define IGEN4_PRINT_STL_H #include <iostream> #include <iterator> #include <type_traits> #include <vector> #include <algorithm> #include <boost/container/container_fwd.hpp> #include <boost/intrusive_ptr.hpp> namespace klib::detail { temp...
unsat/gentree
klib/hash.h
<filename>klib/hash.h // // Created by KH on 3/5/2020. // #ifndef IGEN4_HASH_H #define IGEN4_HASH_H #include <boost/dynamic_bitset_fwd.hpp> #include <vector> namespace igen { struct hash_t : public std::pair<uint64_t, uint64_t> { using Base = std::pair<uint64_t, uint64_t>; using Base::Base; ...
unsat/gentree
igen/runner/ProgramRunner.h
<reponame>unsat/gentree // // Created by KH on 3/7/2020. // #ifndef IGEN4_PROGRAMRUNNER_H #define IGEN4_PROGRAMRUNNER_H #include <igen/Context.h> #include <igen/Config.h> #include <igen/builtin/programs.h> #include <igen/runner/OtterRunner.h> #include <boost/timer/timer.hpp> #include <boost/container/fl...
unsat/gentree
klib/logging.h
// // Created by KH on 3/5/2020. // #ifndef IGEN4_LOGGING_H #define IGEN4_LOGGING_H #include <glog/logging.h> #include <fmt/format.h> #include <fmt/ostream.h> #define GLOG(severity) COMPACT_GOOGLE_LOG_ ## severity.stream() #define GLOG_IF(severity, condition) \ static_cast<void>(0), \ !...
unsat/gentree
klib/WorkQueue.h
#ifndef IGEN4_WORKQUEUE_H #define IGEN4_WORKQUEUE_H #include "common.h" #include <algorithm> #include <deque> #include <condition_variable> #include <mutex> #include <thread> #include <utility> #include <vector> #include <boost/any.hpp> namespace igen { class WorkQueue { private: struct Item...
unsat/gentree
igen/builtin/programs.h
// // Created by KH on 3/7/2020. // #ifndef IGEN4_PROGRAMS_H #define IGEN4_PROGRAMS_H #include <klib/common.h> #include <igen/Config.h> namespace igen::builtin { str get_dom_str(str name); using BuiltinRunnerFn = std::function<set<str>(const igen::PConfig &config)>; BuiltinRunnerFn get_fn(str name...
unsat/gentree
klib/random.h
/* ______ ___ _ _______ ________ __ | ___ \/ _ \ | \ | | _ \ _ | \/ | Random for modern C++ | |_/ / /_\ \| \| | | | | | | | . . | | /| _ || . ` | | | | | | | |\/| | version 1.3.1 | |\ \| | | || |\ | |/ /\ \_/ / | | | \_| \_\_| |_/\_| \_/___/ \___/\_| |_/ https://github.com/effolkronium/random ...
unsat/gentree
benchmarks/1/ex_u1.c
<filename>benchmarks/1/ex_u1.c /* Example 7 variables: s,t,u,v,x,y,z 7 locs: L0,L1,L2,L2a,L3,L4,L5 Consists of unsupported interactions */ #include <stdlib.h> #include <stdio.h> int main(int argc, char **argv){ int s = atoi(argv[1]); int t = atoi(argv[2]); int u = atoi(argv[3]); int v = atoi(argv[4]...
unsat/gentree
klib/math.h
// // Created by KH on 3/7/2020. // #ifndef IGEN4_MATH_H #define IGEN4_MATH_H #include <cmath> namespace igen { inline double log2(double v) { return v <= 0 ? 0 : std::log2(v); } } #endif //IGEN4_MATH_H
unsat/gentree
igen/Location.h
// // Created by KH on 3/7/2020. // #ifndef IGEN4_LOCATION_H #define IGEN4_LOCATION_H #include "Context.h" #include <boost/iterator/iterator_adaptor.hpp> #include <klib/custom_container.h> #include <klib/StreamHash.h> namespace igen { class Config; class Location : public Object { public: e...
unsat/gentree
igen/c50/CTree.h
<gh_stars>1-10 // // Created by KH on 3/6/2020. // #ifndef IGEN4_CTREE_H #define IGEN4_CTREE_H #include <klib/common.h> #include <igen/Context.h> #include <igen/Location.h> #include <igen/Config.h> #include "CNode.h" namespace igen { class CTree : public Object { public: enum ExprStrat { ...
unsat/gentree
klib/StreamHash.h
<reponame>unsat/gentree // // Created by KH on 3/10/2020. // #ifndef IGEN4_STREAMHASH_H #define IGEN4_STREAMHASH_H #include <utility> #include "hash.h" namespace igen { class StreamHash { public: StreamHash(hash_t IV, uint32_t counter) : KEY(std::move(IV)), counter(counter) {} StreamHash(...
unsat/gentree
igen/builtin/impl.h
// // Created by KH on 3/7/2020. // #ifndef IGEN4_IMPL_H #define IGEN4_IMPL_H #include <klib/common.h> #include <igen/Config.h> #include <boost/container/flat_set.hpp> #include "programs.h" namespace igen::builtin { struct Program { str name; str vars; vec<int> dom; str src; s...
unsat/gentree
benchmarks/1/ex5.c
#include <stdio.h> #include <stdlib.h> int main(int argc,char **argv){ //config vars int a = atoi(argv[1]); int b = atoi(argv[2]); int c = atoi(argv[3]); int d = atoi(argv[4]); int e = atoi(argv[5]); printf("LS\n"); if(a==1){ printf("a1\n"); if (b==1){ printf("a1b1\n"); if (c==1)...
unsat/gentree
igen/Z3Scope.h
// // Created by KH on 3/5/2020. // #ifndef IGEN4_Z3SCOPE_H #define IGEN4_Z3SCOPE_H #include <z3++.h> namespace igen { class Z3Scope { public: explicit Z3Scope(z3::solver *s) : solver(s) { solver->push(); } explicit Z3Scope(z3::solver &s) : solver(&s) { solver->push(); } Z3Scope(Z3S...
unsat/gentree
igen/algo/Algo.h
// // Created by kh on 3/14/20. // #ifndef IGEN4_ALGO_H #define IGEN4_ALGO_H #include <klib/common.h> #include <boost/container/flat_map.hpp> #include <boost/any.hpp> namespace igen { // int run_interative_algorithm(const map<str, boost::any> &opts); map<str, boost::any> run_interative_algorithm_2(const map<str, ...
unsat/gentree
klib/vecutils.h
<reponame>unsat/gentree<filename>klib/vecutils.h // // Created by KH on 3/10/2020. // #ifndef IGEN4_VECUTILS_H #define IGEN4_VECUTILS_H #include <vector> namespace igen { template<class T> void vec_move_append(std::vector<T> &dst, std::vector<T> &src) { if (dst.empty()) { dst = std::move(s...
unsat/gentree
igen/runner/GCovRunner.h
<reponame>unsat/gentree // // Created by KH on 3/12/2020. // #ifndef IGEN4_GCOVRUNNER_H #define IGEN4_GCOVRUNNER_H #include <klib/common.h> #include <igen/Context.h> #include <boost/process/environment.hpp> #include <klib/enum.h> namespace igen { namespace details { BETTER_ENUM(GCovRunnerLanguage...
unsat/gentree
klib/custom_container.h
<gh_stars>1-10 // // Created by KH on 3/7/2020. // #ifndef IGEN4_CUSTOM_CONTAINER_H #define IGEN4_CUSTOM_CONTAINER_H namespace klib { template<typename ItType> class custom_iterable_container { public: custom_iterable_container(const ItType &begin, const ItType &end) : begin_(begin), end...
unsat/gentree
igen/CoverageStore.h
<reponame>unsat/gentree<filename>igen/CoverageStore.h // // Created by KH on 3/7/2020. // #ifndef IGEN4_COVERAGESTORE_H #define IGEN4_COVERAGESTORE_H #include "Context.h" #include "Location.h" #include "Config.h" #include <tsl/robin_map.h> namespace igen { class CoverageStore : public Object { publ...
unsat/gentree
kutil/kutil.h
<filename>kutil/kutil.h // // Created by kh on 3/31/20. // #ifndef IGEN4_KUTIL_H #define IGEN4_KUTIL_H #include <klib/common.h> namespace igen { int count_keys(str dbpath); } #endif //IGEN4_KUTIL_H
unsat/gentree
igen/Domain.h
// // Created by KH on 3/5/2020. // #ifndef IGEN4_DOMAIN_H #define IGEN4_DOMAIN_H #include "Context.h" #include <z3++.h> namespace igen { class Config; class VarDomain : public Object { private: friend class Domain; int id_; str name_; vec <std::string> labels_; private: ...
unsat/gentree
benchmarks/1/ex.c
<filename>benchmarks/1/ex.c<gh_stars>1-10 /* Example 7 variables: s,t,u,v,x,y,z 7 locs: L0,L1,L2,L2a,L3,L4,L5 iGen results 1. (0) true (conj): (1) L3 2. (2) (u=1 & v=1) (conj): (1) L4 3. (2) (x=1 & y=1) (conj): (1) L0 4. (2) (x=0 | y=0) (disj): (2) L2,L2a 5. (3) (x=1 & y=1 & z=0,3,4) (conj): (1) L1 ...
unsat/gentree
igen/Config.h
// // Created by KH on 3/5/2020. // #ifndef IGEN4_CONFIG_H #define IGEN4_CONFIG_H #include "Context.h" #include "Domain.h" #include "Location.h" #include <klib/hash.h> #include <boost/iterator/iterator_adaptor.hpp> namespace igen { class Location; class Config : public Object { public: exp...
unsat/gentree
klib/anyutils.h
<filename>klib/anyutils.h // // Created by kh on 5/10/20. // #ifndef IGEN4_ANYUTILS_H #define IGEN4_ANYUTILS_H #include <string> #include <boost/any.hpp> namespace igen { std::string any2string(const boost::any &anything); long any2long(const boost::any &anything); double any2double(const boost::any &anything); ...
unsat/gentree
benchmarks/1/ex_undetermined.c
/* Example 7 variables: s,t,u,v,x,y,z 7 locs: L0,L1,L2,L2a,L3,L4,L5 Consists of unsupported interactions */ #include <stdlib.h> #include <stdio.h> int main(int argc, char **argv){ int s = atoi(argv[1]); int t = atoi(argv[2]); int u = atoi(argv[3]); int v = atoi(argv[4]); int x = atoi(argv[5]); ...
lauripaulo/cx16-work
learn/hello.c
#include <conio.h> #include "second.h" const unsigned int addr = 0x1000; // cl65 -t cx16 -O -m helloc.map -o HELLOC.PRG hello.c // pointer to a memory address unsigned int *p_start = (unsigned int *) 0x2000; unsigned int *p_end = (unsigned int *) 0x2002; int main() { unsigned int indx; unsigned short int level[...
lauripaulo/cx16-work
old/hello/hello.h
/* Some declarations... */ void say_hello_alot();
lauripaulo/cx16-work
old/hello/hello.c
#include <cbm.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include "hello.h" extern const char text[]; /* In text.s */ extern const char head[]; /* In text.s */ int main() { cbm_k_bsout(0x8E); // fix emulator font problem printf("%s\n", head); say_hello_alot(); printf("%s...
lauripaulo/cx16-work
old/cballs/cballs.c
#include <cbm.h> #include <stdio.h> #include <stdlib.h> #include "cballs.h" extern const char text[]; /* In text.s */ int main() { cbm_k_bsout(0x8E); // fix emulator font problem printf("%s\n", text); return EXIT_SUCCESS; }
lauripaulo/cx16-work
old/hero/hero.c
<gh_stars>0 #include <stdint.h> #include <stdio.h> #include <cx16.h> #include <cbm.h> #include "hero.h" static void vpoke(uint8_t bank, uint16_t address, uint8_t data) { // Set port 0's address. VERA.control = 0; VERA.address_hi = bank; VERA.address = address; // Store data through port 0. VERA...
lauripaulo/cx16-work
old/hero/hero.h
struct _game_obj { uint16_t x; uint16_t y; uint16_t addr; uint16_t data_addr; uint8_t data[]; }; typedef struct _game_obj GameObj; static void vpoke(uint8_t bank, uint16_t address, uint8_t data); static void init_player(GameObj *p);
lauripaulo/cx16-work
learn/second.c
// implementation int add_test(unsigned short int a, unsigned short int b) { return a + b; }
lauripaulo/cx16-work
old/game/hero.c
#include <stdint.h> #include <stdio.h> #include <cx16.h> #include <cbm.h> /* $F0000 - $F001F Display composer registers */ #define DC_VIDEO_ADDR 0xF0000 #define DC_HSCALE_ADDR = 0xF0001 #define DC_VSCALE_ADDR = 0xF0002 #define DC_BORDER_COLOR_ADDR = 0xF0003 #define DC_HSTART_L_ADDR = 0xF0004 #define DC_HSTOP_L_ADDR =...
lauripaulo/cx16-work
old/cballs/cballs.h
/* Some declarations... */
lauripaulo/cx16-work
learn/second.h
<reponame>lauripaulo/cx16-work<gh_stars>0 // test call only int add_test(unsigned short int a, unsigned short int b);
marstr/azure-notificationhubs-ios
Samples/Objective-C/nhubsample/nhubsample/AppDelegate.h
<gh_stars>10-100 // // Copyright © 2018 Microsoft All rights reserved. // Licensed under the Apache License (2.0). // #import <UIKit/UIKit.h> #import <WindowsAzureMessaging/WindowsAzureMessaging.h> #import <UserNotifications/UserNotifications.h> @interface AppDelegate : UIResponder <UIApplicationDelegate,UNUserNot...
marstr/azure-notificationhubs-ios
Samples/Objective-C/nhubsample/nhubsample/Constants.h
<gh_stars>10-100 // // Copyright © 2018 Microsoft All rights reserved. // Licensed under the Apache License (2.0). // #ifndef Constants_h #define Constants_h extern NSString* const NHInfoConnectionString; extern NSString* const NHInfoHubName; extern NSString* const NHUserDefaultTags; #endif /* Constants_h */
marstr/azure-notificationhubs-ios
Samples/Objective-C/nhubsample/nhubsample/NotificationDetailViewController.h
<reponame>marstr/azure-notificationhubs-ios // // Copyright © 2018 Microsoft All rights reserved. // Licensed under the Apache License (2.0). // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface NotificationDetailViewController : UIViewController @property (strong, nonatomic) IBOutlet UILabel *titleLabel...
marstr/azure-notificationhubs-ios
Samples/Objective-C/nhubsample/nhubmodifier/NotificationService.h
// // Copyright © 2018 Microsoft All rights reserved. // Licensed under the Apache License (2.0). // #import <UserNotifications/UserNotifications.h> @interface NotificationService : UNNotificationServiceExtension @end
marstr/azure-notificationhubs-ios
Samples/Swift/nhubsample/nhubsample/nhubsample-Bridging-Header.h
<filename>Samples/Swift/nhubsample/nhubsample/nhubsample-Bridging-Header.h // // Copyright © 2018 Microsoft All rights reserved. // Licensed under the Apache License (2.0). // #import "WindowsAzureMessaging/WindowsAzureMessaging.h"
marstr/azure-notificationhubs-ios
Samples/Objective-C/nhubsample/nhubsample/ViewController.h
// // Copyright © 2018 Microsoft All rights reserved. // Licensed under the Apache License (2.0). // #import <UIKit/UIKit.h> #import <WindowsAzureMessaging/WindowsAzureMessaging.h> #import <UserNotifications/UserNotifications.h> @interface ViewController : UIViewController @property (strong, nonatomic) IBOutlet UI...
yapingxin/DevSpace-Daemon
Daemon-Prototype/Server/Code/utility/http_response.c
#include "http_response.h" #include <stdio.h> #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <ctype.h> #include <strings.h> #include <string.h> #include <sys/stat.h> #include <pthread.h> #include <sys/wait.h> #include <stdlib.h> #include "ser...
yapingxin/DevSpace-Daemon
Daemon-Prototype/Server/Code/utility/logfunc.c
#include "logfunc.h" #include <stdio.h> #include <stdlib.h> static FILE *global_log_file; static void file_output_close(void); static void file_output_callback(const zf_log_message *msg, void *arg); void file_output_open(const char *const log_path) { global_log_file = fopen(log_path, "a"); if (!global_log_file) {...
yapingxin/DevSpace-Daemon
Daemon-Prototype/Server/Code/utility/logfunc.h
#ifndef _UTILITY_LOGFUNC_H_ #define _UTILITY_LOGFUNC_H_ #include "service_config.h" //#define ZF_LOG_LEVEL ZF_LOG_INFO //#define ZF_LOG_TAG "MAIN" #include "../lib/log/zf_log.h" void file_output_open(const char *const log_path); #endif // _UTILITY_LOGFUNC_H_
yapingxin/DevSpace-Daemon
Daemon-Prototype/Server/Code/utility/recvlogic.h
#ifndef _UTILITY_RECVLOGIC_H_ #define _UTILITY_RECVLOGIC_H_ int startup(unsigned short port); void mainloop_recv(const int server_sockfd); void error_die(const char *msg); int disable_tcp_nagle(int sockfd); int setsockopt_timeout(int sockfd, int timeout_seconds); #endif // _UTILITY_RECVLOGIC_H_
yapingxin/DevSpace-Daemon
Daemon-Prototype/Server/Code/utility/http_response.h
#ifndef _UTILITY_HTTP_RESPONSE_H_ #define _UTILITY_HTTP_RESPONSE_H_ #include <stdio.h> #define SERVER_STRING "Server: Tiny HTTP Application Server/0.2.1\r\n" void default_http_response(const int client_sockfd, const char * msg); #endif // _UTILITY_HTTP_RESPONSE_H_
yapingxin/DevSpace-Daemon
Daemon-Prototype/Server/Code/utility/main.c
#include <stdio.h> #include "service_config.h" #include "logfunc.h" #include "recvlogic.h" #include "http_response.h" /**********************************************************************/ int main(int argc, char *argv[]) { int server_sockfd = -1; server_sockfd = startup(main_service_port); file_output_open(g...
yapingxin/DevSpace-Daemon
Daemon-Prototype/Server/Code/utility/recvlogic.c
<gh_stars>0 /* Socket Server Header Begin */ #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <ctype.h> #include <strings.h> #include <string.h> #include <sys/stat.h> #include <sys/wait.h> #include <pthread...
yapingxin/DevSpace-Daemon
Daemon-Prototype/Server/Code/utility/service_config.h
#ifndef _UTILITY_SERVICE_CONFIG_H_ #define _UTILITY_SERVICE_CONFIG_H_ #define main_service_port 8001 #define global_log_file_path "/home/yapingxin/DevSpace/log/Daemon-Prototype/Server.log" #define accept_line_buf_size 10240 #define out_to_browser_buf_size 10240 #define accept_method_buf_size 16 #define accept_url...
lvxchild/Pomodoro
Pomodoro.c
#include<stdio.h> #include <windows.h> void doCountdown(), startWork(int workTime), startBreak(int breakTime); int main() { int i, numberOfSessions, workTime, breakTime; printf("P O M O D O R O\nWelcome to this simple Pomodoro app. Enough talking, let's start.\nHow many sessions do you want to do? "); ...
ErickSilv/bares
include/token.h
<reponame>ErickSilv/bares #ifndef _TOKEN_H_ #define _TOKEN_H_ #include <string> // std::string #include <iostream> // std::ostream /// Represents a token. struct Token { public: enum class token_t : int { OPERAND = 0, // Basically numbers. OPERATOR, // "+", "-", ...
ErickSilv/bares
include/bares.h
<reponame>ErickSilv/bares<filename>include/bares.h #ifndef BARES_H_ #define BARES_H_ #include <stack> // stack #include <string> // string #include <cassert> // assert #include <cmath> // pow #include <stdexcept> // std::runtime_error #include "parser.h" #include "token.h" // To help change type if we ...
sophgo/tpu_compiler
include/tpuc/QuantizationArithmetic.h
//===- Passes.h - Pass Entrypoints ------------------------------*- C++ -*-===// // // Copyright 2019 The MLIR Authors. // // 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....
sophgo/tpu_compiler
include/tpuc/Support/PixelHelper.h
//===- FileUtilities.h - utilities for working with tensor files -------*- C++ -*-===// // // Copyright 2019 The MLIR Authors. // // 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 // // htt...
sophgo/tpu_compiler
include/tpuc/CustomOpParam.h
<reponame>sophgo/tpu_compiler<gh_stars>1-10 #ifndef CVI_CUSTOM_OP_PARAMETER_H #define CVI_CUSTOM_OP_PARAMETER_H #include <iostream> #include <string> #include <vector> #include <map> #include <typeinfo> #include <memory> #include <assert.h> namespace cvi { class FieldBase { public: FieldBase(const char *signature) ...
sophgo/tpu_compiler
lib/Dialect/TPU/Optimization/GraphOpt.h
<filename>lib/Dialect/TPU/Optimization/GraphOpt.h #pragma once #include <memory> #include <vector> #include <list> #include "tpuc/Dialect/TPU/TPUDialect.h" #include "tpuc/Passes.h" #include "tpuc/MachineInfo.h" #include "tpuc/Support/TensorFile.h" #include "tpuc/TPUOperationSupport.h" #include "tpuc/TPUTensorSupport.h...
sophgo/tpu_compiler
lib/Dialect/TPU/Backend/include/backend/backend_tg_api.h
/* * Copyright (C) Cvitek Co., Ltd. 2019-2020. All rights reserved. * * File Name: backend_tg_api.h * Description: backend tensor global interface. */ #ifndef CVI_BACKEND_TG_API #define CVI_BACKEND_TG_API #include <backend/backend_common.h> void *cvi_backend_get_cvk_ctx(const CviBackendContext &ctx); /////////...
sophgo/tpu_compiler
include/tpuc/Passes.h
//===- Passes.h - Pass Entrypoints ------------------------------*- C++ -*-===// // // Copyright 2019 The MLIR Authors. // // 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....
sophgo/tpu_compiler
include/tpuc/TPUCompressUtil.h
//===- TPUCompress.h - TPU Compression -------------------------*- C++ -*-===// // // Copyright 2019 The MLIR Authors. // // 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....
sophgo/tpu_compiler
include/tpuc/NativeCpuImplementation.h
#ifndef MLIR_DIALECT_TPU_NATIVE_CPU_IMPLEMENTATION_H_ #define MLIR_DIALECT_TPU_NATIVE_CPU_IMPLEMENTATION_H_ #include "mkldnn.hpp" #include <unordered_map> using tag = mkldnn::memory::format_tag; using dt = mkldnn::memory::data_type; using cmdargs = std::unordered_map<int, mkldnn::memory>; class MKLConv { public: M...
sophgo/tpu_compiler
include/tpuc/GmemAllocatorMethod.h
#pragma once #include <set> #include <list> #include "tpuc/Dialect/TPU/TPUDialect.h" #include "tpuc/TPUOperationSupport.h" #include "tpuc/TPUTensorSupport.h" namespace mlir { class GmemBlock { public: int64_t start; uint64_t size; Operation *op; }; class GmemAllocatorMethod { public: GmemAllocatorMethod(std...
sophgo/tpu_compiler
examples/custom_op/code/my_add/MyAddOp.h
<filename>examples/custom_op/code/my_add/MyAddOp.h /* * Copyright (C) Cvitek Co., Ltd. 2019-2020. All rights reserved. */ #ifndef MYADD_OP_H_ #define MYADD_OP_H_ #include "tpuc/CustomOp.h" #include <cvikernel/cvikernel.h> namespace cvi { class MyAddOp : public CustomOp { public: MyAddOp(OpParam &param) : CustomO...
sophgo/tpu_compiler
include/tpuc/SimpleAnalysis.h
<gh_stars>1-10 //===- TpuOpStats.cpp - Implementation of TPU Op Stats ---------===// // // Copyright 2019 The MLIR Authors. // // 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://...
sophgo/tpu_compiler
lib/Dialect/TPU/Backend/Kernel/CviBackendContext.h
<gh_stars>1-10 /* * Copyright (C) Cvitek Co., Ltd. 2019-2020. All rights reserved. * * File Name: CviBackendContext.h * Description: */ #ifndef _BM18XX_BACKEND_CONTEXT_H_ #define _BM18XX_BACKEND_CONTEXT_H_ #include <vector> #include <cstring> #include <assert.h> #include <cvikernel/cvikernel.h> #include <backend...
sophgo/tpu_compiler
include/tpuc/ModuleInterpreter.h
<gh_stars>1-10 //===- ModuleInterpreter.h - Interpreter ------------------------------*- C++ //-*-===// // // Copyright 2019 The MLIR Authors. // // 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...
sophgo/tpu_compiler
lib/Dialect/TPU/Optimization/LayerGroup/LMemAllocMethod.h
<gh_stars>1-10 #pragma once #include "Group.hpp" #include "LayerStage.hpp" #include "NetGraph.hpp" #include "Tensor.hpp" #define TBD_LADDR 0xFFFFFFFF #define DEBUG_TYPE "group_ops" namespace mlir { class LMemAllocMethod { public: LMemAllocMethod(); virtual ~LMemAllocMethod(); virtual bmerr_t assign_local_memory...
sophgo/tpu_compiler
include/tpuc/MlirToCviModelTranslate.h
//===- buildCviModel.h - class for cvimodel ---------------------*- C++ -*-===// // // Copyright 2019 The MLIR Authors. // // 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....
sophgo/tpu_compiler
lib/Dialect/TPU/Backend/include/backend/backend_tl_api.h
<reponame>sophgo/tpu_compiler /* * Copyright (C) Cvitek Co., Ltd. 2019-2020. All rights reserved. * * File Name: backend_tl_api.h * Description: */ #ifndef CVI_BACKEND_TL_API #define CVI_BACKEND_TL_API #include <backend/backend_common.h> class CviBackendContext; void cvi_backend_tl_load( const CviBackendCo...
sophgo/tpu_compiler
lib/Dialect/TPU/Backend/include/backend/backend_common.h
/* * Copyright (C) Cvitek Co., Ltd. 2019-2020. All rights reserved. * * File Name: backend_common.h * Description: Intend to provide backend common functionality. */ #ifndef CVI_BACKEND_COMMON #define CVI_BACKEND_COMMON #include "cvikernel/cvikernel.h" enum CVI_CHIP_INFO_E { CVI_CHIP_VERSION = 0, CVI_CHIP_N...
sophgo/tpu_compiler
include/tpuc/Dialect/TPU/TPUDialect.h
//===- TPUDialect.h - MLIR Dialect for TPU --------------*- C++ -*-===// // // Copyright 2019 The MLIR Authors. // // 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.o...
sophgo/tpu_compiler
include/tpuc/Interpreter/cpukernel.h
<filename>include/tpuc/Interpreter/cpukernel.h #ifndef INTERPRETER_CPU_CORE_H #define INTERPRETER_CPU_CORE_H #include <memory> #include <vector> #include "tpuc/TPUTensorSupport.h" #include "tpuc/TPUOperationSupport.h" #include "llvm/Support/raw_ostream.h" #include "mlir/IR/BuiltinOps.h" #include "mlir/Support/LLVM.h" ...
sophgo/tpu_compiler
include/tpuc/Support/TensorFile.h
<gh_stars>1-10 //===- FileUtilities.h - utilities for working with tensor files -------*- C++ -*-===// // // Copyright 2019 The MLIR Authors. // // 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...
sophgo/tpu_compiler
include/tpuc/CpuLayer_YoloDetection.h
#ifndef CPULAYER_YOLO_DETECTION_H #define CPULAYER_YOLO_DETECTION_H #define MAX_DET 200 #define MAX_DET_RAW 500 typedef struct box_ { float x, y, w, h; } box; typedef struct detection_ { box bbox; int cls; float score; } detection; static inline float exp_fast(float x) { union { unsigned int i...
sophgo/tpu_compiler
include/tpuc/GPUInplementation.h
<reponame>sophgo/tpu_compiler<gh_stars>1-10 #ifndef MLIR_DIALECT_GPU_IMPLEMENTATION_H_ #define MLIR_DIALECT_GPU_IMPLEMENTATION_H_ #ifdef USE_GPU #include <cuda.h> #include <cudnn.h> #include <iostream> #include <vector> #define CUDA_KERNEL_LOOP(i, n) \ for (int i = bl...
sophgo/tpu_compiler
lib/Dialect/TPU/Optimization/TgOpTile.h
<reponame>sophgo/tpu_compiler<filename>lib/Dialect/TPU/Optimization/TgOpTile.h #ifndef TG_OP_TILE_PASS_H #define TG_OP_TILE_PASS_H namespace mlir { namespace tpu { void PopulateSplitPoolPatterns(MLIRContext *context, OwningRewritePatternList *patterns, MIn...
sophgo/tpu_compiler
include/tpuc/CpuLayer_RetinaFaceDetection.h
<reponame>sophgo/tpu_compiler #ifndef CPULAYER_RETINAFACE_DETECTION_H_ #define CPULAYER_RETINAFACE_DETECTION_H_ struct AnchorCfg { public: AnchorCfg(int stride, std::vector<int> scales, int base_size, std::vector<float> ratios, int allowed_border) : stride(stride), scales(scales), base...