Comments (5)
Hi, of course you can!
Notice this line:
Line 194 in adf4de7
buff
stands for buffer and it's nothing else then a string. So you can pass in whatever you want.
If you dont know how to read input from stdin, I suggest you google that, there are a lot of good tutorials out there.
from cudasha256.
I thought I tried that earlier, ill try it again.
In your code, if I passed in the variable line in place of buff, should I replace temp with strlen(line)? this is what I thought I did. Once I have it working with a string, I can easily get stdin working. Ill give it a shot later in the day.
Again, Thanks for the help.
from cudasha256.
Im real close, but still cigar.
I added these 3 lines directly above the line 194 you refer to above:
buff = (BYTE *)"Hello";
checkCudaErrors(cudaMallocManaged(&buff, (5)*sizeof(char)));
jobs[i] = JOB_init(buff, 5, argv[index]);
and I get this hash:
8855508aade16ec573d21e6a485dfd0a7624085c1a14b5ecdd6485de0c6839a4 file.1
but I believe the hash is incorrect, because I compare it to:
$ echo -n "Hello" | sha256sum
and I get:
185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969 -
I would expect the hash from both of those to match exactly.
BTW: If I dont cast buff to (BYTE *) then I get a compile error. Once I have this working with a simple string, ill be able to take it from there.
from cudasha256.
I have some progress. I seem to need to better understand variable pointers in c++.
from cudasha256.
Hello, may I ask for your help?
After I modify the code, I get an incorrect hash value.
buff = (BYTE *)"abc";
checkCudaErrors(cudaMallocManaged(&buff, (3)*sizeof(char)));
jobs[i] = JOB_init(buff, 3, argv[index]);
from cudasha256.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cudasha256.