When the input is gpuArray for bitxor function I get this error. How I solve it?
Ältere Kommentare anzeigen
When the input is gpuArray for bitxor function I get this error. How I solve it?

9 Kommentare
KALYAN ACHARJYA
am 13 Dez. 2020
>>whos X1
>>whos X2
Please provide?
amenah mwuafaq
am 13 Dez. 2020
Walter Roberson
am 13 Dez. 2020
Well those are both clearly datatype double(), and bitxor() requires that at least one of the two inputs be an integer class (the other can be either the same integer class or can be a scalar double.)
We do not know what range Packet and Packet2 are so we cannot guess which value range X1 and X2 are.
amenah mwuafaq
am 16 Dez. 2020
Walter Roberson
am 16 Dez. 2020
It looks like GFin is probably 16. In that case, when you take the x property of the gf() result, you are going to get uint32() of the result of the randi() . What is the purpose of going through the gf() step ?
Is it correct that class(videoFrames) is uint8 ?
It looks to me as if you are effectively working with 12 bit integers? uint8 video data, times random value that is up to 16, so maximum 4080 ?
amenah mwuafaq
am 17 Dez. 2020
Walter Roberson
am 17 Dez. 2020
What difference do you observe between selecting random numbers from gf and selecting random integers with the same maximum?
amenah mwuafaq
am 17 Dez. 2020
Walter Roberson
am 18 Dez. 2020
How do you propose to choose random numbers from a gf?
If you have an array named data that is nonnegative integers in the range 0 to 255, and you have
g = gf(data, 8)
Now you want to pick a random element from g
idx = randi(numel(g))
rg = g(idx)
rgfd = gf(data(idx), 8)
Are you expecting that rg and rgfd would be different?
Antworten (0)
Kategorien
Mehr zu Linear Algebra finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!