repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
Tomas-Jakubec/GTMesh | src/GTMesh/Macros/MacroForEach.h | #ifndef MACROFOREACH_H
#define MACROFOREACH_H
/*
* Macros FOR_EACH are supposed to repeat
* any other macro for each argument passed through
* variadic parameters.
*/
#ifdef _MSC_VER
#define UNFOLD(folded_va_args) folded_va_args
#define FOR_EACH_RSEQ_N 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25... |
Tomas-Jakubec/GTMesh | src/GTMesh/Traits/TraitsAlgorithm/TraitsAlgorithm.h | <reponame>Tomas-Jakubec/GTMesh<filename>src/GTMesh/Traits/TraitsAlgorithm/TraitsAlgorithm.h
#ifndef TRAITSALGORITHM_H
#define TRAITSALGORITHM_H
#include "../Traits.h"
#include "../CustomTypeTraits.h"
#include <limits>
#include <cmath>
#include <algorithm>
/**
* The TraitsAlhorithm is an extension of Traits. It provi... |
Tomas-Jakubec/GTMesh | src/GTMesh/NumericStaticArray/InlineArrayOperations.h | <gh_stars>0
#ifndef INLINE_ARRAY_OPERATIONS_H
#define INLINE_ARRAY_OPERATIONS_H
template <unsigned int N, typename Real>
struct inlineScalarProduct {
static inline Real computation(const Real *x, const Real *y){
return inlineScalarProduct<N-1, Real>::computation(x, y) + x[N-1] * y[N-1];
}
};
templat... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshFunctions/MeshApply.h | #ifndef MESHAPPLY_H
#define MESHAPPLY_H
#include "../MeshElements/MeshElements.h"
#include <functional>
namespace Impl {
template <unsigned int CurrentDimension, unsigned int StartDimension, unsigned int TargetDimension, unsigned int MeshDimension, bool End, bool Descend>
struct MeshRun {
template<typename Func... |
Tomas-Jakubec/GTMesh | src/GTMesh/Traits/MemberAccess/GetSetAccess.h | #ifndef GETSETACCESS_H
#define GETSETACCESS_H
#include "../FunctionTraits.h"
#include "AccessType.h"
#include <functional>
#include <type_traits>
namespace Impl {
struct empty
{};
template<class GetFunctor, typename Class = void>
struct GetAccess : public ConstGetAccess
{
#if __cplusplus <= 201702L // standard c++14 ... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshIO/MeshNativeType.h | #ifndef MESHNATIVETYPE_H
#define MESHNATIVETYPE_H
template <unsigned int MeshDimension>
struct MeshNativeType{
enum ElementType{
POLYTOPE = 1000
};
};
//! Element types of GTMesh in 2D mesh
template<>
struct MeshNativeType<2>{
enum ElementType{
LINE = 100,
TRIANGLE = 200,
QU... |
Tomas-Jakubec/GTMesh | src/GTMesh/BinarySerializer/BinarySerializer.h | <filename>src/GTMesh/BinarySerializer/BinarySerializer.h
#ifndef BINARYSERIALIZER_H
#define BINARYSERIALIZER_H
#include <vector>
#include <cstdint>
#include <fstream>
// TODO možná změnit jméno
/**
* @brief The BinarySerializer class holds binary array and is able to
* store binary data as well as serialize and dese... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/Printers/PrintTraitedClass.h | #ifndef PRINTTRAITEDCLASS_H
#define PRINTTRAITEDCLASS_H
#include "../VariableExport.h"
struct PrintTraitedClass {
template<typename T, typename TraitsIO, unsigned int Index = 0, bool = Index == TraitsIO::size() - 1>
struct PrintClass{
static void print(std::ostream& ost, const T &traitedClass, const T... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/Printers/PrintIterable.h | <filename>src/GTMesh/Debug/Printers/PrintIterable.h
#ifndef PRINTITERABLE_H
#define PRINTITERABLE_H
#include "../VariableExport.h"
#include <GTMesh/Traits/CustomTypeTraits.h>
struct PrintIterable {
template<typename T>
using isIterable = std::enable_if_t < IsIterable<T>::value, bool >;
template< typename... |
Tomas-Jakubec/GTMesh | tests/UnstructuredMesh/MeshSetup.h | <gh_stars>0
// Test of several arithmetic operations
#include "GTMesh/UnstructuredMesh/UnstructuredMesh.h"
template <unsigned int ...Reserve>
void cube(UnstructuredMesh<3, size_t, double, Reserve...>& mesh3){
mesh3.getVertices().push_back({0, {0,0,0}});
mesh3.getVertices().push_back({1, {1,0,0}});
... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshIO/MeshReader/VTKMeshReader.h | <gh_stars>0
#ifndef VTKMESHREADER_H
#define VTKMESHREADER_H
#include "MeshReader.h"
#include "../../MeshDataContainer/MeshDataContainer.h"
#include "../../MeshElements/MeshElements.h"
#include <istream>
#include <string>
#include <unordered_map>
#include <map>
#include <algorithm>
/**
*
*/
template<unsigned int Mes... |
Tomas-Jakubec/GTMesh | src/GTMesh/BinarySerializer/Serializers/SerializeIterable.h | #ifndef SERIALIZEITERABLE_H
#define SERIALIZEITERABLE_H
#include <GTMesh/Traits/CustomTypeTraits.h>
#include "../BinarySerializer.h"
struct SerializeIterable {
template <typename T, typename ..., std::enable_if_t<IsIterable<T>::value, bool> = true>
static void serialize(std::vector<unsigned char>& dataContaine... |
Tomas-Jakubec/GTMesh | src/GTMesh/Utils/ClassSelector.h | #ifndef CLASSSELECTOR_H
#define CLASSSELECTOR_H
#include <type_traits>
template<typename VarType, template<typename, typename> class Condition, typename Class, typename... Printers>
struct ClassSelector : public std::conditional_t<Condition<VarType, Class>::value,
Clas... |
Tomas-Jakubec/GTMesh | src/GTMesh/Traits/CustomTypeTraits.h | #ifndef CUSTOMTRAITS_H
#define CUSTOMTRAITS_H
#include <iostream>
#include <type_traits>
namespace Impl {
template<typename... T> struct make_void {
using type = void;
};
template<typename... T>
using void_t = typename make_void<T...>::type;
template<typename... T> struct make_bool {
using type = bool;
};
t... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/JSONLogger.h | #ifndef JSONLOGGER_H
#define JSONLOGGER_H
#include <string>
#include <fstream>
#include "VariableExport.h"
#include <iostream>
#include <iomanip>
/**
* @brief The JSONLogger class
* has opened file to write log
* if it opens existing file overwrites it.
* in destructor it closes the file.
*/
class JSONLogger {
... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshIO/MeshReader/FPMAMeshReader.h | #ifndef FPMAMESHREADER_H
#define FPMAMESHREADER_H
#include "MeshReader.h"
#include "../../MeshElements/MeshElements.h"
#include <iostream>
#include <unordered_map>
template <unsigned int MeshDimension>
class FPMAMeshReader : public MeshReader<MeshDimension>{
};
template <>
class FPMAMeshReader<3> : public MeshReader<... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshDataContainer/MeshDataIO/VTKMeshDataReader.h | #ifndef VTKMESHDATAREADER_H
#define VTKMESHDATAREADER_H
#include "../../../Traits/Traits.h"
#include "../../../Utils/ConstexprFor.h"
#include "../../../Traits/CustomTypeTraits.h"
#include "../MeshDataContainer.h"
#include "../../../Debug/Debug.h"
#include <istream>
#include <map>
#include <sstream>
template <unsigned ... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshFunctions/CellsDistance.h | <filename>src/GTMesh/UnstructuredMesh/MeshFunctions/CellsDistance.h
#ifndef CELLSDISTANCE_H
#define CELLSDISTANCE_H
#include "../../NumericStaticArray/Vector.h"
#include "../MeshDataContainer/MeshDataContainer.h"
#include "../MeshElements/MeshElements.h"
#include "MeshApply.h"
#include <map>
#include <set>
#include <va... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/HTMLLogger.h | <filename>src/GTMesh/Debug/HTMLLogger.h
#ifndef HTMLLOGGER_H
#define HTMLLOGGER_H
#include "VariableExport.h"
#include <iostream>
#include <fstream>
#include <string>
/**
* @brief The HtmlLogger class
* has opened file to write log
* if it opens existing file overwrites it.
* in destructor it closes the file.
*/
... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/Printers/Printers.h | #ifndef PRINTERS_H
#define PRINTERS_H
#include "../VariableExport.h"
class TraitsPrint {
int print(...) {}
template <typename T, std::enable_if_t<HasDefaultIOTraits<T>::value, bool> = true>
void print(const T& var, std::ostream& ost) {
VariableExport<VARIABLE_EXPORT_METHOD_OSTREAM>::PrintClass<>
... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshDataContainer/MeshDataContainerTraits/MeshDataContainerTraits.h | <filename>src/GTMesh/UnstructuredMesh/MeshDataContainer/MeshDataContainerTraits/MeshDataContainerTraits.h
#ifndef MESHDATACONTAINERTRAITS_H
#define MESHDATACONTAINERTRAITS_H
#include "../MeshDataContainer.h"
#include <GTMesh/Traits/Traits.h>
template <typename T, unsigned int ...dims>
class Traits<MeshDataContainer<T... |
Tomas-Jakubec/GTMesh | src/GTMesh/Singleton/Singleton.h | #ifndef SINGLETON_H
#define SINGLETON_H
#include <type_traits>
#include <memory>
/**
* @brief The Singleton class
*/
template<class Class>
class Singleton {
//static_assert (std::is_trivially_constructible<Class>::value, "The class in singleton must be trivially constructible.");
public:
static Class& getIn... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/Debug.h | <reponame>Tomas-Jakubec/GTMesh
#ifndef DEBUG_H
#define DEBUG_H
#ifndef UNDEBUG
#include "../Macros/MacroForEach.h"
#include <iostream>
#include "HTMLLogger.h"
#include "JSONLogger.h"
#include "ConsoleLogger.h"
#include "../Singleton/Singleton.h"
#include <stdexcept>
/*
** Macros intended for sending
** messages during... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshFunctions/GetCenters.h | #ifndef GETCENTERS_H
#define GETCENTERS_H
#include "MeshFunctionsDefine.h"
#include "../MeshDataContainer/MeshDataContainer.h"
#include "../../NumericStaticArray/GramSchmidt.h"
#include <array>
namespace Impl {
template < unsigned int Dimension, unsigned int CurrentDimension, unsigned int MeshDimension >
struct GetCen... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshFunctions/ComputeCenters.h | #ifndef COMPUTECENTER_H
#define COMPUTECENTER_H
#include "MeshFunctionsDefine.h"
#include "MeshApply.h"
#include "../MeshDataContainer/MeshDataContainer.h"
#include "../../NumericStaticArray/GramSchmidt.h"
#include <array>
namespace Impl {
template <unsigned int CurrentDimension, unsigned int MeshDimension, Comput... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/Printers/PrintCustom.h | #ifndef PRINTCUSTOM_H
#define PRINTCUSTOM_H
#include "../VariableExport.h"
#include <GTMesh/Traits/CustomTypeTraits.h>
/**
* @brief Prints an object with defined PrintTo
* function.
*/
struct PrintCustom {
template <typename T>
using IsPrintableToStream = Impl::void_t<decltype(PrintTo(std::declval<const T&... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshFunctions/ComputeNormals.h | <filename>src/GTMesh/UnstructuredMesh/MeshFunctions/ComputeNormals.h<gh_stars>0
#ifndef COMPUTENORMALS_H
#define COMPUTENORMALS_H
#include "../MeshElements/MeshElements.h"
#include "../MeshDataContainer/MeshDataContainer.h"
#include "../../NumericStaticArray/Vector.h"
#include "../../NumericStaticArray/GramSchmidt.h"
... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/Printers/PrintExportable.h | #ifndef PRINTEXPORTABLE_H
#define PRINTEXPORTABLE_H
#include <type_traits>
#include "../VariableExport.h"
struct PrintExportable {
/**
* Prints the variable with. Valid if the
* type T has overaloaded the operator<<
* for ostream.
*/
template <typename T, std::enable_if_t<IsExportable<T>::... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshElements/ComputationalySignificantElement.h | #ifndef COMPUTATIONALY_SIGNIFICANT_ELEMENT_H
#define COMPUTATIONALY_SIGNIFICANT_ELEMENT_H
#include "../../NumericStaticArray/Vertex.h"
template <unsigned int MeshDim, typename Real>
class ComputationallySignificantElement
{
protected:
Vertex<MeshDim, Real> center;
int flag;
public:
ComputationallySignifica... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/Printers/PrintTuple.h | <reponame>Tomas-Jakubec/GTMesh
#ifndef PRINTTUPLE_H
#define PRINTTUPLE_H
#include "../VariableExport.h"
#include <GTMesh/Utils/ConstexprFor.h>
/**
* @brief Provides functions that prints std::pair and std::tuple similarly to the python.
*/
struct PrintTuple {
/**
* @brief Python-like print of dictionary pair... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/Printers/PrintAny.h | <gh_stars>0
#ifndef PRINTANY_H
#define PRINTANY_H
#include <iomanip>
struct PrintAny {
template <typename T>
static void print(std::ostream& ost, const T& var, ...) {
ost << typeid (T).name() << "(";
ost << std::hex;
for (char* byte = (char*)&var; byte < (char*)&var + sizeof (T); byte+... |
Tomas-Jakubec/GTMesh | src/GTMesh/Traits/Interfaces/InterfaceCompact.h | #ifndef INTERFACECOMPACT_H
#define INTERFACECOMPACT_H
#include <type_traits>
#include "../CustomTypeTraits.h"
namespace Interface {
/**
* Generic template for compact interface
*/
namespace Impl {
template<typename T>
struct IsSimpleSerializable
: public std::conditional<std::is_arithmetic<T>::value || std::is_e... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshDataContainer/MeshDataContainerTraits/MeshDataContainerArithmeticTraits.h | <reponame>Tomas-Jakubec/GTMesh
#ifndef MESHDATACONTAINERARITHMETICTRAITS_H
#define MESHDATACONTAINERARITHMETICTRAITS_H
#include "MeshDataContainerTraits.h"
template <typename T, unsigned int ...dims>
class DefaultArithmeticTraits<MeshDataContainer<T, dims...>> {
public:
using traitsType = Traits<MeshDataContainer<... |
Tomas-Jakubec/GTMesh | src/GTMesh/BinarySerializer/Serializers/SerializeCustom.h | #ifndef SERIALIZECUSTOM_H
#define SERIALIZECUSTOM_H
#include "../BinarySerializer.h"
#include <GTMesh/Traits/CustomTypeTraits.h>
struct SerializeCustom {
template <typename T>
using IsBitviseSerializable = Impl::void_t<decltype(BinarySerialize(std::declval<BinarySerializer::ByteContainer&>(), std::declval<con... |
Tomas-Jakubec/GTMesh | src/GTMesh/BinarySerializer/Serializers/SerializeCompactContainer.h | <filename>src/GTMesh/BinarySerializer/Serializers/SerializeCompactContainer.h
#ifndef SERIALIZECOMPACTCONTAINER_H
#define SERIALIZECOMPACTCONTAINER_H
#include <GTMesh/Traits/CustomTypeTraits.h>
#include "../BinarySerializer.h"
#include "SerializeSimple.h"
#include <GTMesh/Debug/Debug.h>
#include <cstring> // memcpy
#in... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshDataContainer/MeshDataIO/VTKMeshDataWriter.h | #ifndef VTKMESHDATAWRITER_H
#define VTKMESHDATAWRITER_H
#include "../../../Traits/Traits.h"
#include "../../../Traits/CustomTypeTraits.h"
#include "../MeshDataContainer.h"
#include "../../../Debug/Debug.h"
#include "../../MeshIO/MeshWriter/VTKMeshWriter.h"
#include <GTMesh/Debug/Printers/PrintTraitedClass.h>
#include <... |
Tomas-Jakubec/GTMesh | src/GTMesh/Traits/MemberAccess/AccessType.h | <filename>src/GTMesh/Traits/MemberAccess/AccessType.h
#ifndef ACCESSTYPE_H
#define ACCESSTYPE_H
#include <type_traits>
/**
* @brief The DirectAccess struct determines that the
* reference can provide direct approach to the member.
*/
struct DirectAccess{
static constexpr bool is_direct = true;
};
/**
* @brief... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/Printers/PrintText.h | #ifndef PRINTTEXT_H
#define PRINTTEXT_H
#include <GTMesh/Traits/CustomTypeTraits.h>
struct PrintText {
template<typename T>
using isTextType = std::enable_if_t < std::is_same<T, std::string>::value ||
std::is_same<T, const char*>::value ||
... |
Tomas-Jakubec/GTMesh | src/GTMesh/BinarySerializer/Serializers/SerializeTuple.h | #ifndef SERIALIZETUPLE_H
#define SERIALIZETUPLE_H
#include "../BinarySerializer.h"
#include <GTMesh/Utils/ConstexprFor.h>
#include <tuple>
struct SerializeTuple {
/**
* @brief Python-like print of dictionary pair of key and value.
*/
template<typename T1, typename T2>
static void serialize(Binar... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshFunctions/ComputeCellsCenterDifference.h | #ifndef COMPUTECENTERDIFFERENCE_H
#define COMPUTECENTERDIFFERENCE_H
#include "../../NumericStaticArray/Vector.h"
#include "../MeshDataContainer/MeshDataContainer.h"
#include "../MeshElements/MeshElements.h"
#include "MeshApply.h"
#include <map>
#include <set>
#include <valarray>
template<unsigned int Dimension, typena... |
Tomas-Jakubec/GTMesh | src/GTMesh/BinarySerializer/Serializers/SerializeTraitedClass.h | <gh_stars>0
#ifndef SERIALIZETRAITEDCLASS_H
#define SERIALIZETRAITEDCLASS_H
#include <GTMesh/Utils/ConstexprFor.h>
#include <GTMesh/Traits/Traits.h>
#include <GTMesh/Traits/TraitsBind/TraitsBind.h>
#include "../BinarySerializer.h"
struct SerializeTraitedClass{
protected:
// Helper functions serializing the instan... |
Tomas-Jakubec/GTMesh | src/GTMesh/NumericStaticArray/Vertex.h | <reponame>Tomas-Jakubec/GTMesh
#ifndef VERTEX_H
#define VERTEX_H
#include <math.h>
#include <iostream>
#include <initializer_list>
#include "InlineArrayOperations.h"
#include <array>
template <unsigned int Dim, typename Real = double>
class Vertex : public std::array<Real, Dim> {
public:
Vertex() = default;
... |
Tomas-Jakubec/GTMesh | src/GTMesh/Traits/TraitsBind/TraitsBind.h | #ifndef TRAITSBIND_H
#define TRAITSBIND_H
#include "../Traits.h"
/**
* @brief Non-owning container binding an object to its Traits.
* It is possible to setup more than one Traits in case of
* deeper structure of the object, i.e., it has members with
* another Traits assigned.
*/
template <typename Class, typename... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshFunctions/EdgesOrientation.h | <filename>src/GTMesh/UnstructuredMesh/MeshFunctions/EdgesOrientation.h
#ifndef EDGESORIENTATION_H
#define EDGESORIENTATION_H
#include "../MeshElements/MeshElements.h"
#include "../MeshDataContainer/MeshDataContainer.h"
#include "../../NumericStaticArray/Vector.h"
#include "../../Debug/Debug.h"
#include "MeshApply.h"
#i... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshFunctions/MeshFunctionsDefine.h | #ifndef MESHFUNCTIONSDEFINE_H
#define MESHFUNCTIONSDEFINE_H
#include <utility>
/**
* @brief The Order enum declares the order of indexes.
* The order can be ascend or original.
*/
enum Order{
ORDER_ASCEND,
ORDER_ORIGINAL
};
/**
* @brief The ComputationMethod enum declares the method
* to be used in mesh ... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshDataContainer/MeshDataContainer.h | <reponame>Tomas-Jakubec/GTMesh<filename>src/GTMesh/UnstructuredMesh/MeshDataContainer/MeshDataContainer.h
#ifndef MESHDATACONTAINER_H
#define MESHDATACONTAINER_H
#include "../MeshElements/MeshElements.h"
// TODO move
/**
* @brief The DimensionPos struct
* realizes the method indexof in the parameter pack @a Dimensi... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/UnstructuredMeshDefine.h | #ifndef UNSTRUCTED_MESH_DEFINE_H
#define UNSTRUCTED_MESH_DEFINE_H
#include <limits>
#define INVALID_INDEX(IndexType) (std::numeric_limits<IndexType>::max())
#define BOUNDARY_INDEX(IndexType) (static_cast<IndexType>(1) << (std::numeric_limits<IndexType>::digits - 1))
#define EXTRACTING_INDEX(IndexType) (static_cast<Ind... |
Tomas-Jakubec/GTMesh | src/GTMesh/Utils/ConstexprFor.h | <reponame>Tomas-Jakubec/GTMesh
/**
* This file contains the implementation of constexpr for structure.
* This structure is able to unwind a loop at the compile time.
*/
#ifndef CONSTEXPRFOR_H
#define CONSTEXPRFOR_H
#include <utility>
#include <stddef.h>
template <size_t start, size_t stop, size_t step = 1>
class Con... |
Tomas-Jakubec/GTMesh | src/GTMesh/NumericStaticArray/GramSchmidt.h | #ifndef GRAMMSCHMIDT_H
#define GRAMMSCHMIDT_H
#include "Vector.h"
#include <array>
#include <vector>
/**
* @brief GrammSchmidt
* Gramm-Schmidt process without normalization. Can be used to
* calculate volume in any dimension.
* @param vectors [in / out] array containing the vectors to be processed.
* After the ... |
Tomas-Jakubec/GTMesh | src/GTMesh/Traits/Traits.h | #ifndef TRAITS_H
#define TRAITS_H
#include "MemberAccess/MemberAccess.h"
#include <string>
#include <memory>
#include <functional>
/**
*
*/
template<typename Class, typename...RefTypes>
class Traits {
public:
static constexpr bool isTraits = true;
template<unsigned int Index>
using refType = typename st... |
Tomas-Jakubec/GTMesh | src/GTMesh/Debug/ConsoleLogger.h | #ifndef CONSOLELOGGER_H
#define CONSOLELOGGER_H
#include "VariableExport.h"
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#endif
/**
* @brief The ConsoleLogger class
*/
class ConsoleLogger {
bool mColoredOutput = true; //!< If true then the output the variable names and their valu... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshElements/MeshElement.h | #ifndef MESH_ELEMENT_H
#define MESH_ELEMENT_H
#include "../UnstructuredMeshDefine.h"
#include "../../NumericStaticArray/Vertex.h"
#include "CellBoundaryConnection.h"
#include "ComputationalySignificantElement.h"
#include "type_traits"
#include "tuple"
#include <array>
#include <stdexcept>
#include <vector>
/**
* @bri... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshFunctions/MeshColoring.h | #ifndef MESHCOLOURING_H
#define MESHCOLOURING_H
#include "MeshConnections.h"
#include <random>
enum ColoringMethod{
METHOD_GREEDY,
METHOD_RANDOM
};
namespace Impl {
template<unsigned int ColoredDim, unsigned int ConnectingDim, ColoringMethod Method = METHOD_GREEDY, bool Descend = (ColoredDim > ConnectingDim... |
Tomas-Jakubec/GTMesh | src/GTMesh/NumericStaticArray/Vector.h | #ifndef VECTOR_H
#define VECTOR_H
#include "Vertex.h"
template <unsigned int Dim, typename Real = double>
using Vector = Vertex<Dim, Real>;
template <typename Real>
Vector<3, Real> vectorProduct(const Vector<3, Real>& v1, const Vector<3, Real>& v2){
Vector<3,Real> res = {};
res[0] = v1[1]*v2[2] - v1[2]*v2[1... |
Tomas-Jakubec/GTMesh | src/GTMesh/BinarySerializer/Serializers/SerializeIndexable.h | #ifndef SERIALIZEINDEXABLE_H
#define SERIALIZEINDEXABLE_H
#include <GTMesh/Traits/CustomTypeTraits.h>
#include <GTMesh/Traits/Interfaces/InterfaceIndexable.h>
#include "../BinarySerializer.h"
struct SerializeIndexable {
template <typename T, typename ..., std::enable_if_t<Interface::Indexable<T>::value, bool> = t... |
Tomas-Jakubec/GTMesh | src/GTMesh/UnstructuredMesh/MeshElements/CellConnection.h | <filename>src/GTMesh/UnstructuredMesh/MeshElements/CellConnection.h
#ifndef CELLCONNECTION_H
#define CELLCONNECTION_H
#include "../UnstructuredMeshDefine.h"
#include <sstream>
#include <stdexcept>
/**
* @brief The CellConnection class
*/
template<typename IndexType>
class CellConnection {
// Indexes to two cells ... |
Tomas-Jakubec/GTMesh | src/GTMesh/Traits/Interfaces/InterfaceCompactContainer.h | <filename>src/GTMesh/Traits/Interfaces/InterfaceCompactContainer.h<gh_stars>0
#ifndef INTERFACECOMPACTCONTAINER_H
#define INTERFACECOMPACTCONTAINER_H
#include "InterfaceCompact.h"
#include "../CustomTypeTraits.h"
namespace Interface {
template<typename T, typename = void>
struct CompactContainer : public std::false_ty... |
HoanChan/HoanChan.github.io | live/sortviewer/code/Sort.c | <reponame>HoanChan/HoanChan.github.io<filename>live/sortviewer/code/Sort.c
#include<stdio.h>
void swapValue(int arr[], int i, int j)
{
int t = arr[i];
arr[i] = arr[j];
arr[j] = t;
}
void bubbleSort(int arr[], int arrLength)
{
int indexOfLastUnsortedElement = arrLength;
int swapped = 0;
while (... |
albertozeni/PairHMM | src/pairhmm_vecimpl.h | <gh_stars>10-100
#ifndef PAIRHMM_VECIMPL_H
#define PAIRHMM_VECIMPL_H
#include "pairhmm_impl.h"
template <class PRECISION, class DIAGONALS, class CONSTANTS, int VECSIZE = 1>
class PairhmmVecImpl: public PairhmmImpl<PRECISION, DIAGONALS, CONSTANTS, VECSIZE> {
using Base = PairhmmImpl<PRECISION,DIAGONALS,CONSTANTS,VECS... |
albertozeni/PairHMM | src/pairhmm.h | <filename>src/pairhmm.h<gh_stars>10-100
#ifndef PAIRHMM_H
#define PAIRHMM_H
#include <vector>
#include "pairhmm_impl.h"
#include "testcase.h"
template <typename FAST, typename CORRECT>
class Pairhmm {
private:
FAST fast;
CORRECT correct;
public:
std::vector<double> calculate(const Testcase& testcase) {
a... |
albertozeni/PairHMM | src/chronos.h | <reponame>albertozeni/PairHMM
#ifndef CHRONOS_H
#define CHRONOS_H
#include <chrono> // std::chrono for timing benchmarks
class Chronos {
public:
Chronos(void): m_start(now()) { }
void reset(void) {
m_start = now();
}
double elapsed(void) const {
using namespace std::chrono;
... |
albertozeni/PairHMM | src/pairhmm_impl.h | #ifndef PAIRHMM_IMPL_H
#define PAIRHMM_IMPL_H
#include <vector>
#include <cmath>
#include <algorithm>
#include <ostream>
#include <cassert>
#include <limits>
#include "testcase.h"
#include "constants.h"
#include "diagonals.h"
#define P(x) x
namespace constants_with_precision {
template <class T>
static constexp... |
albertozeni/PairHMM | src/constants.h | #ifndef CONSTANTS_H
#define CONSTANTS_H
#include <vector>
#include "read.h"
template<class PRECISION, class ALLOCATOR = std::allocator<PRECISION>>
struct Constants {
Constants(const std::size_t initial_size): mm(initial_size), gm(initial_size), mx(initial_size),
xx(initial_size), my(initial_size), yy(initial_... |
albertozeni/PairHMM | src/pairhmm_sseimpl.h | #ifndef PAIRHMM_SSEIMPL_H
#define PAIRHMM_SSEIMPL_H
#include <xmmintrin.h>
#include "aligned_allocator.h"
#include "pairhmm_impl.h"
class PairhmmSSEFloatImpl: public PairhmmImpl<float, Diagonals3<float, Aligned_allocator<float, 16, 4>>, Constants<float, Aligned_allocator<float, 16, 4>>, 4> {
using Base = PairhmmImpl... |
albertozeni/PairHMM | src/diagonals.h | #ifndef DIAGONALS_H
#define DIAGONALS_H
#include <vector>
#include <iostream>
template<class PRECISION, class ALLOCATOR = std::allocator<PRECISION>>
struct Diagonals3 {
std::vector<PRECISION, ALLOCATOR> m;
std::vector<PRECISION, ALLOCATOR> mp;
std::vector<PRECISION, ALLOCATOR> mpp;
std::vector<PRECISION, ALLO... |
albertozeni/PairHMM | src/aligned_allocator.h | <filename>src/aligned_allocator.h
#ifndef ALIGNED_ALLOCATOR_H
#define ALIGNED_ALLOCATOR_H
#include <stdexcept>
#include <xmmintrin.h>
/**
* Allocator for aligned data.
*
* Modified from the Mallocator from <NAME>.
* <http://blogs.msdn.com/b/vcblog/archive/2008/08/28/the-mallocator.aspx>
* Modified from Gist vers... |
albertozeni/PairHMM | src/pairhmm_scalarimpl.h | <gh_stars>0
#ifndef PAIRHMM_SCALARIMPL_H
#define PAIRHMM_SCALARIMPL_H
#include <xmmintrin.h>
#include "pairhmm_impl.h"
char readable(int n){
if(n==65)
return 'A';
if(n==67)
return 'C';
if(n==71)
return 'G';
if(n==84)
return 'T';
if(n==0)
return 'X';
return 'N';
}
template <class PRECI... |
albertozeni/PairHMM | src/pairhmm_avximpl.h | <reponame>albertozeni/PairHMM
#ifndef PAIRHMM_AVXIMPL_H
#define PAIRHMM_AVXIMPL_H
#include <immintrin.h>
#include "aligned_allocator.h"
#include "pairhmm_impl.h"
class PairhmmAVXFloatImpl: public PairhmmImpl<float, Diagonals3<float, Aligned_allocator<float, 32, 4>>, Constants<float, Aligned_allocator<float, 32, 4>>, ... |
radwulf21/jogo_da_velha | jogo_da_velha.c | #include <stdio.h>
#include <stdlib.h>
#include <locale.h>
/*
-Autor: <NAME>
-Curso: Sistemas de Informação
-2° Semestre
-Instituição: Centro Universiário e Faculdade Projeção
-Jogo da Velha com matrizes.
*/
void estrutura( char mat3[3][3] );
void jogada( int *op, char *ver, int *k );
void result( char mat3[3... |
sharpid/log_helper | sample/usage.h | <reponame>sharpid/log_helper
// careful, this is not compiled
// only sample usage
#pragma once
#include <log_helper.hpp>
#ifdef _STACK_TRACING_
#include <boost/stacktrace.hpp>
#endif
// LoggingLevel
enum class LL : int {
Full = -1,
Debug = 0,
Info,
Warning,
Error,
Fatal,
};
template <typename... Types>
void C... |
piernov/OpenBoardView | src/openboardview/platform.h | <filename>src/openboardview/platform.h
#pragma once
#ifdef _WIN32
#ifdef _MSC_VER // Visual Studio prefixes non-standard C functions with _
#define _CRT_SECURE_NO_WARNINGS 1
#endif // _MSC_VER
#define NTDDI_VERSION NTDDI_VISTA // Not caring about XP. If this is a concern, find a ... |
anson-vandoren/appscope | test/glibcvertest.c | <reponame>anson-vandoren/appscope
#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "test.h"
// secure_getenv (used by libcrypto.a) is using GLIBC_2.17. This is the
// newest glibc symbol that we depend on. This means that we don't expect
// our library to run on anything older... |
anson-vandoren/appscope | src/bashmem.h | <reponame>anson-vandoren/appscope<gh_stars>0
#ifndef __BASHMEM_H__
#define __BASHMEM_H__
int in_bash_process(void);
int func_found_in_executable(const char *symbol);
int run_bash_mem_fix(void);
#endif // __BASHMEM_H__
|
anson-vandoren/appscope | src/utils.h | #ifndef __UTILS_H__
#define __UTILS_H__
#include <time.h>
typedef struct {
const char *str;
unsigned val;
} enum_map_t;
unsigned int strToVal(enum_map_t[], const char *);
const char *valToStr(enum_map_t[], unsigned int);
int checkEnv(char *, char *);
void setPidEnv(int);
char *getpath(const char *);
int st... |
anson-vandoren/appscope | src/transport.h | #ifndef __TRANSPORT_H__
#define __TRANSPORT_H__
#include "scopetypes.h"
typedef struct _transport_t transport_t;
// Constructors Destructors
transport_t* transportCreateUdp(const char *, const char *);
transport_t* transportCreateTCP(const char *, const char *);
transport_t* transportCreateFile(c... |
anson-vandoren/appscope | src/scopeelf.c | <reponame>anson-vandoren/appscope
#define _GNU_SOURCE
#include <dlfcn.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include "dbg.h"
#include "os.h"
#include "scopeelf.h"
#define GOPCLNTAB_MAGIC_112 0xfffffffb
#define GOPCLNTAB_MAGIC_116 0xfffffffa
void
free... |
anson-vandoren/appscope | src/inject.h | <filename>src/inject.h
#ifndef __INJECT_H__
#define __INJECT_H__
#define SHM_NAME_INJECT "libscopea"
#define LIBSCOPE_INJECTED_PATH "/dev/shm/" SHM_NAME_INJECT
void injectScope(int, char*);
#endif |
anson-vandoren/appscope | src/bashmem.c | #define _GNU_SOURCE
#include <dlfcn.h>
#include <elf.h>
#include <malloc.h>
#include "distorm.h"
#include "bashmem.h"
#include "dbg.h"
#include "fn.h"
#include "os.h"
#include "scopetypes.h"
#include "utils.h"
typedef struct {
void *(*malloc)(size_t size);
void *(*realloc)(void *ptr, size_t size);
void (*... |
sumitkanoje/hello-kernel-space-programmings | Hello.c | <reponame>sumitkanoje/hello-kernel-space-programmings
#include <linux/module.h> // included for all kernel modules
#include <linux/kernel.h> // included for KERN_INFO
#include <linux/init.h> // included for __init and __exit macros
MODULE_LICENSE("MIT");
MODULE_AUTHOR("<NAME>");
MODULE_DESCRIPTION("A Simple... |
GalenRhodes/odroid-scripts | Linux-generic/bin/bcnt.c | <reponame>GalenRhodes/odroid-scripts
//
// main.c
// ByteCounter
//
// Created by <NAME> on 7/18/14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#pragma clang diagnostic push
#pragma ide... |
GalenRhodes/odroid-scripts | Developer/objc2.tests/Testing/NFMyObject.h | <reponame>GalenRhodes/odroid-scripts
/***************************************************************************//**
* PROJECT: NiagraFalls
* FILENAME: NFMyObject.h
* IDE: AppCode
* AUTHOR: <NAME>
* DATE: 3/30/16 12:31 PM
* VISIBILITY: Public
* DESCRIPTION:
*
* Copyright © 2016 Pro... |
dmgav/yugabyte-db | src/yb/master/cluster_balance.h | // Copyright (c) YugaByte, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... |
dmgav/yugabyte-db | src/yb/client/async_rpc.h | // Copyright (c) YugaByte, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... |
dmgav/yugabyte-db | src/yb/docdb/pgsql_operation.h | <filename>src/yb/docdb/pgsql_operation.h
// Copyright (c) YugaByte, 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 requir... |
dmgav/yugabyte-db | src/postgres/src/backend/bootstrap/ybcbootstrap.c | <reponame>dmgav/yugabyte-db
/*--------------------------------------------------------------------------------------------------
*
* ybcbootstrap.c
* YB commands for creating and altering table structures and settings
*
* Copyright (c) YugaByte, Inc.
*
* Licensed under the Apache License, Version 2.0 (the... |
dmgav/yugabyte-db | src/yb/yql/pggate/pg_memctx.h | //--------------------------------------------------------------------------------------------------
// Copyright (c) YugaByte, 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
//
// ht... |
dmgav/yugabyte-db | src/yb/yql/pggate/ybc_pg_typedefs.h | <reponame>dmgav/yugabyte-db<filename>src/yb/yql/pggate/ybc_pg_typedefs.h
// Copyright (c) YugaByte, 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... |
dmgav/yugabyte-db | src/yb/master/catalog_manager.h | <gh_stars>1-10
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "Lic... |
ygalanter/vortex | src/main.c | #include <pebble.h>
#include "main.h"
static Window *s_main_window;
// for battery & bt
static GBitmap *battery_sprite = NULL, *bluetooth_sprite = NULL;
static BitmapLayer *s_bitmap_layer;
static GBitmap *s_bitmap = NULL;
// for animation
int frame_no;
int next_delay = 70; // delay between frames in ms
#define ... |
ygalanter/vortex | src/main.h | #include <pebble.h>
// image resources for discharging battery
const int battery_d_res[] = {
RESOURCE_ID_BATTERY_D_0,
RESOURCE_ID_BATTERY_D_10,
RESOURCE_ID_BATTERY_D_20,
RESOURCE_ID_BATTERY_D_30,
RESOURCE_ID_BATTERY_D_40,
RESOURCE_ID_BATTERY_D_50,
RESOURCE_ID_BATTERY_D_60,
RESOURCE_ID_BATTERY_D_70,
R... |
kmzbrnoI/rcs-lib-XpressNET-qt | src/form-signal-edit.h | <reponame>kmzbrnoI/rcs-lib-XpressNET-qt
#ifndef FORMSIGNALEDIT_H
#define FORMSIGNALEDIT_H
#include "signals.h"
#include "ui_signal-edit.h"
#include <QMainWindow>
#include <functional>
namespace SignalEdit {
using EditCallback = std::function<void(RcsXn::XnSignal signal)>;
using TmplStorage = std::map<QString, RcsXn:... |
kmzbrnoI/rcs-lib-XpressNET-qt | src/lib-api.h | #ifndef LIB_API_H
#define LIB_API_H
/* This file deafines prototypes of library API functions. */
#include <QtCore/QtGlobal>
#include "lib-api-common-def.h"
#include "events.h"
namespace RcsXn {
extern "C" {
RCS_XN_SHARED_EXPORT int CALL_CONV LoadConfig(char16_t *filename);
RCS_XN_SHARED_EXPORT int CALL_CONV SaveC... |
kmzbrnoI/rcs-lib-XpressNET-qt | src/signals.h | <reponame>kmzbrnoI/rcs-lib-XpressNET-qt
#ifndef SIGNALS_H
#define SIGNALS_H
#include <QSettings>
#include <QString>
#include <cstddef>
#include <map>
namespace RcsXn {
struct XnSignalTemplate {
std::size_t outputsCount;
std::map<unsigned int, QString> outputs; // scom code -> outputs state
XnSignalTemplate();
X... |
kmzbrnoI/rcs-lib-XpressNET-qt | src/errors.h | #ifndef ERRORS_H
#define ERRORS_H
#define RCS_GENERAL_EXCEPTION (1000)
#define RCS_FT_EXCEPTION (1001) // device is always closed when this exception happens
#define RCS_FILE_CANNOT_ACCESS (1010)
#define RCS_FILE_DEVICE_OPENED (1011)
#define RCS_MODULE_INVALID_ADDR (1100)
#define RCS_MODULE_FAILED (1102)
#define RCS_P... |
kmzbrnoI/rcs-lib-XpressNET-qt | src/lib-api-common-def.h | #ifndef LIB_API_COMMON_DEF_H
#define LIB_API_COMMON_DEF_H
#if defined(RCS_XN_SHARED_LIBRARY)
#define RCS_XN_SHARED_EXPORT Q_DECL_EXPORT
#else
#define RCS_XN_SHARED_EXPORT Q_DECL_IMPORT
#endif
#ifdef Q_OS_WIN
#define CALL_CONV __stdcall
#else
#define CALL_CONV
#endif
#endif
|
kmzbrnoI/rcs-lib-XpressNET-qt | src/settings.h | <reponame>kmzbrnoI/rcs-lib-XpressNET-qt
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QSettings>
#include <QString>
#include <map>
/* This file defines global settings of the application */
using Config = std::map<QString, std::map<QString, QVariant>>;
const Config DEFAULTS {
{"XN", {
{"port", "/dev/ttyUSB0"},... |
kmzbrnoI/rcs-lib-XpressNET-qt | src/rcs-xn.h | #ifndef RCS_XN_H
#define RCS_XN_H
/* This is the main file of RCS-XN library. It defines RcsXn class which holds
* all the library's data.
*/
#include <QCoreApplication>
#include <QMainWindow>
#include <QThread>
#include <QtCore/QtGlobal>
#include <QtGlobal>
#include <array>
#include <map>
#include "events.h"
#inc... |
kmzbrnoI/rcs-lib-XpressNET-qt | lib/q-str-exception.h | #ifndef RCS_XN_Q_STR_EXCEPTION_H
#define RCS_XN_Q_STR_EXCEPTION_H
#include <QString>
namespace RcsXn {
class QStrException {
private:
QString m_err_msg;
public:
QStrException(const QString &msg) : m_err_msg(msg) {}
~QStrException() noexcept = default;
QString str() const noexcept { return this->m_err_msg; }
op... |
kmzbrnoI/rcs-lib-XpressNET-qt | src/q-tree-num-widget-item.h | #ifndef QTREENUMWIDGETITEM_H
#define QTREENUMWIDGETITEM_H
/* Custom FirstNumTreeWidgetItem, which cotains number is first column and
* is sorted by this number.
*/
#include <QTreeWidgetItem>
class FirstNumTreeWidgetItem : public QTreeWidgetItem {
public:
FirstNumTreeWidgetItem(QTreeWidget* parent): QTreeWidgetIte... |
kishanbarmawala/EventsDemo | Pods/Target Support Files/JKInfinitePageView/JKInfinitePageView-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 "JKInfinitePageView.h"
FOUNDATION_EXPORT double JKInfinitePageViewVersionNumber;
FOUNDATION_EXPORT const unsigned ch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.