Alsvinn
0.5.3
The fast FVM simulator with UQ support
|
Classes | |
class | CudaMemory |
Functions | |
dim3 | calculateBlockDimensions (size_t numberOfXCells, size_t numberOfYCells, size_t numberOfZCells) |
dim3 | calculateGridDimensions (size_t numberOfXCells, size_t numberOfYCells, size_t numberOfZCells, dim3 blockDimensions) |
ivec3 __device__ | getCoordinates (dim3 threadIdx, dim3 blockIdx, dim3 blockDim, size_t numberOfXCells, size_t numberOfYCells, size_t numberOfZCells, ivec3 directionVector) |
std::tuple< int, ivec3 > | makeKernelLaunchParameters (ivec3 start, ivec3 end, size_t blockSize) |
Gets teh kernel launch paramemters. More... | |
template<class T > | |
void | add (T *result, const T *a, const T *b, size_t size) |
template<class T > | |
void | multiply (T *result, const T *a, const T *b, size_t size) |
template<class T > | |
void | subtract (T *result, const T *a, const T *b, size_t size) |
template<class T > | |
void | divide (T *result, const T *a, const T *b, size_t size) |
template<class T > | |
void | add (T *result, const T *a, T scalar, size_t size) |
template<class T > | |
void | multiply (T *result, const T *a, T scalar, size_t size) |
template<class T > | |
void | subtract (T *result, const T *a, T scalar, size_t size) |
template<class T > | |
void | divide (T *result, const T *a, T scalar, size_t size) |
template<class T > | |
void | add_linear_combination (T a1, T *v1, T a2, const T *v2, T a3, const T *v3, T a4, const T *v4, T a5, const T *v5, size_t size) |
template<class T > | |
void | add_power (T *a, const T *b, double power, size_t size) |
template<class T > | |
void | add_power (T *a, const T *b, double power, double factor, size_t size) |
template<class T > | |
void | subtract_power (T *a, const T *b, double power, size_t size) |
template<class T > | |
T | compute_total_variation (const T *a, size_t nx, size_t ny, size_t nz, int p, const ivec3 &start, const ivec3 &end) |
template<class T > | |
T | compute_total_variation (const T *a, size_t nx, size_t ny, size_t nz, size_t direction, int p, const ivec3 &start, const ivec3 &end) |
void alsfvm::cuda::add | ( | T * | result, |
const T * | a, | ||
const T * | b, | ||
size_t | size | ||
) |
Adds a and b and stores the result to result
result | the device memory to write to (can be the same as a or b). Must have length size (in T) |
a | must have length size (in T) |
b | must have length size (in T) |
size | the size of the memory (in T) |
void alsfvm::cuda::add | ( | T * | result, |
const T * | a, | ||
T | scalar, | ||
size_t | size | ||
) |
Adds scalar to each component of b and stores the result to result
result | the device memory to write to (can be the same as a ). Must have length size (in T) |
a | must have length size (in T) |
scalar | the scalar |
size | the size of the memory (in T) |
void alsfvm::cuda::add_linear_combination | ( | T | a1, |
T * | v1, | ||
T | a2, | ||
const T * | v2, | ||
T | a3, | ||
const T * | v3, | ||
T | a4, | ||
const T * | v4, | ||
T | a5, | ||
const T * | v5, | ||
size_t | size | ||
) |
Adds the memory with coefficients to this memory area Here we compute the sum
where is the volume being operated on.
void alsfvm::cuda::add_power | ( | T * | a, |
const T * | b, | ||
double | power, | ||
size_t | size | ||
) |
Basically runs
void alsfvm::cuda::add_power | ( | T * | a, |
const T * | b, | ||
double | power, | ||
double | factor, | ||
size_t | size | ||
) |
Basically runs
|
inline |
|
inline |
T alsfvm::cuda::compute_total_variation | ( | const T * | a, |
size_t | nx, | ||
size_t | ny, | ||
size_t | nz, | ||
int | p, | ||
const ivec3 & | start, | ||
const ivec3 & | end | ||
) |
T alsfvm::cuda::compute_total_variation | ( | const T * | a, |
size_t | nx, | ||
size_t | ny, | ||
size_t | nz, | ||
size_t | direction, | ||
int | p, | ||
const ivec3 & | start, | ||
const ivec3 & | end | ||
) |
void alsfvm::cuda::divide | ( | T * | result, |
const T * | a, | ||
const T * | b, | ||
size_t | size | ||
) |
Divides a by b and stores the result to result
result | the device memory to write to (can be the same as a or b). Must have length size (in T) |
a | must have length size (in T) |
b | must have length size (in T) |
size | the size of the memory (in T) |
void alsfvm::cuda::divide | ( | T * | result, |
const T * | a, | ||
T | scalar, | ||
size_t | size | ||
) |
Divides scalar from each component of b and stores the result to result
result | the device memory to write to (can be the same as a ). Must have length size (in T) |
a | must have length size (in T) |
scalar | the scalar |
size | the size of the memory (in T) |
|
inline |
Gets the spatial (in grid cell integer coordinates) coordinates
This is typically useful when launching a CUDA kernel that needs neighbouring cells
|
inline |
Gets teh kernel launch paramemters.
void alsfvm::cuda::multiply | ( | T * | result, |
const T * | a, | ||
const T * | b, | ||
size_t | size | ||
) |
Multiplies a and b and stores the result to result
result | the device memory to write to (can be the same as a or b). Must have length size (in T) |
a | must have length size (in T) |
b | must have length size (in T) |
size | the size of the memory (in T) |
void alsfvm::cuda::multiply | ( | T * | result, |
const T * | a, | ||
T | scalar, | ||
size_t | size | ||
) |
Multiplies scalar to each component of b and stores the result to result
result | the device memory to write to (can be the same as a ). Must have length size (in T) |
a | must have length size (in T) |
size | the size of the memory (in T) |
scalar | the scalar |
void alsfvm::cuda::subtract | ( | T * | result, |
const T * | a, | ||
const T * | b, | ||
size_t | size | ||
) |
Subtracts a from b and stores the result to result
result | the device memory to write to (can be the same as a or b). Must have length size (in T) |
a | must have length size (in T) |
b | must have length size (in T) |
size | the size of the memory (in T) |
void alsfvm::cuda::subtract | ( | T * | result, |
const T * | a, | ||
T | scalar, | ||
size_t | size | ||
) |
Subtracts scalar from each component of b and stores the result to result
result | the device memory to write to (can be the same as a ). Must have length size (in T) |
a | must have length size (in T) |
scalar | the scalar |
size | the size of the memory (in T) |
void alsfvm::cuda::subtract_power | ( | T * | a, |
const T * | b, | ||
double | power, | ||
size_t | size | ||
) |
Basically runs