Skip to content

Commit b69053c

Browse files
JieyangChen7qliu21
authored andcommitted
Turn off clang-format for certain *.in files in mgard-x
1 parent 5410bf3 commit b69053c

39 files changed

+529
-481
lines changed

include/mgard-x/CompressionLowLevel/CompressionLowLevel.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ compress(Hierarchy<D, T, DeviceType> &hierarchy,
5858
T s, T &norm, Config config) {
5959
DeviceRuntime<DeviceType>::SelectDevice(config.dev_id);
6060
if (config.timing) {
61-
std::cout << log::log_info << "Select device: "
62-
<< DeviceRuntime<DeviceType>::GetDeviceName() << "\n";
61+
std::cout << log::log_info
62+
<< "Select device: " << DeviceRuntime<DeviceType>::GetDeviceName()
63+
<< "\n";
6364
}
6465
Timer timer_total, timer_each;
6566
for (DIM i = 0; i < D; i++) {
@@ -206,7 +207,7 @@ compress(Hierarchy<D, T, DeviceType> &hierarchy,
206207
SubArray<1, SIZE, DeviceType>(hierarchy.shapes[0], true),
207208
SubArray<1, LENGTH, DeviceType>(outlier_count_array),
208209
outlier_idx_subarray, outliers_subarray, 0);
209-
210+
210211
MemoryManager<DeviceType>::Copy1D(&outlier_count, outlier_count_array.data(),
211212
1, 0);
212213

@@ -385,8 +386,9 @@ decompress(Hierarchy<D, T, DeviceType> &hierarchy,
385386
enum error_bound_type type, T tol, T s, T norm, Config config) {
386387
DeviceRuntime<DeviceType>::SelectDevice(config.dev_id);
387388
if (config.timing) {
388-
std::cout << log::log_info << "Select device: "
389-
<< DeviceRuntime<DeviceType>::GetDeviceName() << "\n";
389+
std::cout << log::log_info
390+
<< "Select device: " << DeviceRuntime<DeviceType>::GetDeviceName()
391+
<< "\n";
390392
}
391393
Timer timer_total, timer_each;
392394

include/mgard-x/DataRefactoring/MultiDimension/Coefficient/GridProcessingKernel.hpp

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,28 +2274,28 @@ class GpkReo : public AutoTuner<DeviceType> {
22742274
int min_config = 0;
22752275
ExecutionReturn ret;
22762276

2277-
#define GPK(CONFIG) \
2278-
if (config == CONFIG || AutoTuner<DeviceType>::ProfileKernels) { \
2279-
const int R = GPK_CONFIG[D_LOCAL - 1][CONFIG][0]; \
2280-
const int C = GPK_CONFIG[D_LOCAL - 1][CONFIG][1]; \
2281-
const int F = GPK_CONFIG[D_LOCAL - 1][CONFIG][2]; \
2282-
using FunctorType = \
2283-
GpkReoFunctor<D_GLOBAL, D_LOCAL, T, R, C, F, INTERPOLATION, \
2284-
CALC_COEFF, TYPE, DeviceType>; \
2285-
using TaskType = Task<FunctorType>; \
2286-
TaskType task = GenTask<R, C, F>( \
2287-
shape, shape_c, unprocessed_n, unprocessed_dims, curr_dim_r, \
2288-
curr_dim_c, curr_dim_f, ratio_r, ratio_c, ratio_f, v, w, wf, wc, wr, \
2289-
wcf, wrf, wrc, wrcf, queue_idx); \
2290-
DeviceAdapter<TaskType, DeviceType> adapter; \
2291-
ret = adapter.Execute(task); \
2292-
if (AutoTuner<DeviceType>::ProfileKernels) { \
2293-
if (ret.success && min_time > ret.execution_time) { \
2294-
min_time = ret.execution_time; \
2295-
min_config = CONFIG; \
2296-
} \
2297-
} \
2298-
}
2277+
#define GPK(CONFIG) \
2278+
if (config == CONFIG || AutoTuner<DeviceType>::ProfileKernels) { \
2279+
const int R = GPK_CONFIG[D_LOCAL - 1][CONFIG][0]; \
2280+
const int C = GPK_CONFIG[D_LOCAL - 1][CONFIG][1]; \
2281+
const int F = GPK_CONFIG[D_LOCAL - 1][CONFIG][2]; \
2282+
using FunctorType = \
2283+
GpkReoFunctor<D_GLOBAL, D_LOCAL, T, R, C, F, INTERPOLATION, \
2284+
CALC_COEFF, TYPE, DeviceType>; \
2285+
using TaskType = Task<FunctorType>; \
2286+
TaskType task = GenTask<R, C, F>( \
2287+
shape, shape_c, unprocessed_n, unprocessed_dims, curr_dim_r, \
2288+
curr_dim_c, curr_dim_f, ratio_r, ratio_c, ratio_f, v, w, wf, wc, wr, \
2289+
wcf, wrf, wrc, wrcf, queue_idx); \
2290+
DeviceAdapter<TaskType, DeviceType> adapter; \
2291+
ret = adapter.Execute(task); \
2292+
if (AutoTuner<DeviceType>::ProfileKernels) { \
2293+
if (ret.success && min_time > ret.execution_time) { \
2294+
min_time = ret.execution_time; \
2295+
min_config = CONFIG; \
2296+
} \
2297+
} \
2298+
}
22992299

23002300
GPK(6) if (!ret.success) config--;
23012301
GPK(5) if (!ret.success) config--;
@@ -4695,27 +4695,27 @@ class GpkRev : public AutoTuner<DeviceType> {
46954695
ExecutionReturn ret;
46964696

46974697
#define GPK(CONFIG) \
4698-
if (config == CONFIG || AutoTuner<DeviceType>::ProfileKernels) { \
4699-
const int R = GPK_CONFIG[D_LOCAL - 1][CONFIG][0]; \
4700-
const int C = GPK_CONFIG[D_LOCAL - 1][CONFIG][1]; \
4701-
const int F = GPK_CONFIG[D_LOCAL - 1][CONFIG][2]; \
4702-
using FunctorType = \
4703-
GpkRevFunctor<D_GLOBAL, D_LOCAL, T, R, C, F, INTERPOLATION, \
4704-
CALC_COEFF, TYPE, DeviceType>; \
4705-
using TaskType = Task<FunctorType>; \
4706-
TaskType task = GenTask<R, C, F>( \
4707-
shape, shape_c, unprocessed_n, unprocessed_dims, curr_dim_r, \
4708-
curr_dim_c, curr_dim_f, ratio_r, ratio_c, ratio_f, v, w, wf, wc, wr, \
4709-
wcf, wrf, wrc, wrcf, svr, svc, svf, nvr, nvc, nvf, queue_idx); \
4710-
DeviceAdapter<TaskType, DeviceType> adapter; \
4711-
ret = adapter.Execute(task); \
4712-
if (AutoTuner<DeviceType>::ProfileKernels) { \
4713-
if (ret.success && min_time > ret.execution_time) { \
4714-
min_time = ret.execution_time; \
4715-
min_config = CONFIG; \
4716-
} \
4717-
} \
4718-
}
4698+
if (config == CONFIG || AutoTuner<DeviceType>::ProfileKernels) { \
4699+
const int R = GPK_CONFIG[D_LOCAL - 1][CONFIG][0]; \
4700+
const int C = GPK_CONFIG[D_LOCAL - 1][CONFIG][1]; \
4701+
const int F = GPK_CONFIG[D_LOCAL - 1][CONFIG][2]; \
4702+
using FunctorType = \
4703+
GpkRevFunctor<D_GLOBAL, D_LOCAL, T, R, C, F, INTERPOLATION, \
4704+
CALC_COEFF, TYPE, DeviceType>; \
4705+
using TaskType = Task<FunctorType>; \
4706+
TaskType task = GenTask<R, C, F>( \
4707+
shape, shape_c, unprocessed_n, unprocessed_dims, curr_dim_r, \
4708+
curr_dim_c, curr_dim_f, ratio_r, ratio_c, ratio_f, v, w, wf, wc, wr, \
4709+
wcf, wrf, wrc, wrcf, svr, svc, svf, nvr, nvc, nvf, queue_idx); \
4710+
DeviceAdapter<TaskType, DeviceType> adapter; \
4711+
ret = adapter.Execute(task); \
4712+
if (AutoTuner<DeviceType>::ProfileKernels) { \
4713+
if (ret.success && min_time > ret.execution_time) { \
4714+
min_time = ret.execution_time; \
4715+
min_config = CONFIG; \
4716+
} \
4717+
} \
4718+
}
47194719

47204720
GPK(6) if (!ret.success) config--;
47214721
GPK(5) if (!ret.success) config--;

include/mgard-x/DataRefactoring/MultiDimension/Coefficient/GridProcessingKernel3D.hpp

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,24 +1235,24 @@ class GpkReo3D : public AutoTuner<DeviceType> {
12351235
ExecutionReturn ret;
12361236

12371237
#define GPK(CONFIG) \
1238-
if (config == CONFIG || AutoTuner<DeviceType>::ProfileKernels) { \
1239-
const int R = GPK_CONFIG[D - 1][CONFIG][0]; \
1240-
const int C = GPK_CONFIG[D - 1][CONFIG][1]; \
1241-
const int F = GPK_CONFIG[D - 1][CONFIG][2]; \
1242-
using FunctorType = GpkReo3DFunctor<D, T, R, C, F, DeviceType>; \
1243-
using TaskType = Task<FunctorType>; \
1244-
TaskType task = GenTask<R, C, F>(nr, nc, nf, nr_c, nc_c, nf_c, ratio_r, \
1245-
ratio_c, ratio_f, v, w, wf, wc, wr, wcf, \
1246-
wrf, wrc, wrcf, queue_idx); \
1247-
DeviceAdapter<TaskType, DeviceType> adapter; \
1248-
ret = adapter.Execute(task); \
1249-
if (AutoTuner<DeviceType>::ProfileKernels) { \
1250-
if (ret.success && min_time > ret.execution_time) { \
1251-
min_time = ret.execution_time; \
1252-
min_config = CONFIG; \
1253-
} \
1254-
} \
1255-
}
1238+
if (config == CONFIG || AutoTuner<DeviceType>::ProfileKernels) { \
1239+
const int R = GPK_CONFIG[D - 1][CONFIG][0]; \
1240+
const int C = GPK_CONFIG[D - 1][CONFIG][1]; \
1241+
const int F = GPK_CONFIG[D - 1][CONFIG][2]; \
1242+
using FunctorType = GpkReo3DFunctor<D, T, R, C, F, DeviceType>; \
1243+
using TaskType = Task<FunctorType>; \
1244+
TaskType task = GenTask<R, C, F>(nr, nc, nf, nr_c, nc_c, nf_c, ratio_r, \
1245+
ratio_c, ratio_f, v, w, wf, wc, wr, wcf, \
1246+
wrf, wrc, wrcf, queue_idx); \
1247+
DeviceAdapter<TaskType, DeviceType> adapter; \
1248+
ret = adapter.Execute(task); \
1249+
if (AutoTuner<DeviceType>::ProfileKernels) { \
1250+
if (ret.success && min_time > ret.execution_time) { \
1251+
min_time = ret.execution_time; \
1252+
min_config = CONFIG; \
1253+
} \
1254+
} \
1255+
}
12561256

12571257
GPK(6) if (!ret.success) config--;
12581258
GPK(5) if (!ret.success) config--;
@@ -2453,24 +2453,24 @@ class GpkRev3D : public AutoTuner<DeviceType> {
24532453
ExecutionReturn ret;
24542454

24552455
#define GPK(CONFIG) \
2456-
if (config == CONFIG || AutoTuner<DeviceType>::ProfileKernels) { \
2457-
const int R = GPK_CONFIG[D - 1][CONFIG][0]; \
2458-
const int C = GPK_CONFIG[D - 1][CONFIG][1]; \
2459-
const int F = GPK_CONFIG[D - 1][CONFIG][2]; \
2460-
using FunctorType = GpkRev3DFunctor<D, T, R, C, F, DeviceType>; \
2461-
using TaskType = Task<FunctorType>; \
2462-
TaskType task = GenTask<R, C, F>( \
2463-
nr, nc, nf, nr_c, nc_c, nf_c, ratio_r, ratio_c, ratio_f, v, w, wf, wc, \
2464-
wr, wcf, wrf, wrc, wrcf, svr, svc, svf, nvr, nvc, nvf, queue_idx); \
2465-
DeviceAdapter<TaskType, DeviceType> adapter; \
2466-
ret = adapter.Execute(task); \
2467-
if (AutoTuner<DeviceType>::ProfileKernels) { \
2468-
if (ret.success && min_time > ret.execution_time) { \
2469-
min_time = ret.execution_time; \
2470-
min_config = CONFIG; \
2471-
} \
2472-
} \
2473-
}
2456+
if (config == CONFIG || AutoTuner<DeviceType>::ProfileKernels) { \
2457+
const int R = GPK_CONFIG[D - 1][CONFIG][0]; \
2458+
const int C = GPK_CONFIG[D - 1][CONFIG][1]; \
2459+
const int F = GPK_CONFIG[D - 1][CONFIG][2]; \
2460+
using FunctorType = GpkRev3DFunctor<D, T, R, C, F, DeviceType>; \
2461+
using TaskType = Task<FunctorType>; \
2462+
TaskType task = GenTask<R, C, F>( \
2463+
nr, nc, nf, nr_c, nc_c, nf_c, ratio_r, ratio_c, ratio_f, v, w, wf, wc, \
2464+
wr, wcf, wrf, wrc, wrcf, svr, svc, svf, nvr, nvc, nvf, queue_idx); \
2465+
DeviceAdapter<TaskType, DeviceType> adapter; \
2466+
ret = adapter.Execute(task); \
2467+
if (AutoTuner<DeviceType>::ProfileKernels) { \
2468+
if (ret.success && min_time > ret.execution_time) { \
2469+
min_time = ret.execution_time; \
2470+
min_config = CONFIG; \
2471+
} \
2472+
} \
2473+
}
24742474

24752475
GPK(6) if (!ret.success) config--;
24762476
GPK(5) if (!ret.success) config--;

0 commit comments

Comments
 (0)