Skip to content

create GPU-based curl function #25

Open
@leios

Description

Determining the magnetic field takes a lot of time because it is CPU-only. As such, a GPU kernel would be nice... Along with an additional derivative function (psuedocode):

___global___ void derive(data, out, stride, n, dx){
    int gid = [init]
    if (gid + stride < n){
        out[gid] = (data[gid+stride] - data[gid])/dx
    }
    else{
        out[gid] = data[gid]/dx
    }
}

Here, a stride of 1 -> xDim, xDim -> yDim, xDim*yDim -> zDim derivatives

then we just use this to create our curl function, so we might want to make a separate __device__ kernel as well.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions