-
Notifications
You must be signed in to change notification settings - Fork 10
GPU compatibility
Gabriele Bozzola edited this page Nov 20, 2023
·
8 revisions
If you are using Ref
to pass a constant to all the broadcasted calls, use a keyword argument instead.
Instead of:
func1(a, b) = a * b
A = [1, 2, 3]
B = 2
result = func1.(A, Ref(B))
func2(a; b) = a * b
A = [1, 2, 3]
B = 2
result = func2.(A; b = B)
When you define a new struct, check that isbits(A)
is true
, where A
is a typical instance of your struct.