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
#include <stdlib.h> | |
#include <sys/time.h> | |
#include <string> | |
#include <iostream> | |
#include <fstream> | |
#include "converter.h" | |
#include "config.h" | |
#include "bfsqueue.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
/************************************************************************* | |
** Iterative solver: Gauss/Seidel method | |
** | |
** Author: RW | |
** | |
*************************************************************************/ | |
#include <stdlib.h> | |
#include <math.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
/************************************************************************* | |
** Iterative solver: Jacobi method | |
** | |
** Author: RW | |
** | |
*************************************************************************/ | |
#include <iostream> | |
#include <stdlib.h> | |
#include <math.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
/*************************************************************************** | |
* Numerical Integration * | |
***************************************************************************/ | |
#include <iostream> | |
#include <iomanip> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <sys/time.h> | |
#include <omp.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
/*************************************************************************** | |
* Loop Parallelization | |
* | |
* Examine the loops below and check, if they can be parallelized. | |
* If so, parallelize these loops. Then run the program with 4 threads. | |
* It checks whether the result is the same as in the sequential version. | |
***************************************************************************/ | |
/* Do not change the following declarations! */ | |
#define N 1000 |
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
#include <iostream> | |
#include <iomanip> | |
#include <stdlib.h> | |
#include <sys/time.h> | |
#include <pthread.h> | |
#include <errno.h> | |
#define MINSIZE 2000000 | |
using namespace std; | |
void *quicksort(void *); |
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
#include <iostream> | |
#include <iomanip> | |
#include <math.h> | |
#include <sys/time.h> | |
#include <pthread.h> | |
using namespace std; | |
extern double getTime(); | |
extern double f1(); |
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
/** | |
* Filters an array of objects with multiple criteria. | |
* | |
* @param {Array} array: the array to filter | |
* @param {Object} filters: an object with the filter criteria as the property names | |
* @return {Array} | |
*/ | |
function multiFilter(array, filters) { | |
const filterKeys = Object.keys(filters); | |
// filters all elements passing the criteria |
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
import {createStore} from 'redux'; | |
const counter = (state = 0, action) => { | |
const index = { | |
'INCREMENT': () => { | |
return state+1; | |
}, | |
'DECREMENT': () => { | |
return state-1; | |
}, |
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
import { takeLatest } from 'redux-saga' | |
import { call, put } from 'redux-saga/effects' | |
import fetch from 'isomorphic-fetch' | |
import * as actions from './modules/grid' | |
import * as api from '../lib/api' | |
export function* fetchGrids(action) { | |
try { | |
const grids = yield call(api.GET, 'grids') | |
yield put(actions.fetchGridsSuccess(grids)) |
NewerOlder