-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple eikonal solver implementation based on https://github.com/SCII…
- Loading branch information
Showing
18 changed files
with
1,340 additions
and
412 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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
if [ -n "$CUDA_FOUND" ]; then | ||
|
||
EIKONAL_SOURCE_FILES="eikonal_solver.c cuda_fim.cu cuda_fim_kernel.cu" | ||
EIKONAL_HEADER_FILES="eikonal_solver.h common_def.h cuda_fim.h cuda_fim_kernel.h" | ||
EIKONAL_EXTRA_LIB_PATH=$CUDA_LIBRARY_PATH | ||
EIKONAL_DYNAMIC_LIBS="c cudart" | ||
|
||
COMPILE_SHARED_LIB "eikonal_solver" "$EIKONAL_SOURCE_FILES" "$EIKONAL_HEADER_FILES" "" "$EIKONAL_DYNAMIC_LIBS" "$EIKONAL_EXTRA_LIB_PATH" "" "$CUDA_FOUND" | ||
|
||
fi |
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// | ||
// CUDA implementation of FIM (Fast Iterative Method) for Eikonal equations | ||
// | ||
// Copyright (c) Won-Ki Jeong (wkjeong@unist.ac.kr) | ||
// | ||
// 2016. 2. 4 | ||
// | ||
|
||
// | ||
// Common to entire project | ||
// | ||
|
||
#ifndef __COMMON_DEF_H__ | ||
#define __COMMON_DEF_H__ | ||
|
||
#include <stdbool.h> | ||
#include "../common_types/common_types.h" | ||
|
||
// | ||
// common definition for Eikonal solvers | ||
// | ||
#ifndef INF | ||
#define INF 1e20//FLT_MAX // | ||
#endif | ||
|
||
#define BLOCK_LENGTH 4 | ||
|
||
// | ||
// itk image volume definition for 3D anisotropic eikonal solvers | ||
// | ||
typedef unsigned int uint; | ||
typedef unsigned char uchar; | ||
|
||
struct CUDA_MEM_STRUCTURE { | ||
// volsize/blksize : # of pixel in volume/block | ||
// blknum : # of block | ||
// blklength : # of pixel in one dimemsion of block | ||
uint nActiveBlock, blknum, volsize, blksize; | ||
int xdim, ydim, zdim, nIter, blklength; // new new x,y,z dim to aligh power of 4 | ||
|
||
// host memory | ||
uint *h_list; | ||
bool *h_listVol, *h_listed; | ||
|
||
// device memory | ||
uint *d_list; | ||
real *d_spd; | ||
bool *d_mask, *d_listVol, *d_con; | ||
|
||
real *h_sol;//h_speedtable[256]; | ||
real *d_sol, *t_sol; | ||
|
||
// GroupOrder | ||
int* blockOrder; | ||
int K; | ||
}; | ||
|
||
typedef struct CUDA_MEM_STRUCTURE CUDAMEMSTRUCT; | ||
|
||
#endif |
Oops, something went wrong.