-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdsea_block.cpp
More file actions
51 lines (40 loc) · 1.4 KB
/
Copy pathdsea_block.cpp
File metadata and controls
51 lines (40 loc) · 1.4 KB
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
// Data Streaming for Explicit Algorithms - DSEA
#include <dsea.h>
#include <string>
#include <iostream>
#include <fstream>
#include <math.h>
using namespace std;
// This routine determines the actual size of a block in bytes. The maximum size is that of the storage, i.e. store_size bytes
int64_t DS::get_block_size_host(double * p_data) {
int64_t block_size=block_header_size*sizeof(double)+block_n_fields*block_ncc*sizeof(double);
return block_size;
}
// This routine determines the block size of a block stored in GPU memory
int64_t DS::get_block_size_device(double * p_data) {
int64_t block_size=block_header_size*sizeof(double)+block_n_fields*block_ncc*sizeof(double);
return block_size;
}
// This routine determines the block size of a block stored in GPU memory
int64_t DS::get_block_nm_device(double * p_data) {
int64_t i_tmp=-1;
// cudaMemcpy((void*)&i_tmp,(const void*)&p_data[block_i_general_nmol],sizeof(int64_t),cudaMemcpyDeviceToHost); cudaCheckError(__LINE__,__FILE__);
return i_tmp;
}
// This routine checks the block for consistency
int32_t DS::block_check(double * p_data, int32_t pos) {
return 0;
}
int32_t DS::block_check_device (double* data, int32_t pos) {
return 0;
}
// This routine checks the block for consistency
int32_t DS::block_get_nm(double * p_data) {
return 0;
}
int32_t DS::block_mark(double * p_data) {
return 0;
}
int32_t DS::block_markcheck(double * p_data) {
return 0;
}