You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: education/sheffield_onedaycuda/lab01.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Note: The $$mod$$ operation is not the same as the remainder operator (`%`) for
30
30
31
31
As each of the encrypted character values are independent we can use the GPU to decrypt them in parallel. To do this we will launch a thread for each of the encrypted character values and use a kernel function to perform the decryption. Starting from the code provided in `exercise01.cu`, complete the following;
32
32
33
-
* 1.1. Modify the modulo function so that it can be called on the device by the `affine_decrypt` kernel.
33
+
* 1.1. Modify the `modulo` function (by adding an appropriate function decorator) so that it can be called on the device by the `affine_decrypt` kernel.
34
34
* 1.2. Implement the decryption kernel for a single block of threads with an `x` dimension of `N` (`1024`). The function should store the result in `d_output`. You can define the inverse modulus `A`, `B` and `M` using a C pre-processor definition.
35
35
* 1.3. Allocate some memory on the device for the input (`d_input`) and output (`d_output`).
36
36
* 1.4. Copy the host input values in `h_input` to the device memory `d_input`.
0 commit comments