-
Notifications
You must be signed in to change notification settings - Fork 2
/
loader.h
60 lines (47 loc) · 1.56 KB
/
loader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "engine.h"
#include <fstream>
#include <string>
#include <utility>
#include <vector>
#include <iostream>
#include <sstream>
#include <assert.h>
#include <cmath>
void Load_coeffs(Constant_Coeffs& ce);
template <typename T>
pair<int, int> load_file(const char* filename, vector<T> &arr);
template <typename T>
void save_file(T* array, int width, int height, const char* filename);
void save_result(Argument_Pointers h_arg_pointer, int t);
void save_FS(Argument_Pointers h_arg_pointer, int t, DOUBLE ros);
pair<int, int> load_inputs(string dir, vector<DOUBLE> &h,
vector<DOUBLE> &hsnham,
vector<DOUBLE> &VISCOIDX,
vector <DOUBLE> &Fw,
vector<DOUBLE> &bc_up,
vector<DOUBLE> &bc_right,
vector<DOUBLE> &bc_left,
vector<DOUBLE> &bc_down,
vector<DOUBLE> &CC_u,
vector<DOUBLE> &CC_d,
vector<DOUBLE> &CC_l,
vector<DOUBLE> &CC_r,
vector<int> &bienQ,
vector<int> &boundary_type,
int* total_time);
// cudaError_t initialize(int device);
void load_initial_condition(string dir,
vector<DOUBLE> &u,
vector<DOUBLE> &v,
vector<DOUBLE> &z,
vector<DOUBLE> &FS,
vector<int> &khouot);
template <typename T>
void device_copy(vector<T> &source, T* des);
template <typename T>
T* device_alloc(int nBytes);
template <typename T>
T* device_alloc_and_copy(vector<T> &h_array);
Array_Pointers supporting_arrays_alloc(int M, int N, Array_Pointers** device_arr_ptr);
Argument_Pointers attribute_arrays_memory_alloc(int device, Host_arrays &ap, Argument_Pointers** device_arg_ptr);
// void update_boundary()