repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
jingxianwen/E3SM | cime/src/externals/pio2/cmake/TryNetCDF_PARALLEL.c | /*
* NetCDF C Test for parallel Support
*/
#include "netcdf_meta.h"
int main()
{
#if NC_HAS_PARALLEL==1
return 0;
#else
XXX;
#endif
}
|
jingxianwen/E3SM | cime/src/externals/pio2/tests/fncint/tst_c_pio.c | /* This program does a very simple I/O system and decomposition, and
* writes a simple file.
<NAME>, 7/27/19
*/
#include "config.h"
#include <pio.h>
#include <mpi.h>
#include <pio_tests.h>
#include <pio_internal.h>
#define FILE_NAME "tst_c_pio.nc"
#define VAR_NAME "data_var"
#define DIM_NAME_UNLIMITED "dim_unlim... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/list.h | <reponame>jingxianwen/E3SM
/*
* (C) 2000 UNIVERSITY OF CHICAGO
* See COPYRIGHT in top-level directory.
*/
/******************************************************
* WARNING: This file automatically generated. *
* Do not edit by hand. *
*******************************... |
jingxianwen/E3SM | cime/src/externals/pio2/src/clib/pio_error.h | /**
* @file
* Macros to handle errors in tests or libray code.
* @author <NAME>
* @date 2019
*
* @see https://github.com/NCAR/ParallelIO
*/
#ifndef __PIO_ERROR__
#define __PIO_ERROR__
#include <config.h>
#include <pio.h>
/**
* Handle non-MPI errors by printing error message and goto exit. This
* is used in ... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/info.c |
#include "mpiP.h"
/***/
FC_FUNC( mpi_info_create , MPI_INFO_CREATE ) (int *info, int *ierror)
{
*ierror=MPI_Info_create(info);
}
int MPI_Info_create(MPI_Info *info)
{
/* For now, we aren't storing anything, so don't bother with a real handle */
*info=0;
return(MPI_SUCCESS);
}
/***/
FC_FUNC( mpi_inf... |
jingxianwen/E3SM | cime/src/externals/pio2/src/clib/pio_lists.c | <reponame>jingxianwen/E3SM<filename>cime/src/externals/pio2/src/clib/pio_lists.c<gh_stars>1-10
/**
* @file
* PIO list functions.
*/
#include <config.h>
#include <pio.h>
#include <pio_internal.h>
#include <string.h>
#include <stdio.h>
#include <uthash.h>
static io_desc_t *pio_iodesc_list = NULL;
static io_desc_t *cu... |
jingxianwen/E3SM | cime/src/externals/pio2/src/ncint/ncint_pio.c | /**
* @file
* @internal Additional nc_* functions to support netCDF integration.
*
* @author <NAME>
*/
#include "config.h"
#include <stdlib.h>
#include <pio_internal.h>
#include "ncintdispatch.h"
/** This is te default io system id. */
extern int diosysid;
/** Have we initialized the netCDF integration layer? T... |
jingxianwen/E3SM | cime/src/externals/pio2/examples/c/darray_no_async.c | <filename>cime/src/externals/pio2/examples/c/darray_no_async.c
/*
* @file
* @brief A simple C example for the ParallelIO Library.
*
* This example creates a netCDF output file with three dimensions
* (one unlimited) and one variable. It first writes, then reads the
* sample file using distributed arrays.
*
* Th... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/tests/ctest.c | #include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef TEST_INTERNAL
#include <mpiP.h>
#include <type.h>
#else
MPI_Request req;
#endif
int errcount = 0;
//simplest example: contiguous
// type of 5 MPI_INT
void test_simple_contig()
{
int i;
int a [5] = {1... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/probe.c | //probe.c
#include "mpiP.h"
static int mpi_match_send(void *r, void *tag)
{
return( *((int *)tag) == MPI_ANY_TAG ||
*((int *)tag) == ((Req *)r)->tag );
}
FC_FUNC(mpi_iprobe, MPI_IPROBE)(int * source, int * tag, int * comm,
int * flag, int *status, int * ierr)
{
*ierr = MPI_Ipr... |
jingxianwen/E3SM | cime/src/externals/pio2/cmake/TryNetCDF_DAP.c | <gh_stars>1-10
/*
* NetCDF C Test for DAP Support
*/
#include "netcdf_meta.h"
int main()
{
#if NC_HAS_DAP==1
return 0;
#else
XXX;
#endif
}
|
jingxianwen/E3SM | cime/src/externals/pio2/tests/cunit/test_pioc_fill.c | /*
* More tests for PIO data reading and writing routines.
*
* <NAME>
*/
#include <config.h>
#include <pio.h>
#include <pio_internal.h>
#include <pio_tests.h>
/* The number of tasks this test should run on. */
#define TARGET_NTASKS 4
/* The minimum number of tasks this test should run on. */
#define MIN_NTASKS 4... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/mpi.h | #ifndef _MPI_H_
#define _MPI_H_
#define MPI_MAX_LIBRARY_VERSION_STRING (80)
typedef int MPI_Comm;
typedef int MPI_Request;
#define MPI_COMM_WORLD (1)
#define MPI_COMM_NULL (0) /* handle 0 maps to NULL */
typedef int MPI_Group;
/* MPI_GROUP_EMPTY and MPI_GROUP_NULL must not conflict with MPI_GROUP_ONE */
#de... |
jingxianwen/E3SM | cime/src/externals/pio2/tests/cunit/test_pioc_unlim.c | /*
* Tests for PIO Functions. In this test we use a simple 3D variable,
* with an unlimited dimension. The data will have two timesteps, and
* 4x4 elements each timestep.
*
* @author <NAME>
* @date 2/14/17
*/
#include <config.h>
#include <pio.h>
#include <pio_internal.h>
#include <pio_tests.h>
/* The number of... |
jingxianwen/E3SM | cime/src/externals/pio2/tests/cunit/test_rearr.c | <reponame>jingxianwen/E3SM<gh_stars>1-10
/*
* This program tests some internal functions in the library related
* to the box and subset rearranger, and the transfer of data betweeen
* IO and computation tasks.
*
* @author <NAME>
* @date 3/9/17
*/
#include <config.h>
#include <pio.h>
#include <pio_tests.h>
#inclu... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/send.c | <filename>cime/src/externals/mct/mpi-serial/send.c
#include "mpiP.h"
/*
* SENDING
*
*/
static int mpi_match_recv(void *r, void *tag)
{
return( ((Req *)r)->tag == MPI_ANY_TAG ||
((Req *)r)->tag == *((int *)tag) );
}
/*
*
*/
FC_FUNC( mpi_isend , MPI_ISEND )(void *buf, int *count, int *datatype,
in... |
jingxianwen/E3SM | cime/src/drivers/nuopc/mediator/ESMFConvenienceMacros.h | <gh_stars>1-10
#if 0
// ----------- ERROR handling macros ------------------------------------------
#endif
#define ESMF_ERR_ABORT(rc) if (ESMF_LogFoundError(rc, msg="Aborting NEMS", line=__LINE__, file=__FILE__)) call ESMF_Finalize(endflag=ESMF_END_ABORT)
#define ESMF_ERR_RETURN(rc,rcOut) if (ESMF_LogFoundError(rc, ... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/pack.c | <reponame>jingxianwen/E3SM
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mpiP.h"
#include "type.h"
/*
*
*/
FC_FUNC( mpi_pack , MPI_PACK )
( void *inbuf, int *incount, int *datatype,
void *outbuf, int *outsize, int *position, int *comm, int *ierror)
{
*ierror=MPI_Pack(inbuf, *in... |
jingxianwen/E3SM | cime/src/externals/pio2/src/ncint/nc_put_vard.c | <gh_stars>1-10
/**
* @file
* PIO functions to write data with distributed arrays.
*
* @author <NAME>
* @date 2019
* @see https://github.com/NCAR/ParallelIO
*/
#include <config.h>
#include <pio.h>
#include <pio_internal.h>
/**
* @addtogroup PIO_write_darray_c
* Write distributed arrays to a Variable in C.
* @... |
jingxianwen/E3SM | cime/src/externals/pio2/examples/c/example2.c | /**
* @file
* A simple C example for the ParallelIO Library.
*
* This example creates a netCDF output file with one 3D variable. One
* of the dimensions will be unlimited. The example first writes the
* sample file using the ParallelIO library, then reads it with the
* plain old netCDF library to check that it... |
jingxianwen/E3SM | cime/src/drivers/nuopc/mediator/ESMFVersionDefine.h | <gh_stars>1-10
#if 0
//
// Make this header file available as ESMFVersionDefine.h in order to build
// NEMS against an ESMF installation that contains a reference level NUOPC Layer.
//
#endif
#include "./ESMFConvenienceMacros.h"
|
jingxianwen/E3SM | components/homme/src/arkode/column_linsol.c | /*******************************************************************
* <NAME>
* SMU Mathematics
* Copyright 2017; all rights reserved
* -----------------------------------------------------------------
* This is the implementation file for a Fortran columnwise linear
* solver package for HOMME+ARKode. This is s... |
jingxianwen/E3SM | cime/src/externals/pio1/tests/unittests/nc_set_log_level2.c | <filename>cime/src/externals/pio1/tests/unittests/nc_set_log_level2.c
#if defined(_NETCDF4) && defined(LOGGING)
#include <netcdf.h>
int nc_set_log_level2_(int *il)
{
int i;
i = nc_set_log_level( *il );
return(i);
}
#endif
|
jingxianwen/E3SM | cime/src/externals/pio2/tests/cunit/test_common.c | <reponame>jingxianwen/E3SM
/*
* Common test code for PIO C tests.
*
* <NAME>
*/
#include <config.h>
#include <pio.h>
#include <pio_internal.h>
#include <pio_tests.h>
/* The number of dimensions in the test data. */
#define NDIM_S1 1
/* The length of our test data. */
#define DIM_LEN_S1 4
/* The name of the dime... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/listops.h | /*
* (C) 2000 UNIVERSITY OF CHICAGO
* See COPYRIGHT in top-level directory.
*/
#ifndef _listops_h
#define _listops_h
/*
* Support for singly-linked list of pointers (or ints)
*
*/
typedef struct _List *pList;
typedef struct _Listitem *pListitem;
#include "list.h"
#endif
|
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/copy.c | /*
* copy.c
*
* memcpy "wrapper" to copy MPI Datatypes
*
*/
#include "mpiP.h"
#include "type.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
//For type matching
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/*
* rml: this prototype should be in mpiP.h, but mpiP.h does not cu... |
jingxianwen/E3SM | cime/src/externals/pio2/src/gptl/f_wrappers_2.c | <gh_stars>1-10
/*
** Fortran wrappers for timing library routines that are not in GPTL.
* <NAME> 4/9/19
*/
#include <string.h>
#include <stdlib.h>
#include "private.h" /* MAX_CHARS, bool */
#include "gptl.h" /* function prototypes and HAVE_MPI logic*/
#ifdef HAVE_PAPI
#include <papi.h>
#endif /* HAVE_PAPI */
#defi... |
jingxianwen/E3SM | cime/src/externals/pio2/src/clib/pio_put_vard.c | <gh_stars>1-10
/**
* @file
* PIO functions to write data with distributed arrays.
*
* @author <NAME>
* @date 2019
* @see https://github.com/NCAR/ParallelIO
*/
#include <config.h>
#include <pio.h>
#include <pio_internal.h>
/**
* @addtogroup PIO_write_darray_c
* Write distributed arrays to a Variable in ... |
jingxianwen/E3SM | cime/src/externals/pio2/src/gptl/gptl.c | /*
** $Id: gptl.c,v 1.157 2011-03-28 20:55:18 rosinski Exp $
**
** Author: <NAME>
**
** Main file contains most user-accessible GPTL functions
*/
#include <stdlib.h> /* malloc */
#include <sys/time.h> /* gettimeofday */
#include <sys/times.h> /* times */
#include <unistd.h> /* gettimeofday, sysc... |
jingxianwen/E3SM | cime/src/externals/pio2/src/ncint/nc_get_vard.c | <reponame>jingxianwen/E3SM<gh_stars>1-10
/**
* @file
* PIO functions to get data with distributed arrays.
*
* @author <NAME>
* @date 2019
*
* @see https://github.com/NCAR/ParallelIO
*/
#include <config.h>
#include <pio.h>
#include <pio_internal.h>
/**
* @addtogroup PIO_read_darray_c
* Read distribut... |
jingxianwen/E3SM | cime/src/externals/pio2/src/clib/topology.c | #if defined(BGQDONT)
#include <pio.h>
#include <pio_internal.h>
#include <math.h>
#include <kernel/process.h>
#include <kernel/location.h>
#include <firmware/include/personality.h>
#include <mpix.h>
#define Personality Personality_t
int rank;
int np;
int my_name_len;
char my_name[255];
void i... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/tests/ctest_old.c |
#include <stdio.h>
#include "mpi.h"
main(int argc, char *argv[])
{
MPI_Request sreq[10], sreq2[10], rreq[10], rreq2[10];
int sbuf[10],sbuf2[10],rbuf[10],rbuf2[10];
int tag;
MPI_Status status[10];
int i,j;
MPI_Comm comm2;
int flag;
MPI_Group mygroup;
char pname[MPI_MAX_PROCESSOR_NAME];
int pnam... |
jingxianwen/E3SM | cime/src/externals/pio2/src/gptl/threadutil.c | /*
** $Id: threadutil.c,v 1.28 2009/12/31 01:51:59 rosinski Exp $
**
** Author: <NAME>
**
** Utility functions handle thread-based GPTL needs.
*/
#include <stdlib.h>
#include <stdio.h>
#include "private.h"
/* Max allowable number of threads (used only when THREADED_PTHREADS is true) */
#define MAX_THREADS 128
/* V... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/mpiP.h | #ifndef _MPIP_H
#define _MPIP_H
/*
* Private .h file for MPI
*/
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "listops.h"
#include "mpi.h"
/* Autoconf Fortran name mangling
*
* config.h defines F77_FUNC and F77_FUNC_
* Since we are generally using FC_FUNC, and
* all ... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/type_const.c | #include "type.h"
/* Here are the statically initialized structs for the predefined datatypes.
*/
//C type structs
Typestruct TSchar = {.count=1, .lb=0, .ub=sizeof(char),
.committed=1, .o_lb=0, .o_ub=0, .pairs[0] =
{.disp = 0, .type = (Simpletype) SIMPLE_CHAR }};
Type... |
jingxianwen/E3SM | cime/src/externals/pio2/src/clib/pioc_support.c | <reponame>jingxianwen/E3SM
/** @file
* Support functions for the PIO library.
*/
#include "config.h"
#if PIO_ENABLE_LOGGING
#include <stdarg.h>
#include <unistd.h>
#endif /* PIO_ENABLE_LOGGING */
#include <pio.h>
#include <pio_internal.h>
#include <execinfo.h>
/** This is used with text decomposition files. */
#def... |
jingxianwen/E3SM | cime/src/externals/pio2/tests/cunit/test_iosystem2_simple2.c | <gh_stars>1-10
/*
* Tests the PIO library with multiple iosysids in use at the
* same time.
*
* This is a simplified, C version of the fortran pio_iosystem_tests2.F90.
*
* @author <NAME>
*/
#include <config.h>
#include <pio.h>
#include <pio_tests.h>
/* The number of tasks this test should run on. */
#define TAR... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/handles.c | <gh_stars>1-10
/*
* 5/20/2005 RML
*
*/
#include "mpiP.h"
#include "type.h"
/*
* handles.c
*
* handle management
* based on code from mpich-1.x/ptrcvt.c
* --> simplified and store item directly in the struct
* rather than as pointer to separately allocated object.
*
* CAVEAT:
* as in mpich-1, storage will... |
jingxianwen/E3SM | cime/src/externals/pio2/src/clib/pio_get_nc.c | <reponame>jingxianwen/E3SM<filename>cime/src/externals/pio2/src/clib/pio_get_nc.c
/**
* @file
* PIO functions to get data.
*
* @author <NAME>
* @date 2016
*
* @see http://code.google.com/p/parallelio/
*/
#include <config.h>
#include <pio.h>
#include <pio_internal.h>
/**
* @addtogroup PIO_get_vars_c Read Stri... |
jingxianwen/E3SM | cime/src/externals/pio2/examples/basic/wstest.c | #include <stdio.h>
#include <stdlib.h>
#include <pio.h>
#include <mpi.h>
int main(int argc, char *argv[])
{
int mype, npe;
int fh, ierr;
MPI_Comm comm;
int niotasks, stride, base;
int iosysid;
int *iarray;
PIO_Offset *imap;
int nx, ny, nz;
int ncid;
int iotype=PIO_IOTYPE_NETCDF;
int dimids[3], gdim[3];
i... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/collective.c |
#include "mpiP.h"
/*
* COLLECTIVE
*/
FC_FUNC( mpi_barrier , MPI_BARRIER )(int *comm, int *ierror)
{
*ierror=MPI_Barrier( *comm );
}
int MPI_Barrier(MPI_Comm comm )
{
return(MPI_SUCCESS);
}
/*********/
FC_FUNC( mpi_bcast , MPI_BCAST )(void *buffer, int *count, int *datatype,
int *root, int *comm... |
jingxianwen/E3SM | cime/src/externals/pio2/tests/cunit/test_async_perf.c | /*
* This program tests performance of darray writes with async.
*
* @author <NAME>
* @date 5/4/17
*/
#include <config.h>
#include <pio.h>
#include <pio_tests.h>
#include <pio_internal.h>
#include <sys/time.h>
/* The number of tasks this test should run on. */
#define TARGET_NTASKS 4
/* The minimum number of tas... |
jingxianwen/E3SM | cime/src/externals/pio2/cmake/TryHDF5_HAS_SZIP.c | /*
* HDF5 C Test for szip filter
*/
#include "H5pubconf.h"
int main()
{
#if H5_HAVE_FILTER_SZIP==1
return 0;
#else
XXX;
#endif
}
|
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/op.c | <reponame>jingxianwen/E3SM<filename>cime/src/externals/mct/mpi-serial/op.c
#include "mpi.h"
#include "mpiP.h"
/* Because operations based on one processor are essentially no operation,
* all MPI_Ops are handled as null ops. Therefore, returning 0 (OP_NULL)
* suffices here.
*/
FC_FUNC(mpi_op_create, MPI_OP_CREATE)(... |
jingxianwen/E3SM | cime/src/externals/pio1/timing/f_wrappers.c | /*
** $Id: f_wrappers.c,v 1.56 2010-12-29 18:46:42 rosinski Exp $
**
** Author: <NAME>
**
** Fortran wrappers for timing library routines
*/
#include <string.h>
#include <stdlib.h>
#include "private.h" /* MAX_CHARS, bool */
#include "gptl.h" /* function prototypes and HAVE_MPI logic*/
#if ( defined FORTRANCAPS )
... |
jingxianwen/E3SM | cime/src/externals/pio2/cmake/TryNetCDF_PNETCDF.c | <filename>cime/src/externals/pio2/cmake/TryNetCDF_PNETCDF.c
/*
* NetCDF C Test for PnetCDF Support
*/
#include "netcdf_meta.h"
int main()
{
#if NC_HAS_PNETCDF==1
return 0;
#else
XXX;
#endif
}
|
jingxianwen/E3SM | cime/src/externals/pio2/src/clib/pio_file.c | <gh_stars>1-10
/**
* @file
* PIO File Handling
*/
#include <config.h>
#include <pio.h>
#include <pio_internal.h>
#include <uthash.h>
/**
* @defgroup PIO_open_file_c Open a File
* Open an existing netCDF file with PIO in C.
*
* @defgroup PIO_create_file_c Create a File
* Create a new netCDF file with PIO in C.
... |
jingxianwen/E3SM | components/homme/src/arkode/column_linsol.h | /*******************************************************************
* <NAME>
* SMU Mathematics
* Copyright 2017; all rights reserved
* -----------------------------------------------------------------
* This is the header file for a Fortran columnwise linear solver
* package for HOMME+ARKode. This is specifica... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/getcount.c | <gh_stars>1-10
/* getcount.c
*
* 07/2007 JCY
* Functions for count information regarding MPI_Status
*/
#include "type.h"
#include "mpiP.h"
FC_FUNC( mpi_get_count , MPI_GET_COUNT )
(int *status, int *datatype, int *count, int *ierr)
{
*ierr = MPI_Get_count((MPI_Status *)status, *datatype, count);
}
int MPI_... |
jingxianwen/E3SM | cime/src/externals/pio1/pio/rearr_options.h | #ifndef REARR_OPTIONS_H
#define REARR_OPTIONS_H
! communication algorithm options
#define COLLECTIVE 0
#define POINT_TO_POINT 1
#define FLOW_CONTROL 2
! Default values for POINT_TO_POINT and FLOW_CONTROL
#define DEF_P2P_HANDSHAKE .true.
#define DEF_P2P_ISEND .false.
#define DEF_P2P_MAXREQ 64
#endif
|
jingxianwen/E3SM | components/homme/src/arkode/nvector_external.c | /*******************************************************************
* <NAME>
* SMU Mathematics
* Copyright 2010; all rights reserved
*-----------------------------------------------------------------
* This is the implementation file for an implementation
* of the NVECTOR package, specifically suited to interfac... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/type.c | <gh_stars>1-10
/*
* JCY
* 07/2007
* Derived Datatype functions for mpi-serial
*/
#include "type.h"
#include "mpiP.h"
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/*
* NOTES: All MPI_ prefixed (public) functions operate
* using the integer handle for... |
jingxianwen/E3SM | cime/src/externals/mct/mpi-serial/error.c | <gh_stars>1-10
#include "mpiP.h"
/*
* Error handling code
* Just a stub for now to support the MPI interface without actually
* doing anything
*/
int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler handle)
{
return(MPI_SUCCESS);
}
|
gregoryfenton/Minishift-Particle | firmware/MiniShift-Particle.h | <gh_stars>0
#ifndef MINISHIFT_H
#define MINISHIFT_H
class Minishift
{
private:
int data_pin;
int clock_pin;
int latch_pin;
int latch_state;
void startTransaction();
public:
Minishift(int data_pin, int clock_pin, int latch_pin);
void writeColumns(const uint8_t *buf, int len);
void writeColu... |
fsmoke/buzic | fuse.c | <reponame>fsmoke/buzic
#include <avr/io.h>
FUSES = {
//All bits are clear
.low = 0xFF,
.high = HFUSE_DEFAULT,
.extended = EFUSE_DEFAULT
};
|
fsmoke/buzic | project.h | <reponame>fsmoke/buzic<filename>project.h
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
#include <stdbool.h>
//set bit - using bitwise OR operator
#define sbi(x,y) x |= _BV(y)
//clear bit - using bitwise AND operator
#define cbi(x,y) x &= ~(_BV(y))
//toggle bit - using bitwise XOR operator
#define t... |
fsmoke/buzic | timer1_ticks.h | <reponame>fsmoke/buzic
#ifndef TIMER1_TICKS_H_INCLUDED
#define TIMER1_TICKS_H_INCLUDED
#define MS_DIVIDER 4
#define CTC_MATCH_OVERFLOW ((F_CPU / 1000) / (8 * MS_DIVIDER))
void timer1_ticks_init();
unsigned long ticks();
#endif // TIMER1_TICKS_H_INCLUDED
|
fsmoke/buzic | music.c | <reponame>fsmoke/buzic<filename>music.c<gh_stars>1-10
#include <avr/io.h>
#include "project.h"
#include "music.h"
#define BUZ_PIN PB3
void timer2_buzzer_init()
{
PORTB=0x00;
cbi(DDRB, BUZ_PIN);
TCCR2A = _BV(COM2A0) | _BV(WGM21);
OCR2A = 0;
}
void play_music_note(uint16_t note)
{
if... |
captainwong/Tools | time/CurrentTimeDlg.h | #pragma once
// CurrentTimeDlg dialog
class CurrentTimeDlg : public CDialogEx
{
DECLARE_DYNAMIC(CurrentTimeDlg)
public:
CurrentTimeDlg(CWnd* pParent = nullptr); // standard constructor
virtual ~CurrentTimeDlg();
// Dialog Data
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_DIALOG_CURRENT_TIME };
#endif
protected:
... |
captainwong/Tools | time/resource.h | <reponame>captainwong/Tools<filename>time/resource.h
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by time.rc
//
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_TIME_DIALOG ... |
captainwong/Tools | time/ToTimestampDlg.h | #pragma once
// ToTimestampDlg dialog
class ToTimestampDlg : public CDialogEx
{
DECLARE_DYNAMIC(ToTimestampDlg)
public:
ToTimestampDlg(CWnd* pParent = nullptr); // standard constructor
virtual ~ToTimestampDlg();
// Dialog Data
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_DIALOG_TO_TIMESTAMP };
#endif
protected:
... |
captainwong/Tools | FileExplorerHelper/resource.h | <filename>FileExplorerHelper/resource.h<gh_stars>0
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by FileExplorerHelper.rc
//
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_FILEEXPLORERHELP... |
captainwong/Tools | putty_launcher_MFC/putty_launcher_MFC.h | <filename>putty_launcher_MFC/putty_launcher_MFC.h
// putty_launcher_MFC.h : main header file for the PROJECT_NAME application
//
#pragma once
#ifndef __AFXWIN_H__
#error "include 'stdafx.h' before including this file for PCH"
#endif
#include "resource.h" // main symbols
#include <unordered_map>
#include <string>... |
captainwong/Tools | HashTool/HashTool.h | <filename>HashTool/HashTool.h
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_HashTool.h"
class HashTool : public QMainWindow
{
Q_OBJECT
public:
HashTool(QWidget *parent = Q_NULLPTR);
private:
Ui::HashToolClass ui;
};
|
captainwong/Tools | putty_launcher_MFC/CreateSessionDlg.h | #pragma once
// CCreateSessionDlg dialog
class CCreateSessionDlg : public CDialogEx
{
DECLARE_DYNAMIC(CCreateSessionDlg)
public:
CCreateSessionDlg(CWnd* pParent = nullptr); // standard constructor
virtual ~CCreateSessionDlg();
void setEditMode(SessionPtr session) { this->session = session; }
SessionPtr getS... |
captainwong/Tools | time/FromTimestampDlg.h | <reponame>captainwong/Tools
#pragma once
// FromTimestampDlg dialog
class FromTimestampDlg : public CDialogEx
{
DECLARE_DYNAMIC(FromTimestampDlg)
public:
FromTimestampDlg(CWnd* pParent = nullptr); // standard constructor
virtual ~FromTimestampDlg();
// Dialog Data
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_DIAL... |
captainwong/Tools | HashTool/HashView.h | #pragma once
#include <QtWidgets>
class HashView : public QDialog
{
Q_OBJECT
public:
HashView(QWidget* parent = nullptr);
private slots:
void slot_input_changed();
void slot_algo_changed(int idx);
protected:
void updateOutput(int algoIdx, const QString& input);
private:
QPlainTextEdit * input_ = {};
QComboB... |
captainwong/Tools | time/CalcDlg.h | <reponame>captainwong/Tools
#pragma once
// CalcDlg dialog
class CalcDlg : public CDialogEx
{
DECLARE_DYNAMIC(CalcDlg)
public:
CalcDlg(CWnd* pParent = nullptr); // standard constructor
virtual ~CalcDlg();
// Dialog Data
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_DIALOG_CALC };
#endif
protected:
virtual void D... |
captainwong/Tools | putty_launcher_MFC/putty_launcher_MFCDlg.h | <filename>putty_launcher_MFC/putty_launcher_MFCDlg.h<gh_stars>0
// putty_launcher_MFCDlg.h : header file
//
#pragma once
#include <json/jsoncpp-stdafx/json.h>
// CputtylauncherMFCDlg dialog
class CputtylauncherMFCDlg : public CDialogEx
{
// Construction
public:
CputtylauncherMFCDlg(CWnd* pParent = nullptr); // s... |
raphael-lesmana/bibaugust | load.c | <reponame>raphael-lesmana/bibaugust
#include "main.h"
int hitungBaris(char *filename)
{
FILE *dbFile = fopen(filename, "r");
int counter = 0;
char tmp;
while ((tmp = fgetc(dbFile)) != EOF)
{
if (tmp == '\n')
{
counter++;
}
}
fclose(dbFil... |
raphael-lesmana/bibaugust | main.c | <reponame>raphael-lesmana/bibaugust
#include "main.h"
int main(void)
{
int jumlahBuku = hitungBaris("db.txt");
Buku *daftarBuku = malloc(jumlahBuku * sizeof(Buku));
Buku *daftarBukuUnsorted = malloc(jumlahBuku * sizeof(Buku));
if (daftarBuku == NULL)
{
fprintf(stderr, "Telah terjadi kesala... |
raphael-lesmana/bibaugust | main.h | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <time.h>
typedef struct Buku
{
char judul[128];
int tahunTerbit;
char penulis[64];
int halaman;
double berat;
long long int isbn;
float rating;
bool dipinjam;
}
Buku;
typedef str... |
raphael-lesmana/bibaugust | tools.c | <gh_stars>0
#include "main.h"
void hapusBuku(Buku **daftarBuku, int *jumlahBuku)
{
int indexHapus = 0;
char judul[128];
printf("Masukkan nama buku yang ingin dihapus: ");
scanf("%[^\n]", judul);
getchar();
if ((indexHapus = binarySearch(*daftarBuku, judul, 0, *jumlahBuku - 1)) == -1)... |
oskirby/vf-badge | src/schedule.c | /* Scheduling helper library */
#include <vf-badge.h>
/* Update the state machine after a change in uptime. */
void
sched_tick(struct schedule *sched, unsigned long uptime)
{
const struct state *state = &sched->sm[sched->state];
/* Check for state timeouts. */
if (state->duration && (uptime >= (sched->sta... |
oskirby/vf-badge | src/morse.c | <filename>src/morse.c
#include <vf-badge.h>
#define DOT 0
#define DASH 1
#define MORSE_INDEX(_c_) ((_c_) & ~0x20)
/* Variadic macro voodoo for morse encoding. */
#define MORSE_ENCODE1(n0) {.len = 1, .code = n0<<0}
#define MORSE_ENCODE2(n0, n1) {.len = 2, .c... |
oskirby/vf-badge | src/leds.c | <reponame>oskirby/vf-badge<gh_stars>0
/* Driver for the PWM dimmable LEDs */
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/timer.h>
#include <vf-badge.h>
#define LED_TIMER_RCC RCC_LPTIM1
#define LED_TIMER LPTIM1_BASE
#define PORT_LED GPIOA
#define PIN_LED_... |
oskirby/vf-badge | src/vf-badge.h | /* Project header for the VF badge */
#include <stdint.h>
void apa102_setup(void);
void apa102_write_rgb(uint8_t red, uint8_t green, uint8_t blue, uint8_t value);
void apa102_write_hsv(unsigned int hue, uint8_t saturation, uint8_t value);
void led_setup(void);
void led_set_right(uint8_t value);
void led_set_left(uint... |
oskirby/vf-badge | src/at42qt1070.c | /* Driver for the AT42QT1070 Capacative touch controller. */
#include <string.h>
#include <stdlib.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/i2c.h>
#include <libopencm3/stm32/gpio.h>
#include "vf-badge.h"
/*---------------------------------------------------------
* AT42QT1070 Capacative Touch ... |
oskirby/vf-badge | vf-badge.c | #include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/exti.h>
#include <libopencm3/stm32/rtc.h>
#include <libopencm3/cm3/scb.h>
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/cm3/cortex.h>
#include "vf-badge.h"
/* Very gross and I fe... |
oskirby/vf-badge | src/apa102.c | <gh_stars>0
/* Driver for the APA102 serial controllable LED */
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/usart.h>
#include "vf-badge.h"
#define APA102_PORT GPIOA
#define APA102_PIN_VREG GPIO0
#define APA102_PIN_TX GPIO2
#define APA102_PIN_CLK ... |
jltsiren/relative-fm | relative_fm.h | <reponame>jltsiren/relative-fm<gh_stars>10-100
/*
Copyright (c) 2015, 2016, 2017 Genome Research Ltd.
Copyright (c) 2014 <NAME>
Author: <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... |
jltsiren/relative-fm | new_relative_lcp.h | <gh_stars>10-100
/*
Copyright (c) 2015, 2016, 2017 Genome Research Ltd.
Author: <NAME> <<EMAIL>>
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 l... |
jltsiren/relative-fm | utils.h | <filename>utils.h
/*
Copyright (c) 2015, 2016, 2017 Genome Research Ltd.
Copyright (c) 2014 <NAME>
Author: <NAME> <<EMAIL>>
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 res... |
jltsiren/relative-fm | support.h | /*
Copyright (c) 2015, 2016, 2017 Genome Research Ltd.
Copyright (c) 2014 <NAME>
Author: <NAME> <<EMAIL>>
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, includin... |
jltsiren/relative-fm | simple_fm.h | /*
Copyright (c) 2015, 2016, 2017 Genome Research Ltd.
Copyright (c) 2014 <NAME>
Author: <NAME> <<EMAIL>>
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, includin... |
jltsiren/relative-fm | relative_cst.h | /*
Copyright (c) 2015, 2016, 2017 Genome Research Ltd.
Author: <NAME> <<EMAIL>>
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 rig... |
wangrui449966/Vrep_PCD | CPP_Proj/wr_vrep.h | <reponame>wangrui449966/Vrep_PCD
#pragma once
typedef class
{
public:
bool inited;
int clientID;
int vrep_init();
void set_point_cloud(unsigned long size, float* buff);
}c_wr_vrep_t;
extern c_wr_vrep_t c_wr_vrep; |
rszengin/ompl | src/ompl/geometric/planners/rlrt/BiRLRT.h | /*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2015, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following con... |
Cc618/OctOs | src/kernel/std/algorithm.h | <gh_stars>1-10
#pragma once
// Algorithms implementation
namespace std
{
// Maximum of 2 values
template <typename T>
inline T max(const T &FIRST, const T &SECOND)
{
if (FIRST > SECOND)
return FIRST;
return SECOND;
}
// Minimum of 2 values
template <typename T... |
Cc618/OctOs | src/kernel/std/err.h | #pragma once
// To handle errors
#include <std/types.h>
namespace std
{
enum error
{
// Pointer with null usage
MEM_NULLPTR,
// Can't access desired memory location / forbidden address
MEM_OVERFLOW,
// Not enough memory to allocate data
MEM_ALLOC,
// Invalid data to deallocate
MEM_DALLOC,
};
//... |
Cc618/OctOs | src/kernel/std/cmd.h | #pragma once
// To handle system's commands
#include <std/types.h>
#include <std/String.h>
namespace std
{
// Evaluates the current user input as a command
void evalCommand();
// Displays the header before user input
void displayShellInput();
// Processes a line of command
void processCommand(... |
Cc618/OctOs | src/kernel/std/Array.h | <gh_stars>1-10
#pragma once
// A static array, this array can be reallocated with a different size
#include <std/types.h>
#include <std/io.h>
#include <std/mem.h>
#include <std/err.h>
#include <std/algorithm.h>
// This class was initialy from my GitHub project Cc Collections : https://github.com/Cc618/Cc-Collections... |
Cc618/OctOs | src/kernel/std/io.h | #pragma once
// IO related functions
#include <std/types.h>
#include <std/String.h>
#include <std/globals.h>
namespace std
{
// VGA colors
namespace col
{
constexpr byte BLACK = 0;
constexpr byte BLUE = 1;
constexpr byte GREEN = 2;
constexpr byte CYAN = 3;
constexpr byte RED = 4;
constexp... |
Cc618/OctOs | src/kernel/std/types.h | #pragma once
// All typedefs
namespace std
{
// Numeric //
typedef unsigned char u8;
typedef signed char i8;
typedef unsigned short u16;
typedef signed short i16;
typedef unsigned int u32;
typedef signed int i32;
// Memory //
typedef u32 size_t;
typedef size_t sz;
typedef u8 byte;
type... |
Cc618/OctOs | src/kernel/drivers/interrupts.h | #pragma once
// Inits the IDT
void initInterrupts();
|
Cc618/OctOs | src/kernel/drivers/ports.h | #pragma once
#include <std/types.h>
// Constants
namespace port
{
//// VGA ////
// Selects the vga register to set
constexpr std::u16 VGA_SELECT = 0x3D4;
// Set the selected vga register value
constexpr std::u16 VGA_DATA = 0x3D5;
//// Keyboard ////
// Keyboard IO
constexpr std::u16 KEYBOARD = 0x60;
} // name... |
Cc618/OctOs | src/kernel/drivers/keyboard.h | #pragma once
#include <std/types.h>
typedef std::byte key_t;
// When there is a keyboard event
void onKeyInterrupt();
|
Cc618/OctOs | src/kernel/std/Stream.h | #pragma once
// Streams (only output)
#include <std/types.h>
namespace std
{
class String;
// Classes //
class Stream
{
public:
// !!! Avoid using default constructor
Stream();
Stream(void (*onStreamOutput)(Stream&, const String&), void (*onStreamCharOutput)(Stream&, cons... |
Cc618/OctOs | src/kernel/std/globals.h | <filename>src/kernel/std/globals.h
#pragma once
// To handle global variables
#include <std/types.h>
#include <std/Stream.h>
namespace std
{
// Init all global variables
void initGlobals();
}
|
Cc618/OctOs | src/kernel/std/String.h | <reponame>Cc618/OctOs
#pragma once
// String class
#include <std/types.h>
#include <std/Stream.h>
namespace std
{
template <typename T>
class Array;
class String
{
public:
// Constructors //
String();
explicit String(const sz SIZE);
String(cstr data);
Stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.