polar_ex 1 %complex_polar_ex.m 2 clear all 3 close all 4 clc 5 theta = 0:0.1:2*pi; 6 rho = 2; % 큰 원의 반지름 7 z = rho*exp(i*theta); 8 figure 9 polar(angle(z), abs(z), 'k')10 set(gcf, 'c...
boost Array Example 1 #include <iostream> 2 #include "boost/multi_array.hpp" 3 4 using namespace std; 5 6 int main() { 7 boost::array<int, 4> array = {{1,2,3,4}}; 8 for (int i ...
多项式乘多项式(C++) 1 // CPolyn.cpp 2 #include <stdio.h> 3 #include <stdlib.h> 4 #include <iostream> 5 #include <math.h> 6 #define eps 1e-8 7 const int nArrA = 5; ...
Fast Fourier Transform(FFT C++) 1 #include <iostream> 2 #include <stdio.h> 3 #include <stdlib.h> 4 #include <cmath> 5 6 #define pi 3.1415926 7 #define Nall 32768 8 #define M ...
make build & make clean DIRS :=fold1\fold2\fold3build: @for dir in $(DIRS); do\ make -C $$dir ;\ doneclean: @for dir in $(DIRS); do\ make -C $$dir clean; \ ...
Makefile for OpenCL INCLUDE=-I/usr/local/cuda/include/\ -I/usr/local/cuda/include/CL\ -I/usr/include \ -I/usr/include/c++LIBRARY_PATH :=-L/usr/local/cuda/lib64LIBRARIE...
Makefile for CUDA 1 CUDA_PATH ?=/usr/local/cuda-7.0 2 NVCC :=$(CUDA_PATH)/bin/nvcc -ccbin g++ 3 INCLUDE :=-I/usr/local/cuda-7.0/include/\ 4 -I/usr/local/cuda/samples/common/inc\ 5 ...
BMP Header Structure 1 /* ***** BEGIN LICENSE BLOCK ***** 2 * 3 * $Id: bitmap.h,v 1.3 2004/06/30 16:44:52 asuraparaju Exp $ $Name: Dirac_1_0_2 $ 4 * 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 6 *...
OpenCL Device Information 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 #ifdef __APPLE__ 5 #include <OpenCL/opencl.h> 6 #else 7 #include <CL/cl.h> 8 #endif 9 10 11 ...
CUDA FFT DEMO 1 #include "cuda_runtime.h" 2 #include "device_launch_parameters.h" 3 #include <stdio.h> 4 #include "cufft.h" 5 6 #define Nx 29 // FFT 7 #define Ny 1 // FFTÃÑ...
c data type #elif define _WIN32 typedef __int64 int64; //Portable signed long integer 8 bytes typedef int int32; typedef signed short int int16; ...
sim_simple 1 `timescale 1ns / 1ps 2 ////////////////////////////////////////////////////////////////////////////////// 3 //sim_sample.v 4 ///////////////////////////////////////////////////////////...
CUDA matrixMulCUBLAS 1 /////////////////////////////////////////////////////////////////////////// 2 // matirxmulCUBLAS.cpp 3 // 4 // Copyright 1993-2013 NVIDIA Corporation. All rights reserved. ...
Makefile for Boost Array Test 1 INCLUDEPATH=-I/usr/include/c++/4.8.4\ 2 -I./\ 3 -I/home/william/Project/boost_1_59_0 4 SOURCEDIR=./ 5 LIBRARYPATH:= 6 LIBRARY:= 7 SRCS=$(foreach dir,$(SOURCEDIR), $(wildcar...
Boost Library Array1D, Array2D Test 1 /*********************************************************************/ 2 /* Arrays.h */ 3 /* Author: Tim Borer ...
2. 单链表 // LinkSeqList.h#include <iostream>#include <cstring>using namespace std;struct node{ int data1; char data2[10]; node *next;};typedef node* ptrN;class...
Makefile for FFT(C++ Version) 1 INCLUDEPATH=-I/usr/include/c++/4.8.4\ 2 -I../SharedHeader \ 3 -I./ 4 SOURCEDIR=./ 5 LIBRARYPATH:= 6 LIBRARY:= 7 SRCS=$(foreach dir,$(SOURCEDIR), $(wildca...
Chapter 1 顺序表 //SeqList.h #include <iostream>using namespace std;const int DefaultSize=100;template <typename Type>class SeqList{public: SeqList(int sz=DefaultSize):m_nmaxsize(sz),m_n...
Two Dimension Array // Ex_2DArray.cpp#include <stdio.h>#include <stdlib.h>#include <iostream>using namespace std;int main(){int x, y;scanf("%d,%d",&x,&y); // row:x , c...
CUDA Vector Add Test 2048x1024 1 #include "cuda_runtime.h" // CUDAVectorAdd.cu 2 #include "device_launch_parameters.h" 3 #include "IML_PrecisionTimer.h" 4 5 #include <stdio.h> 6 #define MEM_SIZE (20...