repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
SyedThaseemuddin/reference_apps
apps/pic32mz_ef_sk_meb2/audio_player/audio_player_lab5/firmware/src/config/default/gfx/libaria/inc/libaria_widget_label.h
// DOM-IGNORE-BEGIN /******************************************************************************* * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your ...
SyedThaseemuddin/reference_apps
apps/pic32mz_ef_sk_meb2/audio_player/audio_player_lab5/firmware/src/config/default/gfx/libaria/src/libaria_widget_radiobutton_skin_classic.c
<reponame>SyedThaseemuddin/reference_apps // DOM-IGNORE-BEGIN /******************************************************************************* * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclus...
SyedThaseemuddin/reference_apps
apps/sam_e70_xult/ftp_bootloader/firmware/src/third_party/wolfssl/wolfssl/wolfcrypt/src/port/pic32/crypt_sha256_sam11105.c
<gh_stars>0 /************************************************************************** Crypto Framework Library Source Company: Microchip Technology Inc. File Name: sha256_sam11105.c Summary: Crypto Framework Libarary source for cryptographic functions. Description: This sour...
SyedThaseemuddin/reference_apps
apps/pic32mz_ef_sk_meb2/audio_player/audio_player_lab5/firmware/src/config/default/gfx/hal/src/gfx_interface.c
// DOM-IGNORE-BEGIN /******************************************************************************* * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your ...
SyedThaseemuddin/reference_apps
apps/pic32mz_ef_sk_meb2/audio_player/audio_player_lab5/firmware/src/config/default/gfx/libaria/inc/libaria_utils.h
// DOM-IGNORE-BEGIN /******************************************************************************* * Copyright (C) 2020 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your ...
SyedThaseemuddin/reference_apps
apps/pic32mz_ef_curiosity_v2/getting_started_middleware/firmware/src/config/pic32mz_ef_curiosity2/peripheral/evic/plib_evic.h
/******************************************************************************* EVIC PLIB Header Company: Microchip Technology Inc. File Name: plib_evic.h Summary: PIC32MZ Interrupt Module PLIB Header File Description: None *************************************************...
SyedThaseemuddin/reference_apps
apps/pic32mz_ef_curiosity_v2/sdcard_player/firmware/src/app_sdcard_audio_task.h
<reponame>SyedThaseemuddin/reference_apps<filename>apps/pic32mz_ef_curiosity_v2/sdcard_player/firmware/src/app_sdcard_audio_task.h /******************************************************************************* MPLAB Harmony Application Header File Company: Microchip Technology Inc. File Name: a...
SyedThaseemuddin/reference_apps
apps/pic32mz_ef_curiosity_v2/wifi_rgb_easy_configuration/firmware/src/rgb_cree_led.c
/******************************************************************************* * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your * responsibility to ...
SyedThaseemuddin/reference_apps
apps/pic32mz_ef_curiosity_v2/wifi_rgb_easy_configuration/firmware/src/config/default/driver/winc/stack_driver/wdrv_winc_itf_proxy.c
/******************************************************************************* WINC MAC Driver TCP/IP Interface Proxy Implementation File Name: wdrv_winc_itf_proxy.c Summary: Wireless driver PIC32 implementation for WINC support. Description: Wireless driver PIC32 implementation for WINC suppor...
code2love/SpaceNavigation
src/vi_processor_impl_local.h
<filename>src/vi_processor_impl_local.h // Header of local implementation, same as in homework 2 // be sure class is defined #ifndef __VI_PROCESSOR_IMPL_LOCAL_H #define __VI_PROCESSOR_IMPL_LOCAL_H // includes #include "vi_processor_base.h" // parent class /** * local implementation */ class VI_Processor_Impl_Local ...
code2love/SpaceNavigation
vi_processor_base.h
<gh_stars>0 #ifndef __VI_PROCESSOR_BASE_H #define __VI_PROCESSOR_BASE_H #define EIGEN_USE_BLAS #define EIGEN_USE_LAPACKE #include "Eigen/Sparse" #include "cnpy.h" #include <mpi.h> #include <string> #include <memory> #include <iostream> #define VI_PROCESSOR_DEBUG /// /// \brief Value Iteration data arguments /// ...
code2love/SpaceNavigation
src/vi_processor_base.h
// Header of Base class for all implementations // be sure class is defined #ifndef __VI_PROCESSOR_BASE_H #define __VI_PROCESSOR_BASE_H // be sure Eigen uses BLAS and LAPACKE #define EIGEN_USE_BLAS #define EIGEN_USE_LAPACKE #define VI_PROCESSOR_DEBUG // includes #include "Eigen/Sparse" // for 'numpy-similar' operation...
code2love/SpaceNavigation
vi_processor_impl_distr_01.h
#ifndef __VI_PROCESSOR_IMPL_DISTR_H #define __VI_PROCESSOR_IMPL_DISTR_H #include "vi_processor_base.h" class VI_Processor_Impl_Distr_01 : public VI_Processor_Base { protected: void value_iteration_impl( Eigen::Ref<Eigen::VectorXi> Pi, Eigen::Ref<Eigen::VectorXf> J, const Eigen::Ref...
code2love/SpaceNavigation
vi_processor_impl_local.h
<filename>vi_processor_impl_local.h #ifndef __VI_PROCESSOR_IMPL_LOCAL_H #define __VI_PROCESSOR_IMPL_LOCAL_H #include "vi_processor_base.h" class VI_Processor_Impl_Local : public VI_Processor_Base { protected: void value_iteration_impl( Eigen::Ref<Eigen::VectorXi> Pi, Eigen::Ref<Eigen::Vecto...
code2love/SpaceNavigation
src/vi_processor_impl_distr_02.h
<gh_stars>0 // Header of second implementation // be sure class is defined #ifndef __VI_PROCESSOR_IMPL_DISTR_02_H #define __VI_PROCESSOR_IMPL_DISTR_02_H // includes #include "vi_processor_base.h" // parent class /** * second implementation */ class VI_Processor_Impl_Distr_02 : public VI_Processor_Base { public: ...
MatrixOrbital/EVE-Knob
Arduino_AL.h
// This file acts as a header for the .ino file. Since the .ino file is the hardware abstraction layer // in Arduino world, it also contains prototypes for abstracted hardware calls in addition to prototypes // for abstracted time functions which in other compilers would just be other .c and .h files #ifndef __ARDUIN...
MatrixOrbital/EVE-Knob
Eve2_81x.h
#ifndef __EVE81X_H #define __EVE81X_H // ===================================================================================== // Required Functions - Hardware driver or otherwise environment specific. Abstracted | // and found in ArduinoAL.h or whatever the abstraction layer is called in your world. | // This librar...
MatrixOrbital/EVE-Knob
process.h
<reponame>MatrixOrbital/EVE-Knob #ifndef PROCESS_H #define PROCESS_H #ifdef __cplusplus extern "C" { #endif void MakeScreen_Calibrate(void); void MakeScreen_Gauge(uint16_t Val); uint32_t Load_JPG(uint32_t BaseAdd, uint32_t Options, char *filename); #ifdef __cplusplus } #endif #endif
MatrixOrbital/EVE-Knob
MatrixEve2Conf.h
//User selectable configurations. //#define EVE2_70 //#define EVE2_50 //#define EVE2_43 //#define EVE2_38 #define EVE2_35 //#define EVE2_29 #ifdef EVE2_70 #define HCYCLE 928 #define HOFFSET 88 #define HSYNC0 0 #define HSYNC1 48 #define VCYCLE 525 #define VOFFSET 32 #define VSY...
MatrixOrbital/EVE-Knob
process.c
// Process.c is the application layer. All function calls are hardware ambivalent. #include <stdint.h> // Find integer types like "uint8_t" #include "Eve2_81x.h" // Matrix Orbital Eve2 Driver #include "Arduino_AL.h" // include the hardware specific abstraction layer header for the ...
wrathematics/pbdSBASE
src/petsc_test.c
<filename>src/petsc_test.c #include "sbase.h" #include <stdlib.h> SEXP sbase_petsc_test_rmat(SEXP dim, SEXP ldim, SEXP data, SEXP row_ptr, SEXP col_ind) { SEXP rmat; Mat mat; PetscErrorCode ierr; // build petsc matrix mat = sbase_convert_r_to_petsc(dim, ldim, data, row_ptr, col_ind); // Print mat...
wrathematics/pbdSBASE
src/petsc_comm.c
<filename>src/petsc_comm.c<gh_stars>0 /* This Source Code Form is subject to the terms of the BSD 2-Clause * License. If a copy of the this license was not distributed with this * file, you can obtain one from http://opensource.org/licenses/BSD-2-Clause. */ // Copyright 2014, Schmidt #include "sbase.h" // Start ...
wrathematics/pbdSBASE
src/petsc_invert.c
/* This Source Code Form is subject to the terms of the BSD 2-Clause * License. If a copy of the this license was not distributed with this * file, you can obtain one from http://opensource.org/licenses/BSD-2-Clause. */ // Copyright 2014, Schmidt #include "sbase.h" // From the PETSc FAQ: /* The inverse of a m...
wrathematics/pbdSBASE
src/petsc_printing.c
<reponame>wrathematics/pbdSBASE /* This Source Code Form is subject to the terms of the BSD 2-Clause * License. If a copy of the this license was not distributed with this * file, you can obtain one from http://opensource.org/licenses/BSD-2-Clause. */ // Copyright 2014, Schmidt #include "sbase.h" /*#define PM(id,r...
wrathematics/pbdSBASE
src/petsc_read_file.c
/* This Source Code Form is subject to the terms of the BSD 2-Clause * License. If a copy of the this license was not distributed with this * file, you can obtain one from http://opensource.org/licenses/BSD-2-Clause. */ // Copyright 2014, Schmidt //FIXME #include "sbase.h" SEXP sbase_petsc_test() { Mat ...
wrathematics/pbdSBASE
src/petsc_converters.c
/* This Source Code Form is subject to the terms of the BSD 2-Clause * License. If a copy of the this license was not distributed with this * file, you can obtain one from http://opensource.org/licenses/BSD-2-Clause. */ // Copyright 2014, Schmidt #include "sbase.h" #include <stdlib.h> // ------------------------...
wrathematics/pbdSBASE
src/sbase.h
#ifndef __SBASE_GLOBAL__ #define __SBASE_GLOBAL__ #include <RNACI.h> #include <petscmat.h> #define SBASEERR -1 #define R_ret_0 SEXP ret;PROTECT(ret=allocVector(INTSXP,1));INTEGER(ret)[0]=0;UNPROTECT(1);return ret #define RETSBASEERR SEXP SBASEERRVAL;PROTECT(SBASEERRVAL=allocVector(INTSXP,1));INTEGER(SBASEERRVAL)...
wrathematics/pbdSBASE
src/slepc_comm.c
<reponame>wrathematics/pbdSBASE<gh_stars>0 /* This Source Code Form is subject to the terms of the BSD 2-Clause * License. If a copy of the this license was not distributed with this * file, you can obtain one from http://opensource.org/licenses/BSD-2-Clause. */ // Copyright 2014, Schmidt #include "sbase.h" // S...
wrathematics/pbdSBASE
src/petsc_special.c
<reponame>wrathematics/pbdSBASE /* This Source Code Form is subject to the terms of the BSD 2-Clause * License. If a copy of the this license was not distributed with this * file, you can obtain one from http://opensource.org/licenses/BSD-2-Clause. */ // Copyright 2014, Schmidt #include "sbase.h" // does what it...
wrathematics/pbdSBASE
src/petsc_blas.c
/* This Source Code Form is subject to the terms of the BSD 2-Clause * License. If a copy of the this license was not distributed with this * file, you can obtain one from http://opensource.org/licenses/BSD-2-Clause. */ // Copyright 2014, Schmidt #include "sbase.h" SEXP sbase_petsc_matmatmult(SEXP A_dim, SEXP A_l...
wrathematics/pbdSBASE
src/petsc_convert_storage.c
<reponame>wrathematics/pbdSBASE<filename>src/petsc_convert_storage.c /* This Source Code Form is subject to the terms of the BSD 2-Clause * License. If a copy of the this license was not distributed with this * file, you can obtain one from http://opensource.org/licenses/BSD-2-Clause. */ // Copyright 2014, Schmidt ...
adujovic/JorG
JorGpi/tests/crun/sum/sum.h
<reponame>adujovic/JorG #ifndef _SUM_H #define _SUM_H #include <iostream> extern "C" int sum(int,int); #endif
adujovic/JorG
JorGpi/asa/asa.h
<filename>JorGpi/asa/asa.h #ifndef _ASA_H #define _ASA_H #include <iostream> #include <memory> #include <type_traits> #include <vector> #include <array> #include <gsl/gsl_siman.h> namespace gsl{ class SimulatedAnnealing{ public: SimulatedAnnealing(); virtual ~SimulatedAnnealing(); typedef gsl_siman_par...
adujovic/JorG
JorGpi/asa/solver/aux.h
<gh_stars>1-10 #ifndef _AUX_H #define _AUX_H #include <bitset> #include <limits> #include <tuple> #include <vector> #include <fstream> #include <iostream> #include <string> #include <cmath> namespace aux{ template<typename VectorType> std::pair<double,double> map_geometry(const std::vector<std::tuple<size_t,VectorType...
adujovic/JorG
JorGpi/asa/solver/solver.h
#ifndef _SOLVER_H #define _SOLVER_H #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <array> #include <unordered_set> #include <numeric> #include <random> #include <regex> #include <cmath> #include <cstring> #include <string> #include "../asa.h" #include "../ising.h" #include ".....
adujovic/JorG
JorGpi/asa/ising.h
#ifndef _ISING_H #define _ISING_H #include <iostream> #include <tuple> #include <array> #include <vector> #include <bitset> #include <algorithm> #include <random> #include <string> #include <memory> #include <limits> #include <type_traits> #ifdef _OPENMP #include <valarray> #include <omp.h> #endif #include "asa.h...
adujovic/JorG
JorGpi/tests/crun/loop/loop.h
<filename>JorGpi/tests/crun/loop/loop.h #ifndef _LOOP_H #define _LOOP_H #include <iostream> extern "C" int loop(int); #endif
adujovic/JorG
JorGpi/tests/crun/hello/hello.h
<gh_stars>1-10 #ifndef _HELLO_H #define _HELLO_H #include <iostream> extern "C" void hello(); #endif
adujovic/JorG
JorGpi/asa/arithmeticvector.h
<filename>JorGpi/asa/arithmeticvector.h #ifndef ARITHMETICVECTOR_H #define ARITHMETICVECTOR_H #include <iostream> #include <array> #include <initializer_list> #include <exception> #include <cmath> #include <type_traits> namespace celerium{ //ArithmeticVectorN = N-dimensional vector of type T template<size_t N,typ...
adujovic/JorG
JorGpi/tests/crun/pi/pi.h
<reponame>adujovic/JorG<filename>JorGpi/tests/crun/pi/pi.h #ifndef _PI_MANDELBROT #define _PI_MANDELBROT #include <complex> #include <cstdio> typedef std::complex<double> complex; int MandelbrotCalculate(const complex& c, int maxiter); extern "C" void mandelbrot(int width = 78, int height = 44); #endif
adujovic/JorG
JorGpi/asa/dising.h
#ifndef _D_ISING_H #define _D_ISING_H #include "ising.h" #include <memory> namespace ising{ std::unique_ptr< ising::AbstractIsingModel > factoryIsing(const size_t& N); } //end of namespace ising #endif
jamiedevsandbox/software_dev_projects
endian.c
/* endian.c (conforms to C89/90 standards) */ /* use valgrind to test for memory leaks/performance issue/code bottlenecks etc.. */ #include <stdio.h> void test_endian(); unsigned short cpu_endian_test(); unsigned short cpu_endian(const int); /* supply custom address as argument */ unsigned short cpu_endian(const int ...
zhoulincome/ZLTBActionSheet
Source/TBActionSheet/TBActionContainer.h
// // TBActionContainer.h // TBAlertControllerDemo // // Created by 杨萧玉 on 16/1/31. // Copyright © 2016年 杨萧玉. All rights reserved. // #import <UIKit/UIKit.h> @class TBActionSheet; NS_ASSUME_NONNULL_BEGIN /** * 容器类,用于包含所有按钮,可定制 header,custom 和 footer 三个 view */ @interface TBActionContainer : UIImageView @propert...
zhoulincome/ZLTBActionSheet
Source/Utils/TBMacro.h
// // TBMacro.h // TBAlertControllerDemo // // Created by skyline on 15/12/19. // Copyright © 2015年 杨萧玉. All rights reserved. // /* 宏字符串操作,避免在宏里面嵌套使用宏带来的问题 */ #define TB_stringify(STR) # STR #define TB_string_concat(A, B) A ## B /* * 用于防止在 Blocks 里面循环引用变量,并且无需改变变量名的写法。`TB_weakify` 和 `TB_strongify` 要搭配使用,`TB_wea...
zhoulincome/ZLTBActionSheet
Source/TBActionSheet/TBActionSheet.h
<reponame>zhoulincome/ZLTBActionSheet // // TBActionSheet.h // // Created by 杨萧玉 on 15/11/17. // Copyright © 2015年 杨萧玉. All rights reserved. // #import <UIKit/UIKit.h> #import "TBActionButton.h" NS_ASSUME_NONNULL_BEGIN @class TBActionContainer; @protocol TBActionSheetDelegate; @interface TBActionSheet : UIView @...
Nordstrom/node-leveldown
src/async.h
<reponame>Nordstrom/node-leveldown /* Copyright (c) 2012-2013 LevelDOWN contributors * See list at <https://github.com/rvagg/node-leveldown#contributing> * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE> */ #ifndef LD_ASYNC_H #define LD_ASYNC_H #include <node.h> #include...
Nordstrom/node-leveldown
src/iterator.h
/* Copyright (c) 2012-2013 LevelDOWN contributors * See list at <https://github.com/rvagg/node-leveldown#contributing> * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE> */ #ifndef LD_ITERATOR_H #define LD_ITERATOR_H #include <node.h> #include "leveldown.h" #include "dat...
Nordstrom/node-leveldown
src/database.h
<reponame>Nordstrom/node-leveldown<gh_stars>1-10 /* Copyright (c) 2012-2013 LevelDOWN contributors * See list at <https://github.com/rvagg/node-leveldown#contributing> * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE> */ #ifndef LD_DATABASE_H #define LD_DATABASE_H #inclu...
Nordstrom/node-leveldown
src/batch.h
#ifndef LD_BATCH_H #define LD_BATCH_H #include <vector> #include <node.h> #include <leveldb/write_batch.h> #include "database.h" namespace leveldown { class Batch : public node::ObjectWrap { public: static void Init(); static v8::Handle<v8::Value> NewInstance ( v8::Handle<v8::Object> database , v8::H...
Nordstrom/node-leveldown
src/leveldown.h
/* Copyright (c) 2012-2013 LevelDOWN contributors * See list at <https://github.com/rvagg/node-leveldown#contributing> * MIT +no-false-attribs License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE> */ #ifndef LD_LEVELDOWN_H #define LD_LEVELDOWN_H #include <node.h> #include <node_buffer.h> #include <l...
ricardokojo/MAC0219-2019
miniep2/matrix.h
<filename>miniep2/matrix.h /* Operações com matrizes. */ /* Isso aqui embaixo é um header guard. Serve para evitar dupla-inclusão * deste cabeçalho */ #ifndef _MATRIX_H #define _MATRIX_H /* Para usar booleanos em C */ #include <stdbool.h> #define FOR_EACH_DGEMM(i) for (i = 0; i < 3; ++i) /* Encha a matriz A com d...
ricardokojo/MAC0219-2019
ep1/subTestes.c
//Uns lixinhos que o sub quer guardar por enquanto pra consultar depois: // string line="oi"; // findings.at(0)->push_back(line); // for (std::vector<vector<string>*>::const_iterator i = findings.begin(); i != findings.end(); ++i){ // cout << (**i).size() << endl; // } //thrfunc: // pt...
ricardokojo/MAC0219-2019
miniep1/contention.c
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <math.h> #include <sys/time.h> // Used by make to substitute @#@IF with. Do not write any other @#@IF in this // code except by the ones already written #define IF_GT_MAX if(t->arr[i] > max) pthread_mutex_t lock; // protects max double max = -1; // ...
ricardokojo/MAC0219-2019
miniep4/bootstrap.h
<filename>miniep4/bootstrap.h #ifndef _BOOTSTRAP_H #define _BOOTSTRAP_H // Performs some useless memcpy and kernel launchs to "warmup" the GPU. // This was necessary as some people reported major delays in the first kernel // launches for some GPUs, probably due to initialization. void warm_gpu_up(void); // Tunes th...
ricardokojo/MAC0219-2019
miniep2/main.c
<reponame>ricardokojo/MAC0219-2019<gh_stars>1-10 /* Arquivo principal. * Programa criado para facilitar a coleta de dados a partir de um script. * Para pegar o tempo, basta ler o número impresso pelo stdout. */ #include "matrix.h" #include "time_extra.h" #include <stdio.h> #include <stdbool.h> #include <stdint.h> ...
ricardokojo/MAC0219-2019
miniep4/utils.h
#ifndef _UTILS_H #define _UTILS_H #include <stdio.h> #define ARR_SIZE 1000000 extern __device__ int GPU_WORK_ITERATIONS; #define DIV_CEIL_INT(x, y) (1 + (((x) - 1) / (y))) // Print an error message and exit with failure code #define DIE(...) \ { \ fprintf(stderr, __VA_ARGS__); \ fflush(stderr); \ ...
ricardokojo/MAC0219-2019
miniep2/test.c
/* Aqui é onde os testes são implementados */ #include "matrix.h" #include "time_extra.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /* Se o seu processador tiver pouco cache (muito lento), talvez seja prático * diminuir esse número. Use uma pot. de 2 */ #define N 2048 int main() { double *res...
ricardokojo/MAC0219-2019
miniep2/matrix.c
#include "matrix.h" #include <stdlib.h> /* Módulo de x*/ #define ABS(x) ((x > 0)? (x): -(x)) void matrix_fill_rand(unsigned n, double *restrict _A) { #define A(i, j) _A[n*(i) + (j)] int i, j; for (i = 0; i < n; ++i) for (j = 0; j < n; ++j) A(i, j) = 10*(double) rand() / (double) RAND_MAX;...
ricardokojo/MAC0219-2019
miniep2/time_extra.h
<gh_stars>1-10 #include <sys/time.h> /* Computa result = x - y. retorna 1 se result < 0*/ int timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y); /* Compara x e y. * Se x < y, retorna -1 * Se x > y, retorna 1 * Se x = y, retorna 0 */ in...
ricardokojo/MAC0219-2019
miniep2/time_extra.c
<reponame>ricardokojo/MAC0219-2019<filename>miniep2/time_extra.c<gh_stars>1-10 #include "time_extra.h" /*source: https://www.gnu.org/software/libc/manual/html_node/Elapsed-Time.html*/ /* Subtract the ‘struct timeval’ values X and Y, storing the result in RESULT. Return 1 if the difference is negative, otherwise...
ricardokojo/MAC0219-2019
miniep3/pi.c
<filename>miniep3/pi.c /* * pi.c * Approximates PI integrating the area of a quarter of circle with * riemann integration. * * by <NAME> and <NAME> * */ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <math.h> unsigned num_threads; // number of worker threads unsigned N...
ricardokojo/MAC0219-2019
ep2/add/add.c
#include <stdio.h> #include <stdlib.h> #define DIE(...) { \ fprintf(stderr, __VA_ARGS__); \ exit(EXIT_FAILURE); \ } #define ABS(x) ((x) < 0 ? (-x) : (x)) void cpu_add(REAL *a, REAL *b, REAL *c, unsigned n) { for (int i = 0; i < n; ++i) c[i] = a[i] + b[i]; } int check_add(REAL...
wirenboard/wb-mqtt-adc
src/file_utils.h
#pragma once #include <fstream> #include <functional> #include <vector> /** * @brief Try to open one of files listed in fnames. * * @param fnames Vector of filenames to try to open * @param file Reference to ifstream of openeded file. * @return true One of files is open succesfuly * @return false Nothing is ope...
wirenboard/wb-mqtt-adc
src/config.h
<filename>src/config.h #pragma once #include <wblib/log.h> #include "sysfs_adc.h" #include <string> #include <vector> //! ADC channel settings struct TADCChannelSettings { //! Topic name "/devices/DRIVER_NAME/controls/ + Id" std::string Id; //! Fnmatch-compatible pattern to match with iio:deviceN symlink...
wirenboard/wb-mqtt-adc
src/adc_driver.h
<reponame>wirenboard/wb-mqtt-adc<gh_stars>1-10 #pragma once #include <functional> #include <wblib/wbmqtt.h> #include <thread> #include "config.h" class TADCDriver { public: TADCDriver(const WBMQTT::PDeviceDriver& mqttDriver, const TConfig& config, WBMQTT::TLogger& ...
wirenboard/wb-mqtt-adc
src/moving_average.h
<gh_stars>1-10 #pragma once #include <stddef.h> #include <stdint.h> #include <vector> /** * @brief The class calculates moving average from given values. */ class TMovingAverageCalculator { std::vector<int32_t> LastValues; int32_t Sum; size_t Pos; bool Read...
wirenboard/wb-mqtt-adc
src/log.h
<reponame>wirenboard/wb-mqtt-adc<gh_stars>0 #pragma once #include <wblib/log.h> extern WBMQTT::TLogger ErrorLogger; extern WBMQTT::TLogger WarnLogger; extern WBMQTT::TLogger InfoLogger; extern WBMQTT::TLogger DebugLogger;
wirenboard/wb-mqtt-adc
src/sysfs_adc.h
#pragma once #include <wblib/log.h> #include <fstream> #include <chrono> #include <limits> #include "moving_average.h" #define ADC_DEFAULT_MAX_SCALED_VOLTAGE 3100 // voltage in mV #define MAX_ADC_VALUE 4094 // Maximum value that can be read from ADC /** * @brief Iterate over /sys/bus/iio/devices...
LuJun1012/kungfu
core/cpp/wingchun/include/kungfu/wingchun/strategy/strategy.h
// // Created by qlu on 2019/1/16. // #ifndef WINGCHUN_STRATEGY_H #define WINGCHUN_STRATEGY_H #include <string> #include <vector> #include <memory> #include <functional> #include <kungfu/practice/apprentice.h> #include <kungfu/wingchun/msg.h> namespace kungfu { namespace wingchun { namespace strateg...
LuJun1012/kungfu
core/cpp/wingchun/include/kungfu/wingchun/msg.h
<reponame>LuJun1012/kungfu // // Created by <NAME> on 2019-06-19. // #ifndef WINGCHUN_EVENT_H #define WINGCHUN_EVENT_H #include <cinttypes> #include <cmath> #include <string> #include <vector> #include <nlohmann/json.hpp> #include <kungfu/wingchun/common.h> #define FORMAT_DOUBLE(x) rounded(x, 4) namespace kungfu {...
LuJun1012/kungfu
core/extensions/xtp/src/td_gateway.h
// // Created by qlu on 2019/2/11. // #ifndef TD_GATEWAY_XTP_H #define TD_GATEWAY_XTP_H #include <memory> #include <string> #include <map> #include <kungfu/yijinjing/common.h> #include <kungfu/wingchun/msg.h> #include <kungfu/wingchun/gateway/trader.h> #include "xtp_trader_api.h" #include "order_mapper.h" namespac...
LuJun1012/kungfu
core/cpp/yijinjing/include/kungfu/practice/master.h
// // Created by <NAME> on 2019-06-15. // #ifndef KUNGFU_MASTER_H #define KUNGFU_MASTER_H #include <unordered_map> #include <kungfu/yijinjing/io.h> #include <kungfu/practice/hero.h> namespace kungfu { namespace practice { class master : public hero { public: master(yijinj...
LuJun1012/kungfu
core/cpp/wingchun/include/kungfu/wingchun/calendar/calendar.h
<gh_stars>1-10 // // Created by PolarAir on 2019-02-28. // #ifndef KUNGFU_CALENDAR_H #define KUNGFU_CALENDAR_H #include <string> namespace kungfu { namespace wingchun { class Calendar { public: virtual const std::string get_current_trading_day() const = 0; vi...
LuJun1012/kungfu
core/cpp/wingchun/include/kungfu/wingchun/strategy/context.h
<reponame>LuJun1012/kungfu<gh_stars>1-10 // // Created by <NAME> on 2019-06-20. // #ifndef WINGCHUN_CONTEXT_H #define WINGCHUN_CONTEXT_H #include <kungfu/practice/apprentice.h> #include <kungfu/wingchun/msg.h> #include <kungfu/wingchun/calendar/calendar.h> namespace kungfu { namespace wingchun { nam...
LuJun1012/kungfu
core/cpp/yijinjing/include/kungfu/yijinjing/io.h
/***************************************************************************** * Copyright [taurus.ai] * * 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/...
LuJun1012/kungfu
core/cpp/wingchun/include/kungfu/wingchun/util/business_helper.h
<gh_stars>1-10 // // Created by PolarAir on 2019-02-21. // // 与金融业务有关的一些简单公共函数 // #ifndef KUNGFU_BUSINESS_HELPER_H #define KUNGFU_BUSINESS_HELPER_H #include <string> #include <kungfu/yijinjing/time.h> #include <kungfu/yijinjing/io.h> #include <kungfu/wingchun/msg.h> #include <kungfu/wingchun/calendar/calendar.h> n...
LuJun1012/kungfu
core/cpp/wingchun/include/kungfu/wingchun/strategy/runner.h
// // Created by <NAME> on 2019-06-20. // #ifndef WINGCHUN_RUNNER_H #define WINGCHUN_RUNNER_H #include <kungfu/practice/apprentice.h> #include <kungfu/wingchun/strategy/context.h> #include <kungfu/wingchun/strategy/strategy.h> namespace kungfu { namespace wingchun { namespace strategy { ...
LuJun1012/kungfu
core/cpp/wingchun/include/kungfu/wingchun/common.h
<filename>core/cpp/wingchun/include/kungfu/wingchun/common.h<gh_stars>1-10 // // Created by <NAME> on 2019-06-19. // #ifndef WINGCHUN_COMMON_H #define WINGCHUN_COMMON_H #include <cmath> #define REGION_CN "CN" #define REGION_HK "HK" #define EXCHANGE_SSE "SSE" #define EXCHANGE_SZE "SZE" #define EXCHANGE_SHFE "SHFE" #...
LuJun1012/kungfu
core/cpp/yijinjing/include/kungfu/practice/apprentice.h
/***************************************************************************** * Copyright [taurus.ai] * * 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/...
LucProvoost/samplevnf
VNFs/DPPD-PROX/stats_latency.h
<filename>VNFs/DPPD-PROX/stats_latency.h /* // Copyright (c) 2010-2019 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...
LucProvoost/samplevnf
VNFs/DPPD-PROX/lconf.h
/* // Copyright (c) 2010-2017 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 la...
LucProvoost/samplevnf
VNFs/DPPD-PROX/stats_port.c
<filename>VNFs/DPPD-PROX/stats_port.c /* // Copyright (c) 2010-2017 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 ...
LucProvoost/samplevnf
VNFs/DPPD-PROX/prox_port_cfg.c
<gh_stars>0 /* // Copyright (c) 2010-2020 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 a...
LucProvoost/samplevnf
VNFs/DPPD-PROX/handle_classify.c
/* // Copyright (c) 2010-2017 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 la...
LucProvoost/samplevnf
VNFs/DPPD-PROX/display_rings.c
/* // Copyright (c) 2010-2017 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 la...
LucProvoost/samplevnf
VNFs/DPPD-PROX/prox_args.c
<gh_stars>0 /* // Copyright (c) 2010-2020 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 a...
LucProvoost/samplevnf
VNFs/DPPD-PROX/stats_latency.c
/* // Copyright (c) 2010-2019 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 la...
LucProvoost/samplevnf
VNFs/DPPD-PROX/prox_lua_types.c
<gh_stars>10-100 /* // Copyright (c) 2010-2017 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...
LucProvoost/samplevnf
VNFs/DPPD-PROX/rx_pkt.h
/* // Copyright (c) 2010-2020 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 la...
LucProvoost/samplevnf
VNFs/DPPD-PROX/main.c
<filename>VNFs/DPPD-PROX/main.c /* // Copyright (c) 2010-2020 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 // // ...
LucProvoost/samplevnf
VNFs/DPPD-PROX/parse_utils.h
<gh_stars>10-100 /* // Copyright (c) 2010-2017 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...
LucProvoost/samplevnf
VNFs/DPPD-PROX/prox_cksum.c
<filename>VNFs/DPPD-PROX/prox_cksum.c<gh_stars>10-100 /* // Copyright (c) 2010-2017 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/licen...
LucProvoost/samplevnf
VNFs/DPPD-PROX/pkt_parser.h
/* // Copyright (c) 2010-2017 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 la...
LucProvoost/samplevnf
VNFs/DPPD-PROX/helper-scripts/rapid/port_info/port_info.c
/* // Copyright (c) 2019 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 ...
LucProvoost/samplevnf
VNFs/DPPD-PROX/display_latency_distr.c
/* // Copyright (c) 2019 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 ...
LucProvoost/samplevnf
VNFs/DPPD-PROX/rx_pkt.c
<gh_stars>10-100 /* // Copyright (c) 2010-2020 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...
LucProvoost/samplevnf
VNFs/DPPD-PROX/pkt_prototypes.h
/* // Copyright (c) 2010-2017 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 la...
LucProvoost/samplevnf
VNFs/DPPD-PROX/handle_lb_5tuple.c
/* // Copyright (c) 2010-2017 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 la...
LucProvoost/samplevnf
VNFs/DPPD-PROX/prox_compat.h
<reponame>LucProvoost/samplevnf /* // Copyright (c) 2010-2020 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 // // ...
LucProvoost/samplevnf
VNFs/DPPD-PROX/handle_master.h
/* // Copyright (c) 2010-2020 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 la...