-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version bump for merging. benchmark updated
- Loading branch information
Showing
7 changed files
with
60 additions
and
37 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ cmake_policy(SET CMP0148 OLD) | |
|
||
project( | ||
dmt | ||
VERSION 0.1.0 | ||
VERSION 0.2.0 | ||
LANGUAGES CXX | ||
) | ||
|
||
|
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,24 @@ | ||
#include <cuda_runtime.h> | ||
|
||
#include <dmt/fdmt_gpu.hpp> | ||
|
||
FDMTGPU::FDMTGPU(float f_min, float f_max, size_t nchans, size_t nsamps, | ||
float tsamp, size_t dt_max, size_t dt_step, size_t dt_min) | ||
: FDMT(f_min, f_max, nchans, nsamps, tsamp, dt_max, dt_step, dt_min) { | ||
// Allocate memory for the state buffers | ||
const auto& plan = get_plan(); | ||
const auto state_size = plan.state_shape[0][3] * plan.state_shape[0][4]; | ||
m_state_in_d.resize(state_size, 0.0F); | ||
m_state_out_d.resize(state_size, 0.0F); | ||
transfer_plan_to_device(plan, m_fdmt_plan_d); | ||
} | ||
|
||
void FDMTGPU::transfer_plan_to_device(const FDMTPlan& plan, FDMTPlanD& plan_d) { | ||
// Transfer the plan to the device | ||
const auto niter = plan.state_shape.size(); | ||
plan_d.state_shape_d.resize(niter); | ||
for (size_t i = 0; i < niter; ++i) { | ||
const auto& shape = plan.state_shape[i]; | ||
plan_d.state_shape_d[i] = make_int4(shape[0], shape[1], shape[2], shape[3]); | ||
} | ||
} |
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