Skip to content

Instantly share code, notes, and snippets.

View marty1885's full-sized avatar
👨‍💻
Writing code

Martin Chang marty1885

👨‍💻
Writing code
View GitHub Profile
@marty1885
marty1885 / gist:0cb7dab6a1c721c6893d
Created January 30, 2015 07:34
indent via GNU indent
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
int main()
{
int b = 0, bc = 0, i, ii, sum = 1, myAbs[100], time = 0, ftime;
char a[100] = { "" };
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) \
|| defined(__TOS_WIN__) || defined(__WINDOWS__)
/* Compiling for Windows */
#ifndef __WINDOWS__
#define __WINDOWS__
#endif
#include <windows.h>
#endif/* Predefined Windows macros */
#include <stdlib.h>
major_version 2
major vresion 2
xor
Using Intel , OpenCL platform: Intel Gen OCL Driver
Using OpenCL device: Intel(R) HD Graphics Skylake Desktop GT2
initializing clblas
layer 0:InputLayer{ outputPlanes=2 outputSize=1 }
layer 1:ConvolutionalLayer{ LayerDimensions{ inputPlanes=2 inputSize=1 numFilters=2 filterSize=1 outputSize=1 padZeros=1 biased=1 skip=0} }
layer 2:ActivationLayer{ SIGMOID }
layer 3:ConvolutionalLayer{ LayerDimensions{ inputPlanes=2 inputSize=1 numFilters=2 filterSize=1 outputSize=1 padZeros=1 biased=1 skip=0} }
Number of platforms 1
Platform Name Intel Gen OCL Driver
Platform Vendor Intel
Platform Version OpenCL 1.2 beignet 1.1.1
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_spir cl_khr_icd
Platform Extensions function suffix Intel
Platform Name Intel Gen OCL Driver
Number of devices 1
args: bin/deepcl_unittests --gtest_filter=-DATA*:SLOW*
Note: Google Test filter = -DATA*:SLOW*
[==========] Running 158 tests from 29 test cases.
[----------] Global test environment set-up.
[----------] 7 tests from testClBlas
[ RUN ] testClBlas.basic
Using Intel , OpenCL platform: Intel Gen OCL Driver
Using OpenCL device: Intel(R) HD Graphics Skylake Desktop GT2
initializing clblas
clblas teardown
xor
Using Intel , OpenCL platform: Intel Gen OCL Driver
Using OpenCL device: Intel(R) HD Graphics Skylake Desktop GT2
layer 0:InputLayer{ outputPlanes=2 outputSize=1 }
layer 1:ConvolutionalLayer{ LayerDimensions{ inputPlanes=2 inputSize=1 numFilters=2 filterSize=1 outputSize=1 padZeros=1 biased=1 skip=0} }
layer 2:ActivationLayer{ SIGMOID }
layer 3:ConvolutionalLayer{ LayerDimensions{ inputPlanes=2 inputSize=1 numFilters=2 filterSize=1 outputSize=1 padZeros=1 biased=1 skip=0} }
layer 4:ActivationLayer{ SIGMOID }
layer 5:SoftMaxLayer{ perPlane=0 numPlanes=2 imageSize=1 }
ICAT@DESKTOP-KUDAHJQ MINGW64 ~/Documents/embree/build
$ make -j4
[ 1%] Building CXX object common/simd/CMakeFiles/simd.dir/sse.cpp.obj
[ 1%] Building CXX object common/sys/CMakeFiles/sys.dir/sysinfo.cpp.obj
[ 2%] Building CXX object kernels/CMakeFiles/embree_sse42.dir/geometry/grid_soa.cpp.obj
[ 3%] Building CXX object kernels/CMakeFiles/embree_avx2.dir/geometry/instance_intersector1.cpp.obj
In file included from C:/msys64/home/ICAT/Documents/embree/common/simd/sse.h:20:0,
from C:/msys64/home/ICAT/Documents/embree/common/simd/sse.cpp:17:
C:/msys64/home/ICAT/Documents/embree/common/sys/intrinsics.h:46:0: warning: "NOMINMAX" redefined
# define NOMINMAX
#include <chaiscript/chaiscript.hpp>
int main()
{
chaiscript::ChaiScript chai;
//Do all the common initialization for you script here
/*
...
*/
#include <stdio.h>
//Implements a If() that works just like if in C
//Defines a function pointer type for our callback function
typedef void(*ConditionBranchFunc)(void* val);
//This If() takes in 4 parameters, tFunc is the function called when
// condition == 1. fFunc is called when condition == 0. condition is
// weathere the statement is true or false. dataPtr is a pointer that
// points to a data structure passed to tFunc and fFunc.
#include <iostream>
#include <algorithm>
#include <functional>
#include <type_traits>
using namespace std;
auto If = [](bool condition, auto tFunc, auto fFunc)
{
function<void()> funcTable[2] = {fFunc,tFunc};