This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* tutorial-utils.h | |
* | |
* Created on: Apr 5, 2014 | |
* Author: chung | |
*/ | |
#ifndef TUTORIAL_UTILS_H_ | |
#define TUTORIAL_UTILS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__global__ void initialize_vec(int *a) { | |
int tid = blockIdx.x; | |
a[tid] = tid; | |
} | |
void do_stream_init(void) { | |
/* Declarations */ | |
int *d_a, *d_b; | |
int *h_a; | |
int i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define CUDA_CALL(value) do { \ | |
cudaError_t _m_cudaStat = value; \ | |
if (_m_cudaStat != cudaSuccess) { \ | |
fprintf(stderr, "Error %s at line %d in file %s\n", \ | |
cudaGetErrorString(_m_cudaStat), __LINE__, __FILE__); \ | |
exit(1); \ | |
} } while(0) | |
#define CUBLAS_CALL(value) do { \ | |
cublasStatus_t _m_status = value; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile using the following commands: | |
// nvcc -I/usr/local/cuda-5.0/samples/common/inc -I/usr/local/cuda-5.0/samples/7_CUDALibraries -G -g -O3 -gencode arch=compute_20,code=sm_20 -odir "src" -M -o "parallel-cublas-operations.d" "parallel-cublas-operations.cu" | |
// nvcc --compile -G -I/usr/local/cuda-5.0/samples/common/inc -I/usr/local/cuda-5.0/samples/7_CUDALibraries -O3 -g -gencode arch=compute_20,code=compute_20 -gencode arch=compute_20,code=sm_20 -x cu -o "parallel-cublas-operations.o" "parallel-cublas-operations.cu" | |
/* Includes */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <cuda_runtime.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21:46:38 **** Build of configuration Debug for project pQP **** | |
make all | |
Building file: ../src/pQP.cu | |
Invoking: NVCC Compiler | |
/usr/local/cuda-6.0/bin/nvcc -I/usr/local/cula/include/ -I/home/chung/lapack-3.5.0/lapacke/include -G -g -O0 -gencode arch=compute_20,code=sm_20 -odir "src" -M -o "src/pQP.d" "../src/pQP.cu" | |
/usr/local/cuda-6.0/bin/nvcc --compile -G -I/usr/local/cula/include/ -I/home/chung/lapack-3.5.0/lapacke/include -O0 -g -gencode arch=compute_20,code=compute_20 -gencode arch=compute_20,code=sm_20 -x cu -o "src/pQP.o" "../src/pQP.cu" | |
Finished building: ../src/pQP.cu | |
Building target: pQP | |
Invoking: NVCC Linker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# mexopts.sh Shell script for configuring MEX-file creation script, | |
# mex. These options were tested with the specified compiler. | |
# | |
# usage: Do not call this file directly; it is sourced by the | |
# mex shell script. Modify only if you don't like the | |
# defaults after running mex. No spaces are allowed | |
# around the '=' in the variable assignment. | |
# | |
# Note: For the version of system compiler supported with this release, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Define the matrices of the system: | |
A = [0 1; -0.25 1]; | |
B = [0; 1]; | |
C = [1 0.5]; | |
D = 0; | |
% Define the state-space system using ss: | |
sysStruct = struct('A',A,'B',B,'C',C,'D',D); | |
% Provide the set of disturbances | |
sysStruct.D_poly=0.01*unitbox(2,1); | |
% Define the constraints: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function tf = isBounded(P) | |
% | |
% ISBOUNDED: Test if a polyhedron is bounded. | |
% ============================================ | |
% | |
% | |
% SYNTAX | |
% ------ | |
% | |
% tf = P.isBounded |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% If you need to know the ancestor of node #123, you do: | |
TREE.ancestor(123) | |
% If you need to access all children of node #12 you do | |
TREE.children{12} | |
% and you get an array | |
% The leave nodes are stored at | |
TREE.leaves |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"study": [ | |
{ | |
"uuid": "IUC5-89019c4a-acc8-4457-8a5a-4db66cd16ff3", | |
"owner": { | |
"substance": { | |
"uuid": "IUC4-d0966414-0e9b-3610-ab7d-7d27848027e2" | |
}, | |
"company": { | |
"uuid": "IUC4-44bf02d8-47c5-385d-b203-9a8f315911cb", |
OlderNewer