repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
amaiorano/Native_SDK | framework/PVRUtils/OpenGLES/ModelGles.cpp | <gh_stars>100-1000
/*!
\brief Contains a automated container class for managing Gles buffers and textures for a model.
\file PVRUtils/OpenGLES/ModelGles.h
\author PowerVR by Imagination, Developer Technology Team
\copyright Copyright (c) Imagination Technologies Limited.
*/
//!\cond NO_DOXYGEN
#include "ModelGles.h"
n... |
amaiorano/Native_SDK | framework/PVRCamera/CameraInterface_Dummy.cpp | /*!
\brief Android implementation of the camera streaming interface.
\file PVRCamera/CameraInterface_Dummy.cpp
\author PowerVR by Imagination, Developer Technology Team
\copyright Copyright (c) Imagination Technologies Limited.
*/
#include "PVRCamera/CameraInterface.h"
#include "PVRCore/Errors.h"
//!\cond NO_DOXYGEN
n... |
amaiorano/Native_SDK | framework/PVRAssets/ShadowVolume.cpp | <filename>framework/PVRAssets/ShadowVolume.cpp
/*!
\brief Contains definitions for methods of the ShadowVolume class.
\file PVRAssets/ShadowVolume.cpp
\author PowerVR by Imagination, Developer Technology Team
\copyright Copyright (c) Imagination Technologies Limited.
*/
//!\cond NO_DOXYGEN
#include <cstring>
#include ... |
amaiorano/Native_SDK | examples/Vulkan/IMGTextureFilterCubic/VulkanIMGTextureFilterCubic.cpp | /*!*********************************************************************************************************************
\File VulkanIMGTextureFilterCubic.cpp
\Title Introducing the PowerVR device extension VK_IMG_filter_cubic
\Author PowerVR by Imagination, Developer Technology Team
\Copyright ... |
amaiorano/Native_SDK | framework/PVRUtils/OpenGLES/TextureUtilsGles.cpp | /*!
\brief Contains function definitions for OpenGL ES Texture Utils.
\file PVRUtils/OpenGLES/TextureUtilsGles.cpp
\author PowerVR by Imagination, Developer Technology Team
\copyright Copyright (c) Imagination Technologies Limited.
*/
//!\cond NO_DOXYGEN
#include "PVRCore/stream/FileStream.h"
#include "PVRUtils/OpenGLE... |
amaiorano/Native_SDK | framework/PVRVk/EventVk.cpp | <reponame>amaiorano/Native_SDK<filename>framework/PVRVk/EventVk.cpp
/*!
\brief Function definitions for Event class
\file PVRVk/EventVk.cpp
\author PowerVR by Imagination, Developer Technology Team
\copyright Copyright (c) Imagination Technologies Limited.
*/
#include "PVRVk/EventVk.h"
#include "PVRVk/BufferVk.h"
#incl... |
amaiorano/Native_SDK | framework/PVRCore/textureio/TextureReaderTGA.cpp | /*!
\brief Implementation of methods of the TextureReaderTGA class.
\file PVRCore/textureio/TextureReaderTGA.cpp
\author PowerVR by Imagination, Developer Technology Team
\copyright Copyright (c) Imagination Technologies Limited.
*/
//!\cond NO_DOXYGEN
#include "PVRCore/stream/FilePath.h"
#include "PVRCore/textureio/Te... |
amaiorano/Native_SDK | framework/PVRShell/OS/Linux/Wayland/ShellOS.cpp | <reponame>amaiorano/Native_SDK<filename>framework/PVRShell/OS/Linux/Wayland/ShellOS.cpp
/*!
\brief Contains an implementation of pvr::platform::ShellOS for Linux Wayland based windowing systems.
\file PVRShell/OS/Linux/Wayland/ShellOS.cpp
\author PowerVR by Imagination, Developer Technology Team
\copyright Copyright (c... |
amaiorano/Native_SDK | examples/OpenGLES/ImageBasedLighting/OpenGLESImageBasedLighting.cpp | <gh_stars>0
/*!*********************************************************************************************************************
\File OpenGLESImageBasedLighting.cpp
\Title Introducing Physically Based Rendering
\Author PowerVR by Imagination, Developer Technology Team
\Copyright Copyright (... |
RealRandyWind/Algorithms | RuntimeDLLReplacement/Library.hpp | #pragma once
#ifdef LIBRARY_EXPORTS
#define LIBRARY_API __declspec(dllexport)
#else
#define LIBRARY_API __declspec(dllimport)
#endif
class ILibrary
{
public:
using FunctionGetAPI = ILibrary* (*)();
virtual float MyFunction(float Argument) = 0;
};
extern "C" LIBRARY_API ILibrary* __cdecl GetAPI();
class LIBRARY_... |
RealRandyWind/Algorithms | ProbeMovementOptimizerSSC/ProbeMovementOptimizerSSC.cpp | <filename>ProbeMovementOptimizerSSC/ProbeMovementOptimizerSSC.cpp
using FPoint2D = TPoint2D<FReal>;
enum class EPathOperation
{
Union,
Exclusion,
_Size
};
struct FTriangle2D
{
FPoint2D P1, P2, P3;
};
struct FPath
{
EPathOperation Operation;
TSequence<FPoint2D> Points;
};
struct FParameters
{
FReal ProbeRadiu... |
RealRandyWind/Algorithms | ShaderStyling/Driver.cpp | #include <Driver>
#include <Sequence>
#include <Functions>
#include <Windows.h>
#include <d3d11.h>
#include <d3dcompiler.h>
#ifndef _ASSERT_DISPLAY
#define _ASSERT_DISPLAY(Code, Message) if(FAILED(Code)) { OutStream << "\nDriver Error" << "(" << std::hex << Code << ") : " << Message << "\n at " << __FUNCSIG__ << "\n... |
RealRandyWind/Algorithms | RuntimeDLLReplacement/RuntimeDLLReplacement.cpp | <gh_stars>0
#include <windows.h>
#include <stdio.h>
#include <Types>
#include "Library.hpp"
FReturn RuntimeLoadAPI(HINSTANCE &HAPI, ILibrary** PtrAPI)
{
ILibrary::FunctionGetAPI PtrGetAPI;
HINSTANCE _HAPI;
if(!PtrAPI)
{
return Failure;
}
_HAPI = LoadLibrary("Library.dll");
if(!_HAPI)
{
return Failure;
... |
RealRandyWind/Algorithms | TinyAgentHiveMind/TinyAgentHiveMind.cpp | #include <Types>
#include <Point>
struct FDistraction;
struct FFocus
{
FSize Encounters;
FTime Time;
FAgent &Subject;
};
template<FSize SizeFocus>
struct FState
{
TPoint2D<FReal> Position, Direction, Orientation;
FReal Speed, Acceleration;
FFocus[SizeFocus] FocusList;
};
struct FAgent
{
FSize ID;
FState &St... |
RealRandyWind/Algorithms | RuntimeDLLReplacement/Library.cpp | <reponame>RealRandyWind/Algorithms<filename>RuntimeDLLReplacement/Library.cpp
#include "Library.hpp"
ILibrary* CLibrary::Instance = nullptr;
CLibrary::CLibrary()
{
}
CLibrary::~CLibrary()
{
}
ILibrary* CLibrary::GetInstance()
{
if (!Instance) { Instance = new CLibrary(); }
return Instance;
}
float CLibrary::MyF... |
RealRandyWind/Algorithms | Core/Display.hpp | <filename>Core/Display.hpp
#pragma once
#include <Types>
#include <Drivers/DisplayDriver>
#include <Point>
#include <Iterator>
#include <Model>
#include <Styles/Scatter>
namespace Display
{
using namespace Drivers;
template<FSize Size, typename Type>
FVoid Scatter(
const TIterator<TPoint<... |
RealRandyWind/Algorithms | Core/Math.hpp | <gh_stars>0
#pragma once
#include <Types>
#include <Point>
#include <Functions>
/* Functions */
namespace Math
{
template<FSize Size, typename Type>
Type Norm2(
const TPoint<Size, Type> &Rhs
)
{
FSize Index;
Type Result = Type();
for (Index = 0; Index < Size; ++Index)
{
Result += Rhs.Data[Index] ... |
RealRandyWind/Algorithms | LVQPrototyping/LVQPrototyping.cpp | #include <Types>
#include <LVQ1>
#include <Data>
#include <Display>
using namespace LVQ;
using namespace Display;
using FLVQ1 = TLVQ1<8,3>;
FReturn main(
FVoid
)
{
FLVQ1 LVQ1;
FLVQ1::FPerformence Performance = {0};
TData<FLVQ1::FFeature> Features("LVQ.Features.F8.Bin");
TData<FLVQ1::FLabel> Targets("LVQ.Ta... |
RealRandyWind/Algorithms | Core/Sequence.hpp | <gh_stars>0
#pragma once
#include <Types>
#include <Functions>
#include <Iterator>
static const FSize SequenceInitSize = 8;
template<typename TypeElement>
struct TSequence;
template<typename TypeElement>
struct TSequence : public TIterator<TypeElement>
{
TSequence(
FVoid
)
{
_Size = _BufferSize = 0;
Data... |
RealRandyWind/Algorithms | Core/Point.hpp | <reponame>RealRandyWind/Algorithms
#pragma once
#include <Types>
#include <Functions>
template<FSize SizeData, typename TypeElement>
struct TPoint;
template<typename TypeElement>
struct TPoint2D;
template<typename TypeElement>
struct TPoint3D;
template<typename TypeElement>
struct TPoint4D;
template<typename TypeElem... |
RealRandyWind/Algorithms | CompoundPathsTriangularization/CompoundPathsTriangularization.cpp | #include <Types>
#include <Sequence>
#include <Point>
#include <Data>
using FPoint = TPoint<2, FReal>;
using FTriangle = TPoint<6, FReal>;
enum class EPathOperation
{
Union,
Exclusion,
_Size
};
struct FPath
{
EPathOperation Operation;
TSequence<FPoint> Points;
};
struct F2DTree
{
FPoint Position;
FTriangle &... |
RealRandyWind/Algorithms | Core/Tests/TestCase.cpp | <reponame>RealRandyWind/Algorithms
#include <TestCase>
|
RealRandyWind/Algorithms | ShaderStyling/Driver.hpp | #pragma once
#include <Types>
#include <Point>
struct FWindow
{
TPoint2D<FReal> Position, Dimensions, Scale;
TColor<FReal> Background;
FBool FullScreen, Borderless;
FString Name, Title;
static FWindow Default(
FVoid
)
{
FWindow Window = {0};
Window.Position ... |
RealRandyWind/Algorithms | Core/Styles/Scatter.hpp | #pragma once
#include <Types>
#include <Display>
#include <Iterator>
#include <Point>
#include <Functions>
namespace Display
{
template<FSize Size, typename Type>
struct TScatter;
struct FScatterParameters;
struct FScatterParameters
{
FReal Radius;
TPoint2D<FReal> Origin, Min, Max... |
RealRandyWind/Algorithms | Core/Drivers/DisplayDriver.hpp | #pragma once
#include <Windows.h>
#include <Types>
#include <Sequence>
#include <Point>
#include <d3d11.h>
#include <d3dcompiler.h>
namespace Display
{
static const FSize _MaxLayersPerWindow = 7;
static const FSize _MaxWindows = 10;
struct FStyle;
struct FWindow;
struct FView;
struct FShader;
enum class ESh... |
RealRandyWind/Algorithms | Core/Types.hpp | <reponame>RealRandyWind/Algorithms
#pragma once
#include <string.h>
#include <cstdlib>
#include <cstdint>
#include <iostream>
#include <fstream>
#include <initializer_list>
#include <chrono>
template<typename TypeElement>
using TListInitializer = std::initializer_list<TypeElement>;
using FIStream = std::istream;
usi... |
RealRandyWind/Algorithms | ShapeSimplification/ShapeSimplification.cpp | #include <Types>
FReturn main()
{
return Success;
} |
RealRandyWind/Algorithms | ShapeSpacing/ShapeSpacing.cpp | <filename>ShapeSpacing/ShapeSpacing.cpp
#include <Types>
FReturn main(FVoid)
{
check();
return Success;
}
FBool check(FVoid)
{
return True;
} |
RealRandyWind/Algorithms | Core/Iterator.hpp | #pragma once
#include <Types>
#include <Functions>
template<typename TypeElement>
struct TIterator;
template<typename TypeElement>
struct TIterator
{
using FIterator = TIterator<TypeElement>;
FBool _DestroyData;
FSize _Size, _BufferSize;
FSize _Index, _BufferIndex, _ActiveIndex;
TypeElement *Data;
TIterator(... |
RealRandyWind/Algorithms | LVQPrototyping/LVQ1.hpp | #pragma once
#include <Types>
#include <Model>
#include <Sequence>
#include <Math>
using namespace Math;
namespace LVQ
{
template<FSize SizeFeature, FSize SizeLabel>
struct TLVQ1;
template<FSize SizeFeature, FSize SizeLabel>
struct TLVQ1 : public TModel<SizeFeature, SizeLabel>
{
struct FParameters
{
FRe... |
RealRandyWind/Algorithms | Core/Functions.hpp | <gh_stars>0
#pragma once
#include <stdlib.h>
#include <Types>
template<typename Type>
inline Type Max(
const Type &Lhs,
const Type &Rhs
)
{
return (Lhs < Rhs ? Rhs : Lhs);
}
template<typename Type>
inline Type Min(
const Type &Lhs,
const Type &Rhs
)
{
return (Lhs < Rhs ? Lhs : Rhs);
}
template<typename ... |
RealRandyWind/Algorithms | Core/Drivers/DisplayDriver.cpp | <reponame>RealRandyWind/Algorithms<gh_stars>0
#include <DisplayDriver>
#include <Functions>
#ifndef _ASSERT_ERROR
#define _ASSERT_ERROR(Code, Message) if(FAILED(Code)) { OutStream << "\nDriver Error" << "(" << std::hex << Code << ") : " << Message << "\n at " << __FUNCSIG__ << "\n in " << __FILE__ << "(" << (FSize... |
RealRandyWind/Algorithms | Core/Model.hpp | #pragma once
#include <Types>
#include <Point>
#include <Iterator>
#include <Data>
template<FSize SizeFeature, FSize SizeLabel>
struct TModel;
template<FSize SizeFeature, FSize SizeLabel>
struct TModel
{
using FFeature = TPoint<SizeFeature, FReal>;
using FLabel = TPoint<SizeLabel, FReal>;
struct FSample
{
FF... |
RealRandyWind/Algorithms | Core/Data.hpp | <reponame>RealRandyWind/Algorithms
#pragma once
#include <Types>
#include <Iterator>
#include <Sequence>
#include <Byte>
template<typename TypeData>
struct TData;
template<typename TypeData>
struct TData : public TIterator<TypeData>
{
TData(
FVoid
)
{
_Size = _BufferSize = 0;
Data = NullPtr;
}
TData(
... |
RealRandyWind/Algorithms | Core/Byte.hpp | <gh_stars>0
#pragma once
#include <Types>
#include <Functions>
template<FSize SizeBytes>
struct TByte;
template<FSize SizeBytes>
struct TByte
{
FRaw Data[SizeBytes];
inline FSize Size(
FVoid
)
{
return SizeBytes;
}
inline FSize Size(
FVoid
) const
{
return SizeBytes;
}
friend FIStream &opera... |
RealRandyWind/Algorithms | ShaderStyling/ShaderStyling.cpp | <gh_stars>0
#include <Types>
#include <Driver>
#include <Point>
struct FTriangle : public FStyle
{
FTriangle(
FVoid
)
{
Path = "Triangle.hlsl";
Data = _Make(sizeof(TPoint4D<FReal>) * 6);
SizeData = 6;
auto Vertex = (TPoint4D<FReal> *) Data;
Vertex[0]... |
shah-deep/Graph-Theory-Algos | hopcroft_karp.cpp | <filename>hopcroft_karp.cpp
/// Hopcroft-Karp Algorithm ///
#include<bits/stdc++.h>
using namespace std;
list<int> *G;
bool bfs(int *setU, int *setV, int *dist, int m)
{
queue<int> que;
for (int u=1; u<=m; u++)
{
if (setU[u]==0)
{
dist[u] = 0;
que.push(u);
}
else dist[u] = INT_MAX;
}
dist[0] =... |
ocman-nazir-briet/CPP | Universal.cpp |
#include <iostream>
#include"student.h"
using namespace std;
int main(){
int id = 0;
double marks = 0.0;
char arr[25];
cout << "Enter Student ID: ";
cin >> id;
cout << "Enter Student Name: ";
cin.ignore();
cin.get(arr, 25); ... |
ocman-nazir-briet/CPP | universal_program.cpp | <reponame>ocman-nazir-briet/CPP
// <NAME>
// blackghost
// CODE TO UNDESTAND CONNCEPTS OF FILING, GETLINE, POINTERS, DYNAMIC ARRAY, 2D ARRAYS, ETC
#include<stdlib.h>
#include<iostream>
#include<fstream>
using namespace std;
void fout(char arr);
void fin(char arr);
void point();
void dynamic(int* ptr, int ... |
ocman-nazir-briet/CPP | student.cpp | <gh_stars>1-10
#include "student.h"
#include<iostream>
using namespace std;
void student::setid(int ID)
{
id = ID; // this is setter which will set values
}
int student::getid()
{
return id; // this is getter which will get and then return values
}
void student::setmarks(double Marks)
{
marks ... |
UniStuttgart-VISUS/megamol-shader-factory | src/Includer.cpp | /*
* Copyright (C) 2020-2021 University of Stuttgart (VISUS).
* All rights reserved.
*/
#include "Includer.h"
#include <fstream>
#include <utility>
#include "Utils.h"
namespace {
glslang::TShader::Includer::IncludeResult* read_include(std::filesystem::path const& search_path) {
std::string* data = new std::s... |
UniStuttgart-VISUS/megamol-shader-factory | src/ShaderFactory.cpp | /*
* Copyright (C) 2020-2021 University of Stuttgart (VISUS).
* All rights reserved.
*/
#include "msf/ShaderFactory.h"
#include <algorithm>
#include <sstream>
#include <string>
#include <tuple>
#include <ResourceLimits.h>
#include <glslang/Public/ShaderLang.h>
#include "Includer.h"
#include "Utils.h"
namespace {... |
UniStuttgart-VISUS/megamol-shader-factory | test/main.cpp | #include <iostream>
#define MSF_OPENGL_INCLUDE_GLAD
#include "msf/ShaderFactory.h"
#include "msf/ShaderFactoryOptionsOpenGL.h"
int main() {
msf::ShaderFactoryOptionsOpenGL options({"../test"}, "__AMD__");
// options.addDefinition("__AMD__");
msf::ShaderFactory factory;
auto content = factory.preproce... |
UniStuttgart-VISUS/megamol-shader-factory | src/LineTranslator.cpp | <reponame>UniStuttgart-VISUS/megamol-shader-factory
/*
* Copyright (C) 2020-2021 University of Stuttgart (VISUS).
* All rights reserved.
*/
#include "msf/LineTranslator.h"
#include <regex>
#include <sstream>
msf::LineTranslator::LineTranslator() : next_id_(10000) {}
std::string msf::LineTranslator::cleanupShader(... |
NicholasRSarantinos/MusicRecommendation | src/main.cpp | <filename>src/main.cpp<gh_stars>0
#include <iostream>
#include <fstream>
#include <essentia/algorithmfactory.h>
#include <essentia/essentiamath.h>
#include <essentia/pool.h>
#include <string>
#include "tnt/tnt2vector.h"
#include <time.h>
#include <chrono>
#include <dirent.h>
#include <stdio.h>
#include <sqlite3.h>
#inc... |
av-pavlov/matrix-read-demo | matrix-read-demo.cpp | <gh_stars>0
// Performance demo for various methods of reading integer data in text form from disk
// https://github.com/av-pavlov/matrix-read-demo
#include <cstdio>
#include <iostream>
#include <fstream>
#include <ctime>
#include <sys/stat.h>
#define is_num(c) ((c) >= '0' && (c) <= '9')
using namespace std;
boo... |
NetanelShimoni/Solver-partB | Demo.cpp | <gh_stars>0
//
////
//// Demo.cpp
//// operatorOverload
////
//// First version by <NAME> on 29/12/2019.
//// Second version by <NAME> on 22/04/2020.
////
//
//#include <iostream>
//#include <complex>
//#include "solver.hpp"
//
//
//using namespace std;
//using solver::solve, solver::RealVariable, solver::ComplexVa... |
NetanelShimoni/Solver-partB | solver.cpp | <reponame>NetanelShimoni/Solver-partB
//
// Created by netanel & Or on 27/04/2020.
//
#include "solver.hpp"
#include <iostream>
#include <complex>
#include <math.h>
using namespace std;
namespace solver{
RealVariable operator*( double a, RealVariable r){
return RealVariable(r.a*a, r.b*a, r.c*a);
... |
SpMakris/STM32_UART_MIDI | MIDIlib/Core/Src/main.cpp | <reponame>SpMakris/STM32_UART_MIDI<filename>MIDIlib/Core/Src/main.cpp<gh_stars>1-10
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
*******************************************************... |
SpMakris/STM32_UART_MIDI | MIDIlib/Core/Src/MIDI.cpp | /*!
* Original Author: <NAME>
*
* This is a direct port of the arduino MIDI library to STM32 using HAL driver commands.
* Unline the Arduino version, this class assumes that the main program handles all peripheral
* initializations. Create a MidiInterface object and run the .begin(Channel, *serial_in, *serial_out)... |
SpMakris/STM32_UART_MIDI | MIDIlib/Core/Src/MidiHandlers.cpp | <reponame>SpMakris/STM32_UART_MIDI<gh_stars>1-10
/*
* MidiHandlers.cpp
*
* Created on: Mar 20, 2020
* Author: <NAME>
*
*/
#include "MidiHandlers.h"
#include "stm32f0xx_hal.h"
int i;
void Handle_Clock() {
i++;
if (i / 12 == 1) {
HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_9);
i = 0;
}
}
void Handle_Start() {... |
dlrauch15/scale-cnn | vtr/small/layers/tdf2/test/golden.cpp | // Golden version of convolution/maxpool algorithm used to validate synthesized version.
#include "global_defines.h"
#include "tdf2_common_defines.h"
#include <stdbool.h>
void convmax_golden (
data_t in_data[INPUT_HEIGHT][INPUT_WIDTH][INPUT_CHANS_PADDED],
data_t out_data[OUTPUT_HEIGHT][OUTPUT_WIDTH][OUTPUT_CHANS... |
dlrauch15/scale-cnn | vtr/small/layers/tdf9/r32_o1/tdf9.cpp | <filename>vtr/small/layers/tdf9/r32_o1/tdf9.cpp
#include "global_defines.h"
#include "tdf9_impl_defines.h"
#include <stdbool.h>
#include <assert.h>
#include "tdf9_conv_stages.h"
//////////////////////////////////////////////////////////////
// ACCUMULATION FUNCTIONS
//////////////////////////////////////////////////... |
dlrauch15/scale-cnn | vtr/large/layers/tdf8/r32_o1/tdf8.cpp | #include "global_defines.h"
#include "tdf8_impl_defines.h"
#include <stdbool.h>
#include <assert.h>
#include "tdf8_conv_stages.h"
// Pooling / writing function
// This function receives unpooled output elements and "pools" them by
// calculating the running maximum. Once enough inputs have been gathered,
// it call... |
dlrauch15/scale-cnn | vtr/small/layers/tdf12/test/golden.cpp | // conv_golden.c
// Golden version of convolution algorithm used to validate synthesized version.
#include "global_defines.h"
#include "tdf12_common_defines.h"
#include <stdbool.h>
#include <math.h>
void conv_golden (
data_t in_data[INPUT_HEIGHT][INPUT_WIDTH][INPUT_CHANS_PADDED],
data_t out_data[OUTPUT_HEIGHT][O... |
dlrauch15/scale-cnn | vtr/small/impls/i1/td_fused.cpp | <filename>vtr/small/impls/i1/td_fused.cpp
//=================================================================
//
// -- AUTO-GENERATED --
//
// Top-level for td_fused network
//
//=================================================================
#include "td_fused_layers.h"
#include "hls_stream.h"
#include "td_fused_... |
dlrauch15/scale-cnn | vtr/large/layers/tdf11/r4_o4/tdf11.cpp | <gh_stars>1-10
#include "global_defines.h"
#include "tdf11_impl_defines.h"
#include <stdbool.h>
#include <assert.h>
#include "tdf11_conv_stages.h"
// Multiplies the intermediate feature maps with the second-layer
// filters. OCHAN_SCALE_FACTOR is an integer factor of the number
// of input channels. The k parameter te... |
dlrauch15/scale-cnn | templates/conv-conv/test/golden.cpp | <gh_stars>1-10
// golden.cpp
// Golden version of fused conv-conv algorithm used to validate synthesized version.
#include "global_defines.h"
#include "${lname}_common_defines.h"
#include <stdbool.h>
void convconv_golden (
data_t in_data[INPUT_HEIGHT][INPUT_WIDTH][INPUT_CHANS_PADDED],
data_t out_data[OUTPUT_HEIG... |
dlrauch15/scale-cnn | vtr/small/layers/tdf9/r4_o32/tdf9.cpp | #include "global_defines.h"
#include "tdf9_impl_defines.h"
#include <stdbool.h>
#include <assert.h>
#include "tdf9_conv_stages.h"
//////////////////////////////////////////////////////////////
// ACCUMULATION FUNCTIONS
//////////////////////////////////////////////////////////////
// Accumulation stage 1
//
// This... |
dlrauch15/scale-cnn | vtr/small/layers/tdf9/test/tb_tdf9.cpp | <gh_stars>1-10
// Testbench for tdf9
#include "global_defines.h"
#include "tb_utils.h"
#include "tdf9_common_defines.h"
#include <stdio.h>
void tdf9 (
data_t in_data[INPUT_HEIGHT][INPUT_WIDTH][INPUT_CHANS_PADDED],
data_t out_data[OUTPUT_HEIGHT][OUTPUT_WIDTH][OUTPUT_CHANS],
data_t filter_data[OUTPUT_CHANS][FIL... |
dlrauch15/scale-cnn | vtr/small/layers/tdf11/r64_o2/tdf11.cpp | <reponame>dlrauch15/scale-cnn
#include "global_defines.h"
#include "tdf11_impl_defines.h"
#include <stdbool.h>
#include <assert.h>
#include "tdf11_conv_stages.h"
// Multiplies the intermediate feature maps with the second-layer
// filters. OCHAN_SCALE_FACTOR is an integer factor of the number
// of input channels. The... |
dlrauch15/scale-cnn | templates/conv/impl/conv.cpp | #include "global_defines.h"
#include "${lname}_impl_defines.h"
#include <stdbool.h>
#include <assert.h>
#include "${lname}_conv_stages.h"
//////////////////////////////////////////////////////////////
// ACCUMULATION FUNCTIONS
//////////////////////////////////////////////////////////////
$accum_functions
// Func... |
dlrauch15/scale-cnn | vtr/small/layers/tdf9/r2_o4/tdf9.cpp | #include "global_defines.h"
#include "tdf9_impl_defines.h"
#include <stdbool.h>
#include <assert.h>
#include "tdf9_conv_stages.h"
//////////////////////////////////////////////////////////////
// ACCUMULATION FUNCTIONS
//////////////////////////////////////////////////////////////
// Accumulation stage 1
//
// This... |
dlrauch15/scale-cnn | common/test/tb_utils.cpp | <filename>common/test/tb_utils.cpp
// tb_utils.cpp
// Common utilities for layer testbenches
#include "global_defines.h"
#include <math.h>
// Initialize input data to random values between 0 and 1
void gen_random_inputs(data_t *ifmaps, int len) {
for (int i = 0; i < len; ++i) {
ifmaps[i] = (data_t)((double)ra... |
dlrauch15/scale-cnn | templates/network/network.cpp | <gh_stars>1-10
//=================================================================
//
// -- AUTO-GENERATED --
//
// Top-level for $name network
//
//=================================================================
#include "${name}_layers.h"
#include "hls_stream.h"
#include "${name}_axi_in.h"
void $name(
$filter_d... |
dlrauch15/scale-cnn | vtr/small/layers/axi_in/td_fused_axi_in.cpp | <gh_stars>1-10
// This CPP file contains the function that reads in data from an AXI4-Stream
// interface and writes it to UltraRAMs holding the ifmaps for the first layer.
#include "global_defines.h"
#include "hls_stream.h"
#include <inttypes.h>
#include "td_fused_axi_in.h"
static const int HEIGHT = 224;
static cons... |
dlrauch15/scale-cnn | templates/axi_out/axi_out.cpp | <reponame>dlrauch15/scale-cnn
// This CPP file contains the function that reads data from the last layer's UltraRAMs
// and outputs it to a AXI-Stream interface.
#include "global_defines.h"
#include "hls_stream.h"
#include <inttypes.h>
#include "${name}_axi_out.h"
static const int HEIGHT = $height;
static const int W... |
dlrauch15/scale-cnn | vtr/small/layers/axi_out/td_fused_axi_out.cpp | // This CPP file contains the function that reads data from the last layer's UltraRAMs
// and outputs it to a AXI-Stream interface.
#include "global_defines.h"
#include "hls_stream.h"
#include <inttypes.h>
#include "td_fused_axi_out.h"
static const int HEIGHT = 14;
static const int WIDTH = 14;
static const int CHAN... |
sherwin2000/Edabit-Solutions | 2.Easy/largestSwap.cpp | /* Problem-Task : Function that takes a two-digit number and determines if it's the largest of two possible digit swaps.
* Problem Link : https://edabit.com/challenge/mQbddasCYNTTzQEgm
* programmer = <NAME>.
*/
#include <iostream>
using namespace std;
bool largestSwap(int num)
{
int rev = 0, d;
int dup = num... |
JYProjs/patentr | src/RcppExports.cpp | <filename>src/RcppExports.cpp
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 1<PASSWORD>
#include <Rcpp.h>
using namespace Rcpp;
#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr... |
JYProjs/patentr | src/convert_funcs.cpp | <filename>src/convert_funcs.cpp<gh_stars>1-10
#include <Rcpp.h>
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <cctype>
using namespace Rcpp;
// checks if string starts w/ a prefix
// WORKS (basic test cases)
bool startsWith(const std::string &text, const std::string &prefix)
{... |
bouldermachinery/DSB | win32/allegro-4.2/include/allegro/inline/3dmaths.inl | /* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
... |
bouldermachinery/DSB | win32/allegro-4.2/include/allegro/inline/system.inl | <filename>win32/allegro-4.2/include/allegro/inline/system.inl
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
*... |
bouldermachinery/DSB | win32/allegro-4.2/include/allegro/inline/rle.inl | <filename>win32/allegro-4.2/include/allegro/inline/rle.inl<gh_stars>0
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \... |
bouldermachinery/DSB | win32/allegro-4.2/include/allegro/inline/file.inl | #ifndef ALLEGRO_FILE_INL
#define ALLEGRO_FILE_INL
#warning file.inl should no longer be referenced.
#endif /* ifndef ALLEGRO_FILE_INL */
|
isukax/cc | main.cpp | <reponame>isukax/cc
#include <iostream>
#include <stdlib.h>
#include <string>
#include <string.h>
enum NodeType
{
ND_NUM,
};
struct Node
{
int type;
Node *lhs;
Node *rhs;
int value;
};
Node *CreateNode(int type, Node *lhs, Node *rhs)
{
Node *node = new Node();
node->t... |
rohit517/Self-Driving-Car | include/Movio.hpp | /***************************************************************************
MIT License
Copyright (c) 2018 Rohit
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, includi... |
rohit517/Self-Driving-Car | app/Movio.cpp | <filename>app/Movio.cpp
/***************************************************************************
MIT License
Copyright (c) 2018 Rohit
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 with... |
ArthurEmidio/hogprediction | Graph.cpp | <reponame>ArthurEmidio/hogprediction<filename>Graph.cpp
//
// Graph.cpp
// BackgroundSubtraction
//
// Created by <NAME> on 11/3/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
#include "Graph.h"
#include "Utils.h"
bool operator<=(const Key& lhs, const Key& rhs)
{
return lhs.first < rhs.first || (lhs.... |
ArthurEmidio/hogprediction | DStar.cpp | //
// DStar.cpp
// BackgroundSubtraction
//
// Created by <NAME> on 11/3/15.
// Copyright © 2015 <NAME>. All rights reserved.
//
#include "DStar.h"
DStar::DStar(const Graph &graph) : graph(graph)
{
this->U = initialize();
}
double DStar::heuristic(Vertex *vertex, Vertex *start)
{
int dx = abs(vertex->row... |
ArthurEmidio/hogprediction | Filter.cpp | <reponame>ArthurEmidio/hogprediction<filename>Filter.cpp
//
// Filter.cpp
// BackgroundSubtraction
//
// Created by <NAME> on 3/6/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include "Filter.h"
/* Public Methods */
Filter::Filter(Mat img, vector<vector<Point>> contours, int C) {
this->imag... |
ArthurEmidio/hogprediction | Dijkstra.cpp | //
// Dijkstra.cpp
// BackgroundSubtraction
//
// Created by <NAME> on 8/2/16.
// Copyright © 2016 <NAME>. All rights reserved.
//
#include "Dijkstra.h"
bool Dijkstra::computeShortestPath(const Graph &graph)
{
graph.start->distance = 0;
priority_queue<Vertex*, vector<Vertex*>, function<bool(Vertex*, ... |
ArthurEmidio/hogprediction | PathFinder.cpp | <reponame>ArthurEmidio/hogprediction
//
// PathFinder.cpp
// BackgroundSubtraction
//
// Created by <NAME> on 9/7/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include "PathFinder.h"
#include "Utils.h"
#include "AStar.h"
#include "Dijkstra.h"
#include "DStar.h"
PathFinder::PathFinder(vector<vector<sh... |
ArthurEmidio/hogprediction | TargetSelector.cpp | //
// TargetSelector.cpp
// BackgroundSubtraction
//
// Created by <NAME> on 1/6/16.
// Copyright © 2016 <NAME>. All rights reserved.
//
#include "TargetSelector.h"
class TargetPack
{
public:
Mat original;
Mat copy;
Mat resultingTarget;
Point points[2];
int howManyPoints;
TargetPack(c... |
ArthurEmidio/hogprediction | MovementDetector.cpp | //
// MovementDetector.cpp
// BackgroundSubtraction
//
// Created by <NAME> on 9/6/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include "MovementDetector.h"
#include "Utils.h"
// Computes the field of view.
// The field of view is composed of N straight lines (N is given by 'degrees', such that 1 <=... |
ArthurEmidio/hogprediction | AStar.cpp | <reponame>ArthurEmidio/hogprediction
#include "AStar.h"
#include <queue>
#include <functional>
#include <vector>
struct VertexCompare {
bool operator() (const Vertex* lhs, const Vertex* rhs) const {
double lhs_f_value = lhs->g_value + lhs->h_value;
double rhs_f_value = rhs->g_value + rhs->h_value;... |
ArthurEmidio/hogprediction | main.cpp | <filename>main.cpp
#include <opencv2/opencv.hpp>
#include <Python/Python.h>
#include "Detector.h"
#include "Utils.h"
#include "MovementDetector.h"
#include "Cell.h"
#include "PathFinder.h"
#include "Graph.h"
#include "TargetSelector.h"
using namespace cv;
using namespace std;
const string folder = "input";
inline M... |
ArthurEmidio/hogprediction | Utils.cpp | //
// Utils.cpp
// BackgroundSubtraction
//
// Created by <NAME> on 3/10/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include "Utils.h"
#include <Python/Python.h>
#include <fstream>
vector<Rect> Utils::getRectanglesFromContours(vector<vector<Point>> contours)
{
vector<Rect> rectangles;
... |
ArthurEmidio/hogprediction | Cell.cpp | <filename>Cell.cpp<gh_stars>1-10
//
// Cell.cpp
// BackgroundSubtraction
//
// Created by <NAME> on 9/7/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include "Cell.h"
Cell::Cell(Point position, vector<float> descriptorValues) :
position(position),
descriptorValues(descriptorValues),
score... |
ArthurEmidio/hogprediction | Detector.cpp | <gh_stars>1-10
//
// Detector.cpp
// BackgroundSubtraction
//
// Created by <NAME> on 3/9/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include "Detector.h"
#include "Filter.h"
#include "Utils.h"
// Public methods
Detector::Detector(vector<Mat> frames, int method) {
this->method = method;
th... |
zxrs/monkeygestures | dll/src/cpp/shareddata.cpp | #include <windows.h>
#pragma data_seg("SHARED")
extern "C" HHOOK gHook = NULL;
extern "C" LONG gLastX = 0;
extern "C" LONG gLastY = 0;
#pragma data_seg()
|
Johnkariungi/algos | Linked list/middle_of_ll.cpp | <reponame>Johnkariungi/algos<filename>Linked list/middle_of_ll.cpp<gh_stars>0
#include<stdio.h>
#include<stdlib.h>
/** two pointers, when slow meets fast */
/** LL Node */
struct Node {
int data;
struct Node* next;
};
/** function to find middle of LL */
void printMiddle(struct Node *head) {
/* start point... |
YJBeetle/GtaOnlineSwitchSinglePlayer | src/main.cpp | <filename>src/main.cpp<gh_stars>0
#include <iostream>
#include <string>
#include <cstring>
#include <windows.h>
#include <psapi.h>
using namespace std;
const string GtaExe("GTA5.exe");
DWORD getGtaProcessId()
{
DWORD aProcesses[1024], cbNeeded, cProcesses;
unsigned int i;
if (EnumProcesses(aProcesses, sizeof(aPr... |
AniMysore74/Computer-Class | Class 11/12.cpp | //Use manipulators to format the given output.
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
int main()
{
cout<<"$$$$$HELLO"<<endl;
cout.setf(ios::right);
cout<<setw(10)<<"$$$$$HELL"<<endl;
cout<<setw(10)<<"$$$$$$HEL"<<endl;
cout<<setw(11)<<"########HE"<<endl;
cout<<setw(11)<<"#########H"... |
AniMysore74/Computer-Class | Class 11/14.cpp | #include<iostream.h>
#include<conio.h>
#include<math.h>
int main()
{
int n;
float x;
cout<<"Enter a number : ";
cin>>n;
x = (n>0&&n%2==1)? sqrt(n): pow(n,5.0);
cout<<"\n"<<x;
getch();
return 0;
}
|
AniMysore74/Computer-Class | Class 11/18.cpp | #include<iostream.h>
#include<conio.h>
int main()
{
char a,u,l,v;
cout<<"Enter a character ";
cin>>a;
char x=a;
x = (a>=65 && a<97)?u:(a>=97 && a<123)?l:v;
(x==u)?cout<<"The lowercase equivalent is "<<char(a+32):(x==l)?cout<<"The uppercase equivalent is "
<<char(a-32):cout<<"The character i... |
AniMysore74/Computer-Class | Class 11/44.cpp | //Read two strings and copy the shorter string into the bigger string
#include<iostream.h>
#include<conio.h>
#include<string.h>
int main()
{
char str1[30],str2[30];
cout<<"Enter string 1 : ";
cin>>str1;
cout<<"Enter string 2 : ";
cin>>str2;
if(strlen(str1)>strlen(str2))
strcpy(str2,str1);
else
... |
AniMysore74/Computer-Class | Class 12/AP21.cpp | <reponame>AniMysore74/Computer-Class
#include<iostream.h>
#include<conio.h>
#include<process.h>
#include<fstream.h>
class Student{
int r_no;
char name[20];
int grade;
int choice;
public:
void display()
{
cout<<"\n\nName: "<<name
<<"\nRoll no.: "<<r_no
<<"\nClass: "<<grade;
}
int send()
{... |
AniMysore74/Computer-Class | Class 11/15.cpp | #include<iostream.h>
#include<conio.h>
int main()
{
int p,r,t,i;
cout<<"Enter the Principle Amount : ";
cin>>p;
cout<<"Enter the Time Period : ";
cin>>t;
r = (t>10)?12:8;
i = (p*r*t/100);
cout<<"\nInterest is : "<<i;
getch();
return 0;
}
|
AniMysore74/Computer-Class | Class 11/26.cpp | //Reverse the digits of a given integer
#include<iostream.h>
#include<conio.h>
int main()
{
int n,N,d,r=0;
cout<<"Input a number ";
cin>>N;
n=N;
do
{
d=N%10;
r=(r*10)+d;
N=N/10;
}while(N!=0);
cout<<"The reverse is : "<<r;
getch();
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.