repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
snyjm-18/osss-ucx
src/info.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> static const int tag_width = 28; #define BUFMAX 64 #define UNKNOWN "unknown" #define INTERNAL...
snyjm-18/osss-ucx
src/shmemc/boolean.h
<gh_stars>1-10 /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #ifdef HAVE_STDBOOL_H # include <stdbool.h> #else # define bool _Bool # define true 1 # define false 0 #endif /* HAVE_STDBOOL_H */
snyjm-18/osss-ucx
src/allocator/memalloc.c
<gh_stars>1-10 /* For license: see LICENSE file at top-level */ #include "dlmalloc.h" /** * the memory area we manage in this unit. * * Not visible to anyone else */ static mspace myspace; /** * initialize the memory pool */ void shmema_init(void *base, size_t capacity) { myspace = create_mspace_with_base(...
snyjm-18/osss-ucx
src/shmemc/memfence.h
/* For license: see LICENSE file at top-level */ #ifndef _MEMFENCE_H #define _MEMFENCE_H 1 /* * How do various compilers handle memory barriers and intrinsics? * * Some guesswork here... * */ #if defined(__INTEL_COMPILER) /* * icc and friends */ # define LOAD_STORE_FENCE __memory_barrier #elif defined(__SUN...
snyjm-18/osss-ucx
src/shmemc/globalexit.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include <unistd.h> /* * start up the exit monitor */ void shmemc_globalexit_init(void) { } /* * shut down the exit monitor */ void shmemc_globalexit_finalize(void) { } void shmemc_global_exit(...
snyjm-18/osss-ucx
include/shmem/depr.h
<filename>include/shmem/depr.h /* For license: see LICENSE file at top-level */ #ifndef _SHMEM_DEPR_H #define _SHMEM_DEPR_H 1 #ifdef _SHMEM_IN_SOURCE_TREE_ # define _DEPRECATED_BY(...) # define _DEPRECATED #else /* * TODO: need better detection */ #if defined(__clang__) # define _DEPRECATED_BY(...) ...
snyjm-18/osss-ucx
src/shmemc/globalexit.h
/* For license: see LICENSE file at top-level */ #ifndef _SHMEMC_GLOBALEXIT_H #define _SHMEMC_GLOBALEXIT_H 1 void shmemc_globalexit_init(void); void shmemc_globalexit_finalize(void); #endif /* ! _SHMEMC_GLOBALEXIT_H */
snyjm-18/osss-ucx
include/null-shmemx.h
<filename>include/null-shmemx.h<gh_stars>1-10 /* For license: see LICENSE file at top-level */ #ifndef _SHMEMX_H #define _SHMEMX_H 1 #include <shmem.h> /* no extensions requested, so nothing here */ #endif /* ! _SHMEMX_H */
snyjm-18/osss-ucx
src/cache.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmemu.h" /* * These are compatibility routines for older SGI architectures. They * are now defined in OpenSHMEM to do nothing. */ #ifdef ENABLE_PSHMEM #pragma weak shmem_clear_cache_i...
snyjm-18/osss-ucx
src/shmemc/pmix-client.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "thispe.h" #include "shmemu.h" #include "state.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <pmix.h> #include <ucp/api/ucp.h> /* ---------...
snyjm-18/osss-ucx
src/shmemc/state.c
<filename>src/shmemc/state.c<gh_stars>0 /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "state.h" /* * the PE's initial state */ thispe_info_t proc = { .status = SHMEMC_PE_UNKNOWN, .rank = -1, .refcount = 0, };
snyjm-18/osss-ucx
src/allocator/xmemalloc.c
<gh_stars>1-10 /* For license: see LICENSE file at top-level */ #include "xmemalloc.h" #include "klib/khash.h" #include "dlmalloc.h" #include <stdio.h> #include <assert.h> static mspace *spaces; /* * map named heap to its index */ KHASH_MAP_INIT_STR(heapnames, shmemx_heap_index_t) static khash_t(heapnames) *na...
snyjm-18/osss-ucx
include/pshmem.h
/* For license: see LICENSE file at top-level */ #ifndef _PSHMEM_H #define _PSHMEM_H 1 #include "shmem.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* * init & query */ void pstart_pes(int npes); void pshmem_init(void); void pshmem_finalize(void); void pshmem_info_get...
snyjm-18/osss-ucx
src/allocator/xmemalloc.h
<filename>src/allocator/xmemalloc.h<gh_stars>1-10 /* For license: see LICENSE file at top-level */ #ifndef _SHMEMXA_MEMALLOC_H #define _SHMEMXA_MEMALLOC_H 1 #include <sys/types.h> /* size_t */ /* * translate between heap names and indices */ typedef int shmemx_heap_index_t; shmemx_heap_index_t shmemxa_n...
snyjm-18/osss-ucx
include/shmem/cache.h
/* For license: see LICENSE file at top-level */ #ifndef _SHMEM_CACHE_H #define _SHMEM_CACHE_H 1 #include "shmem/defs.h" #include "shmem/depr.h" /** * cache flushing(deprecated) */ /* * @brief shmem_clear_cache_inv has no effect. * * @section Synopsis * * @subsection c C/C...
snyjm-18/osss-ucx
src/shmemc/threading.h
/* For license: see LICENSE file at top-level */ #ifndef _SHMEMC_THREADING_H #define _SHMEMC_THREADING_H 1 #include <pthread.h> typedef pthread_t shmemc_thread_t; typedef pthread_mutex_t shmemc_mutex_t; #define SHMEMC_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER int shmemc_mutex_init(shmemc_mutex_t *tp); int shmem...
snyjm-18/osss-ucx
src/shmalloc.c
<reponame>snyjm-18/osss-ucx /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmemu.h" #include "shmemc.h" #include "shmem/defs.h" #include "shmem_mutex.h" #include "allocator/memalloc.h" #include <stdio.h> #include <sys/types.h> #includ...
snyjm-18/osss-ucx
src/shmemc/contexts.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "state.h" #include "shmemc.h" #include "shmemu.h" #include "boolean.h" #include "threading.h" #include "shmem/defs.h" #include "klib/klist.h" #include <stdlib.h> #include <ucp/api/ucp.h> ...
snyjm-18/osss-ucx
src/shmemu/logger.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "state.h" #include "shmemu.h" #include "shmemc.h" #include "boolean.h" #include "klib/khash.h" #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <sys/t...
snyjm-18/osss-ucx
src/ranks.c
<gh_stars>0 /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmemc.h" #include "shmemu.h" #ifdef ENABLE_PSHMEM #pragma weak shmem_my_pe = pshmem_my_pe #define shmem_my_pe pshmem_my_pe #pragma weak shmem_n_pes = pshmem_n_pes #define shmem...
snyjm-18/osss-ucx
src/shmem_mutex.h
/* For license: see LICENSE file at top-level */ #ifndef _SHMEM_MUTEX_H #define _SHMEM_MUTEX_H 1 #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #ifdef ENABLE_THREADS #include "state.h" #include "shmem/defs.h" #include "threading.h" extern shmemc_mutex_t comms_mutex; inline static void shmem...
snyjm-18/osss-ucx
include/shmem.h
/* For license: see LICENSE file at top-level */ #ifndef _SHMEM_H #define _SHMEM_H 1 #include <shmem/defs.h> #include <shmem/depr.h> #include <shmem/api.h> #endif /* ! _SHMEM_H */
snyjm-18/osss-ucx
src/shmem_mutex.c
<filename>src/shmem_mutex.c /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ /* * This only gets used if threading enabled */ #include "threading.h" shmemc_mutex_t comms_mutex = SHMEMC_MUTEX_INITIALIZER;
snyjm-18/osss-ucx
src/shmemc/collalgo.c
<gh_stars>0 /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "state.h" #include "boolean.h" #include <string.h> int shmemc_get_children_info(int tree_size, int tree_degree, int node, int *children_begin, int *chi...
snyjm-18/osss-ucx
src/shmemc/ucx-init.c
<filename>src/shmemc/ucx-init.c /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "thispe.h" #include "shmemu.h" #include "shmemc.h" #include "state.h" #include "globalexit.h" #include "readenv.h" #include "barrier.h" #include "allocator/me...
snyjm-18/osss-ucx
src/shmemu/fatal.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "state.h" #include <stdio.h> #include <stdlib.h> #include <stdarg.h> void shmemu_fatal(const char *fmt, ...) { const int complain = (proc.rank < 1); if (complain) { va_list...
snyjm-18/osss-ucx
src/shmemu/unitparse.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <sys/types.h> /** * define accepted size units in ascending order, fits in size_t * * See section 3.1 in http://physics.nist.gov/...
snyjm-18/osss-ucx
src/shmemu/shmemu-init.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmemu.h" void shmemu_init(void) { shmemu_timer_init(); shmemu_deprecate_init(); shmemu_logger_init(); } void shmemu_finalize(void) { shmemu_logger_finalize(); shmemu_d...
snyjm-18/osss-ucx
src/ptr.c
<gh_stars>1-10 /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmemu.h" #include "shmemc.h" #include "shmem/defs.h" #ifdef ENABLE_PSHMEM #pragma weak shmem_ptr = pshmem_ptr #define shmem_ptr pshmem_ptr #endif /* ENABLE_PSHMEM */ void ...
snyjm-18/osss-ucx
src/collectives/fcollect.c
<reponame>snyjm-18/osss-ucx<gh_stars>0 /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmem_mutex.h" #include "state.h" #include "shmemu.h" #include "shmemc.h" #ifdef ENABLE_PSHMEM #pragma weak shmem_fcollect32 = pshmem_fcollect32 #def...
snyjm-18/osss-ucx
src/atomics.c
<gh_stars>1-10 /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmem_mutex.h" #include "shmemu.h" #include "shmemc.h" #include "shmem/defs.h" #include <bits/wordsize.h> #include <sys/types.h> #include <stdint.h> #include <stddef.h> #if...
snyjm-18/osss-ucx
src/shmemc/shmemc-ucx.h
/* For license: see LICENSE file at top-level */ #ifndef _SHMEMC_UCX_H #define _SHMEMC_UCX_H 1 void shmemc_ucx_init(void); void shmemc_ucx_finalize(void); void shmemc_ucx_make_remote_endpoints(void); #endif /* ! _SHMEMC_UCX_H */
snyjm-18/osss-ucx
src/shmemc/thispe.h
/* For license: see LICENSE file at top-level */ #ifndef _THISPE_H #define _THISPE_H 1 #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "boolean.h" #include "threading.h" #include <sys/types.h> #include <ucp/api/ucp.h> /* * -- for UCX --------------------------------------------------...
snyjm-18/osss-ucx
src/collectives/alltoall.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "state.h" #include "shmemu.h" #include "shmem/api.h" #ifdef ENABLE_PSHMEM #pragma weak shmem_alltoall32 = pshmem_alltoall32 #define shmem_alltoall32 pshmem_alltoall32 #pragma weak shmem_al...
snyjm-18/osss-ucx
src/profiling.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include <stdio.h> #include "shmemu.h" /** * stub for the proposed UFL profiling (PSHMEM) interface * */ void shmemx_pcontrol(int level) { NO_WARN_UNUSED(level); #ifdef ENABLE_LOGGING c...
snyjm-18/osss-ucx
src/shmemc/readenv.h
<gh_stars>1-10 /* For license: see LICENSE file at top-level */ #ifndef _SHMEMC_READENV_H #define _SHMEMC_READENV_H 1 void shmemc_env_init(void); void shmemc_env_finalize(void); #endif /* ! _SHMEMC_READENV_H */
snyjm-18/osss-ucx
src/shmemu/deprecate.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmemu.h" #include "klib/khash.h" KHASH_SET_INIT_STR(deprecations) static khash_t(deprecations) *table; inline static int already_seen(const char *name) { const khint_t k = kh_get(de...
snyjm-18/osss-ucx
src/shmemu/timer.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include <stdio.h> #include <sys/time.h> static double epoch; inline static double shmemu_read_time(void) { struct timeval t; if (gettimeofday(&t, NULL) != 0) { return 0.0; ...
snyjm-18/osss-ucx
src/allocator/memalloc.h
<filename>src/allocator/memalloc.h<gh_stars>1-10 /* For license: see LICENSE file at top-level */ #ifndef _SHMEMA_MEMALLOC_H #define _SHMEMA_MEMALLOC_H 1 #include <sys/types.h> /* size_t */ /* * memory allocation */ void shmema_init(void *base, size_t capacity); void shmema_finalize(void); void *shmema_ba...
snyjm-18/osss-ucx
src/collectives/reductions.c
<filename>src/collectives/reductions.c /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmemu.h" #include "shmem/defs.h" #include "shmem/api.h" #include <complex.h> /** * common reduce code. Build generalized reduction for various typ...
snyjm-18/osss-ucx
src/info.h
/* For license: see LICENSE file at top-level */ #ifndef _SHMEM_OSH_INFO_H #define _SHMEM_OSH_INFO_H 1 #include <stdio.h> void info_output_spec_version(FILE *strm); void info_output_package_name(FILE *strm); void info_output_package_contact(FILE *strm); void info_output_package_version(FILE *strm, int terse); void i...
snyjm-18/osss-ucx
src/shmemc/state.h
<gh_stars>1-10 /* For license: see LICENSE file at top-level */ #ifndef _SHMEMC_STATE_H #define _SHMEMC_STATE_H 1 #include "thispe.h" extern thispe_info_t proc; #endif /* ! _SHMEMC_STATE_H */
snyjm-18/osss-ucx
src/collectives/barrier.c
<reponame>snyjm-18/osss-ucx /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmem_mutex.h" #include "shmemu.h" #include "shmemc.h" #ifdef ENABLE_PSHMEM #pragma weak shmem_barrier_all = pshmem_barrier_all #define shmem_barrier_all pshmem...
snyjm-18/osss-ucx
src/collectives/collect.c
<reponame>snyjm-18/osss-ucx /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "shmem_mutex.h" #include "state.h" #include "shmemu.h" #include "shmemc.h" #ifdef ENABLE_PSHMEM #pragma weak shmem_collect32 = pshmem_collect32 #define shmem_col...
snyjm-18/osss-ucx
src/shmemc/threading.c
<filename>src/shmemc/threading.c /* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "threading.h" int shmemc_mutex_init(shmemc_mutex_t *tp) { return pthread_mutex_init(tp, NULL); } int shmemc_mutex_destroy(shmemc_mutex_t *mp) { retu...
snyjm-18/osss-ucx
src/shmemc/pmi1-client.c
/* For license: see LICENSE file at top-level */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "thispe.h" #include "shmemu.h" #include "state.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <pmi.h> #include <ucp/api/ucp.h> static char *...
hszOfficial-16/EtherX
EtherX/lib/SDL2/include/SDL_revision.h
<filename>EtherX/lib/SDL2/include/SDL_revision.h #define SDL_REVISION "https://github.com/libsdl-org/SDL.git@d854ba99c2c0f4534231df14bdba77e7dd32bcba" #define SDL_REVISION_NUMBER 0 #ifndef SDL_REVISION #define SDL_REVISION "" #endif
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_image.h
<gh_stars>100-1000 #ifndef NNET_IMAGE_H_ #define NNET_IMAGE_H_ #include "nnet_common.h" #include "hls_stream.h" #include <math.h> namespace nnet { struct resize_config { static const unsigned height = 10; static const unsigned width = 10; static const unsigned n_chan = 10; static const unsigned new_h...
ngpaladi/hls4ml
hls4ml/templates/vivado/ap_types/ap_common.h
/* * Copyright 2011-2019 Xilinx, 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 agre...
ngpaladi/hls4ml
hls4ml/templates/vivado/ap_types/ap_decl.h
/* * Copyright 2011-2019 Xilinx, 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 agre...
ngpaladi/hls4ml
hls4ml/templates/vivado/ap_types/utils/x_hls_utils.h
#ifndef X_HLS_UTILS_H #define X_HLS_UTILS_H #include "ap_fixed.h" #include <limits> namespace hls { template<typename T> class numeric_limits { public: static T max() { return std::numeric_limits<T>::max(); } static T min() { return std::numeric_limits<T>::min(); } static T...
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_image_stream.h
#ifndef NNET_IMAGE_STREAM_H_ #define NNET_IMAGE_STREAM_H_ #include "nnet_common.h" #include "hls_stream.h" namespace nnet { template<class data_T, typename CONFIG_T> void resize_nearest( hls::stream<data_T> &image, hls::stream<data_T> &resized ) { assert(CONFIG_T::new_height % CONFIG_T::height == 0); ...
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_conv2d_resource.h
#ifndef NNET_CONV2D_RESOURCE_H_ #define NNET_CONV2D_RESOURCE_H_ #include "nnet_common.h" #include "nnet_dense.h" namespace nnet { template<class data_T, typename CONFIG_T> void im2col_2d( data_T data[CONFIG_T::in_height * CONFIG_T::in_width * CONFIG_T::n_chan], data_T data_col[CONFIG_T::filt_height * CONFIG_...
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_conv_stream.h
#ifndef NNET_CONV_STREAM_H_ #define NNET_CONV_STREAM_H_ #include "nnet_common.h" #include "hls_stream.h" namespace nnet { template<unsigned K, unsigned S, unsigned W> unsigned scale_index(const unsigned idx) { #pragma HLS INLINE if (idx < K - S) { return idx; } constexpr unsigned nW = ((W -...
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_conv2d_stream.h
#ifndef NNET_CONV2D_STREAM_H_ #define NNET_CONV2D_STREAM_H_ #include "nnet_common.h" #include "nnet_conv_stream.h" #include "hls_stream.h" namespace nnet { template<class data_T, typename CONFIG_T> void compute_scaled_indices_2d( const unsigned h_idx, const unsigned w_idx, ap_uint<CONFIG_T::filt_height *...
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_helpers.h
// // rfnoc-hls-neuralnet: Vivado HLS code for neural-net building blocks // // Copyright (C) 2017 <NAME> // // This program 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...
ngpaladi/hls4ml
hls4ml/templates/vivado/firmware/parameters.h
#ifndef PARAMETERS_H_ #define PARAMETERS_H_ #include "ap_int.h" #include "ap_fixed.h" #include "nnet_utils/nnet_helpers.h" //hls-fpga-machine-learning insert includes //hls-fpga-machine-learning insert weights //hls-fpga-machine-learning insert layer-config #endif
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_sepconv2d_stream.h
<reponame>ngpaladi/hls4ml<filename>hls4ml/templates/vivado/nnet_utils/nnet_sepconv2d_stream.h #ifndef NNET_SEPARABLE_CONV2D_STREAM_H_ #define NNET_SEPARABLE_CONV2D_STREAM_H_ #include "nnet_common.h" #include "hls_stream.h" #include "nnet_sepconv_stream.h" #include "nnet_conv2d_stream.h" namespace nnet { template<cla...
ngpaladi/hls4ml
hls4ml/templates/vivado/ap_types/ap_fixed_ref.h
<filename>hls4ml/templates/vivado/ap_types/ap_fixed_ref.h /* * Copyright 2011-2019 Xilinx, 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/L...
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_common.h
<reponame>ngpaladi/hls4ml // // rfnoc-hls-neuralnet: Vivado HLS code for neural-net building blocks // // Copyright (C) 2017 <NAME> // // This program 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 Found...
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_array.h
<reponame>ngpaladi/hls4ml #ifndef NNET_ARRAY_H_ #define NNET_ARRAY_H_ #include <math.h> namespace nnet { struct transpose3d_config { static const unsigned height = 10; static const unsigned width = 10; static const unsigned depth = 10; static const unsigned perm[3]; }; template<class data_T, typenam...
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_batchnorm.h
// // rfnoc-hls-neuralnet: Vivado HLS code for neural-net building blocks // // Copyright (C) 2017 <NAME> // // This program 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...
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_padding.h
<filename>hls4ml/templates/vivado/nnet_utils/nnet_padding.h #ifndef NNET_PADDING_H_ #define NNET_PADDING_H_ #include <math.h> namespace nnet { struct padding1d_config { static const unsigned n_chan = 10; static const unsigned in_width = 10; static const unsigned out_width = 10; static const unsigned ...
ngpaladi/hls4ml
hls4ml/templates/vivado/nnet_utils/nnet_dense_stream.h
#ifndef NNET_DENSE_STREAM_H_ #define NNET_DENSE_STREAM_H_ #include "nnet_common.h" #include "nnet_types.h" #include "hls_stream.h" #include <math.h> #include <assert.h> namespace nnet { template<class data_T, class res_T, typename CONFIG_T> void dense_wrapper( data_T data[CONFIG_T::n_in], res_T res[CONFIG_T...
Jovonni/RealTimeMLLib
MLMath.h
#include <iostream> #include <armadillo> //#include <pthread.h> #include <thread> #ifndef PLOTTER #define PLOTTER #include "plot.h" #endif #ifndef MLMATHCPP #define MLMATHCPP //#include "MLMath.cpp" #endif using namespace std; using namespace arma; template<class Matrix> class MLMath { int numberOfExample...
Jovonni/RealTimeMLLib
test_gnuplot/test/gnuplot_i.h
/*---------------------------------------------------------------------------- E.S.O. ----------------------------------------------------------------------------- File name : gnuplot_i.h Author : <NAME> Created on : Fri Sept 26 1997 Software : AN...
markspanbroek/SimpleOT
fe25519_pack.c
#include "fe25519.h" /* Assumes input x being reduced below 2^255 */ void fe25519_pack(unsigned char r[32], const fe25519 *x) { fe25519 t; t = *x; fe25519_freeze(&t); r[0] = (unsigned char) ( t.v[0] & 0xff); r[1] = (unsigned char) ((t.v[0] >> 8) & 0xff); r[2] = (unsigned char) ((t.v[0] >> 16)...
markspanbroek/SimpleOT
ot_receiver.h
<filename>ot_receiver.h #ifndef OT_RECEIVER_H #define OT_RECEIVER_H #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include <stdbool.h> #include "sc25519.h" #include "ge4x.h" #include "ot_config.h" struct ot_receiver { unsigned char S_pack[ PACKBYTES ]; ge4x S; ge4x table[ 64/DIST ][8]; // temporary...
markspanbroek/SimpleOT
randombytes.h
<filename>randombytes.h /* randombytes/devurandom.h version 20080713 <NAME> Public domain. */ #ifndef randombytes_devurandom_H #define randombytes_devurandom_H #ifdef __cplusplus extern "C" { #endif extern void simpleot_randombytes(unsigned char *,unsigned long long); #ifdef __cplusplus } #endif #ifndef randombyte...
markspanbroek/SimpleOT
gfe4x_iseq_vartime.c
<gh_stars>100-1000 #include "gfe4x.h" void gfe4x_iseq_vartime(unsigned char *r, const gfe4x *x, const gfe4x *y) { int i, j; unsigned char px[128]; unsigned char py[128]; gfe4x_pack(px, x); gfe4x_pack(py, y); for (i = 0; i < 4; i++) { r[i] = 0; for (j = 0; j < 32; j++) { if (px[i*32+j] != py[i*32+...
markspanbroek/SimpleOT
gfe4x_pow2523.c
#include "gfe4x.h" void gfe4x_pow2523(gfe4x *r, const gfe4x *x) { gfe4x z2; gfe4x z9; gfe4x z11; gfe4x z2_5_0; gfe4x z2_10_0; gfe4x z2_20_0; gfe4x z2_50_0; gfe4x z2_100_0; gfe4x t; /* 2 */ gfe4x_square(&z2,x); /* 4 */ gfe4x_square(&t,&z2); /* 8 */ gfe4x_square(&t,&t); /* 9 */ gfe4x_mul(&z9,&t,x); /* 1...
markspanbroek/SimpleOT
cvariable.h
<filename>cvariable.h #ifdef __MACH__ #define cvariable(var) _##var #else #define cvariable(var) var #endif
markspanbroek/SimpleOT
Keccak-simple-settings.h
#define cKeccakB 1600 #define cKeccakR 1088
markspanbroek/SimpleOT
fe25519_neg.c
#include "fe25519.h" void fe25519_copy(fe25519 *r, const fe25519 *x) { // fe25519 t; // /fe25519_setint(&t,0); // fe25519_sub(r,&t,x); int i; for (i = 0; i < 5; i++) r->v[i] = x->v[i]; // printf("???\n"); } void fe25519_neg(fe25519 *r, const fe25519 *x) { fe25519 t; fe25519_setint(&t,0); fe25519_sub(r,...
markspanbroek/SimpleOT
ge25519.h
#ifndef GE25519_H #define GE25519_H /* * Arithmetic on the twisted Edwards curve -x^2 + y^2 = 1 + dx^2y^2 * with d = -(121665/121666) = * 37095705934669439343138083508754565189542113879843219016388785533085940283555 * Base point: * (15112221349535400772501151409588531511454012693041857206046113283949847762202,463...
markspanbroek/SimpleOT
fe25519_setint.c
#include "fe25519.h" void fe25519_setint(fe25519 *r, unsigned int v) { r->v[0] = v; r->v[1] = 0; r->v[2] = 0; r->v[3] = 0; r->v[4] = 0; }
markspanbroek/SimpleOT
ge4x.h
#ifndef GE4X_H #define GE4X_H #include "gfe4x.h" #include "sc25519.h" typedef struct{ gfe4x x; gfe4x y; gfe4x z; gfe4x t; } ge4x; typedef struct{ gfe4x x; gfe4x y; gfe4x z; gfe4x t; } ge4x_p1p1; typedef struct{ gfe4x x; gfe4x y; gfe4x z; } ge4x_p2; typedef struct{ gfe4x x; gfe4x y; gfe4x z; }...
markspanbroek/SimpleOT
cpucycles.h
/* cpucycles amd64cpuinfo.h version 20100803 <NAME> Public domain. */ #ifndef CPUCYCLES_amd64cpuinfo_h #define CPUCYCLES_amd64cpuinfo_h #ifdef __cplusplus extern "C" { #endif extern long long cpucycles_amd64cpuinfo(void); extern long long cpucycles_amd64cpuinfo_persecond(void); #ifdef __cplusplus } #endif #ifndef ...
markspanbroek/SimpleOT
ge25519_add.c
#include "ge25519.h" void simpleot_ge25519_add(ge25519_p3 *r, const ge25519_p3 *p, const ge25519_p3 *q) { ge25519_p1p1 grp1p1; ge25519_add_p1p1(&grp1p1, p, q); simpleot_ge25519_p1p1_to_p3(r, &grp1p1); }
markspanbroek/SimpleOT
gfe4x_getparity.c
#include "gfe4x.h" void gfe4x_getparity(unsigned char * res, const gfe4x * a) { unsigned char pa[128]; gfe4x_pack(pa, a); res[0] = pa[ 0] & 1; res[1] = pa[32] & 1; res[2] = pa[64] & 1; res[3] = pa[96] & 1; }
markspanbroek/SimpleOT
gfe4x.h
<reponame>markspanbroek/SimpleOT #ifndef GFE4X_H #define GFE4X_H typedef struct{ double v[4]; } __attribute__ ((aligned (32))) limb; typedef struct{ limb v[12]; } gfe4x; void gfe4x_pack(unsigned char r[128], const gfe4x *x); void gfe4x_unpack(gfe4x *, const unsigned char *); void gfe4x_unpack_single(gfe4x *, co...
markspanbroek/SimpleOT
ot_config.h
<filename>ot_config.h #ifndef OT_CONFIG_H #define OT_CONFIG_H #define NOTS 16 #define HASHBYTES 32 #define HASHBITS (HASHBYTES * 8) #define PACKBYTES 32 #define DIST 1 #define VERBOSE 1 #endif //ifndef OT_CONFIG_H
markspanbroek/SimpleOT
fe25519_iseq_vartime.c
<gh_stars>100-1000 #include "fe25519.h" int fe25519_iseq_vartime(const fe25519 *x, const fe25519 *y) { fe25519 t1 = *x; fe25519 t2 = *y; fe25519_freeze(&t1); fe25519_freeze(&t2); if(t1.v[0] != t2.v[0]) return 0; if(t1.v[1] != t2.v[1]) return 0; if(t1.v[2] != t2.v[2]) return 0; if(t1.v[3] != t2.v[3]) re...
fenglwh/Modules
Modules/path.h
<reponame>fenglwh/Modules #pragma once #include"windows.h" #include "vector" bool exist(); bool isdir(); bool isfile(); bool makedir(); bool makedirs(); bool deleteFile(); bool deleteDir(); struct DirWalk{ char dir[256]; std::vector<char[256]> dirs; std::vector<char[256]> files; }; DirWalk walk(char * path)...
fenglwh/Modules
Modules/LAN.h
<gh_stars>0 #pragma once #include <stdio.h> #include <winsock2.h> #include <WS2tcpip.h> #pragma comment(lib,"ws2_32.lib") //#include<sys/socket.h> #include "list" #include "map" #include "thread" #include "string" enum SOCK_MESSAGE_TYPE { init = 0, READ=1, WRITE=2, QUERY=3, READ_RESULT=4, QUERY_RESPONSE=5, ...
fenglwh/Modules
Modules/winReg.h
<reponame>fenglwh/Modules<filename>Modules/winReg.h #pragma once // return value refer to the windows error int readReg(); int writeReg(); int createReg(); int delReg();
fenglwh/Modules
Modules/Logging.h
<filename>Modules/Logging.h<gh_stars>0 #pragma once enum LOG_LEVEL { ALL = 0, INFO=1, Warning = 2, Critical=3, }; class Logging { private: LOG_LEVEL level; char * path; public: Logging(); Logging(char* path); //Logging(wchar_t * path); ~Logging(); int setPath(char* path); int getPath(char* path); int set...
fenglwh/Modules
Modules/timmer.h
#pragma once #if defined(__linux__) || defined(__unix__) #define sleep sleep_unix #include "sys/socket.h" #elif defined(_WIN32) #define sleep sleep_windows #include <winsock2.h> #include <WS2tcpip.h> #pragma comment(lib,"Winmm.lib") #pragma comment(lib,"ws2_32.lib") #endif // #include "stdarg.h" #include "time.h" ...
fenglwh/Modules
Modules/GPIB.h
<reponame>fenglwh/Modules #pragma once #include "visatype.h" #include "visa.h" #include <stdarg.h> #include "vector" #include "map" #include "stdlib.h" #pragma comment (lib,"C:\\Program Files\\IVI Foundation\\VISA\\Win64\\Lib_x64\\msc\\visa32.lib") #pragma comment (lib,"C:\\Program Files\\IVI Foundation\\VISA\\Win64\\L...
szwenni/LEDSunriseESP32
src/SimpleLEDStripControl.h
#include <AsyncMqttClient.h> #include <FastLED.h> #include <ESPAsyncWebServer.h> #include <SPIFFS.h> #include <time.h> #include "UserConfig.h" #include <Homie.h> #include <HomieNode.h> #include <HomieNodeColorProperty.h> #include <HomieNodeBooleanProperty.h> #include <HomieNodeIntegerProperty.h> class Si...
szwenni/LEDSunriseESP32
src/UserConfig.h
#include <Arduino.h> #include <ArduinoJson.h> #include <SunTimers.h> #define MONDAY "Monday" #define TUESDAY "Tuesday" #define WEDNESDAY "Wednesday" #define THURSDAY "Thursday" #define FRIDAY "Friday" #define SATURDAY "Saturday" #define SUNDAY "Sunday" class UserConfig { #define WIFI_NAME "<EMAIL...
szwenni/LEDSunriseESP32
src/SunTimers.h
#include <Arduino.h> #include <ArduinoJson.h> class SunTimerConf { public: uint8_t minutesDown; uint8_t minutesUp; uint8_t hoursUp; uint8_t hoursDown; bool enabled; }; class SunTimer { public: String dayOfWeek; SunTimerConf *sunTimer...
jgrenat/elm-ui-explorer
examples/dsm/build/ios/StyleDictionaryColor.h
<gh_stars>100-1000 // // StyleDictionaryColor.h // // Do not edit directly // Generated on Sat, 02 Mar 2019 22:59:36 GMT // #import <UIKit/UIKit.h> typedef NS_ENUM(NSInteger, StyleDictionaryColorName) { ColorBrandPrimary, ColorBrandPrimaryVariant, ColorBrandSecondary, ColorBrandSecondaryVariant, ColorBrandAlternati...
jgrenat/elm-ui-explorer
examples/dsm/build/ios/StyleDictionarySize.h
// StyleDictionarySize.h // // Do not edit directly // Generated on Sat, 02 Mar 2019 22:59:36 GMT // #import <Foundation/Foundation.h>
a7medtaha/FAStoryKit
Pods/Target Support Files/SessionKit/SessionKit-umbrella.h
#ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif #import "SessionKit.h" FOUNDATION_EXPORT double SessionKitVersionNumber; FOUNDATION_EXPORT const unsigned char SessionKitVer...
yfwz100-exp/stopwatch-qt-html5
html5applicationviewer/html5applicationviewer.h
// checksum 0xb4a version 0x7000b /* This file was generated by the Html5 Application wizard of Qt Creator. Html5ApplicationViewer is a convenience class containing mobile device specific code such as screen orientation handling. It is recommended not to modify this file, since newer versions of Qt Creator ma...
Damenly/lzfse
lzfse_fse.c
/* Copyright (c) 2015-2016, Apple Inc. 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 follow...
Damenly/lzfse
lzfse_decode.c
/* Copyright (c) 2015-2016, Apple Inc. 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 follow...
Damenly/lzfse
lzfse_encode_tables.h
/* Copyright (c) 2015-2016, Apple Inc. 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 follow...
Damenly/lzfse
lzfse_fse.h
<gh_stars>0 /* Copyright (c) 2015-2016, Apple Inc. 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 ...