Title: c++ problem Post by: Kostelooscoin on February 27, 2023, 12:56:56 PM Code: #include <cstdint> blockIdx.x * blockDim.x + threadIdx.x undefinited why ??? https://i.ibb.co/XWkfxdT/Sans-titre.png Title: Re: c++ problem Post by: ymgve2 on February 27, 2023, 03:00:22 PM Those are probably just warnings because Visual Studio doesn't always know about internal CUDA variables. The main issue is that it can't find your OpenSSL header file, that's what's blocking the compile.
Title: Re: c++ problem Post by: Kostelooscoin on February 27, 2023, 03:04:06 PM I installed openssl but nothing works
Title: Re: c++ problem Post by: albert0bsd on February 27, 2023, 03:49:04 PM Where that code come from, seems that you only copy and paste part of some code.
The variables that you are refering don't exist: Code: uint32_t index = blockIdx.x * blockDim.x + threadIdx.x; blockIdx, blockDim and threadIdx aren't declared anywhere. Regards! Title: Re: c++ problem Post by: Kostelooscoin on February 27, 2023, 04:21:28 PM I solved everything but there is still one small problem
hash160 << < 3, BLOCK_SIZE >> >(dev_pattern, dev_out, dev_nonce); in red probleme https://i.ibb.co/w4916YQ/Sans-titre.png Title: Re: c++ problem Post by: ymgve2 on February 27, 2023, 06:01:50 PM When you created the project, did you create it as a CUDA project so it uses the CUDA compiler?
Title: Re: c++ problem Post by: Kostelooscoin on February 27, 2023, 06:17:02 PM yes but it doesn't change anything
Title: Re: c++ problem Post by: NeuroticFish on February 27, 2023, 09:03:50 PM I solved everything but there is still one small problem hash160 << < 3, BLOCK_SIZE >> >(dev_pattern, dev_out, dev_nonce); << < needs something in between (a bitwise shift maybe and then a comparison?) But, since in the first post we have __global__ void hash160(char *pattern, unsigned char *out, uint32_t *nonce) you seem to be calling that void function, hence I would comment that erroneous line (at least for now) and put instead: hash160(dev_pattern, dev_out, dev_nonce); It seems that I was wrong, sorry, see below. Title: Re: c++ problem Post by: ymgve2 on February 27, 2023, 09:42:03 PM I solved everything but there is still one small problem hash160 << < 3, BLOCK_SIZE >> >(dev_pattern, dev_out, dev_nonce); <<< works in java, not in C++ << < needs something in between (a bitwise shift maybe and then a comparison?) But, since in the first post we have Code: __global__ void hash160(char *pattern, unsigned char *out, uint32_t *nonce) you seem to be calling that void function, hence I would comment that erroneous line (at least for now) and put instead: Code: hash160(dev_pattern, dev_out, dev_nonce); I have difficulties to understand what you aim for with a code you cannot even read. <<<a,b>>> is an extension to C++ to launch CUDA kernels, it is perfectly valid in CUDA code https://medium.com/analytics-vidhya/cuda-compute-unified-device-architecture-part-2-f3841c25375e Title: Re: c++ problem Post by: NeuroticFish on February 27, 2023, 09:59:43 PM <<<a,b>>> is an extension to C++ to launch CUDA kernels, it is perfectly valid in CUDA code https://medium.com/analytics-vidhya/cuda-compute-unified-device-architecture-part-2-f3841c25375e CUDA I don't know :( So the only error is that extra space and should have been Code: hash160 <<< 3, BLOCK_SIZE >>>(dev_pattern, dev_out, dev_nonce); Or also Visual Studio doesn't handle this well or is missing something? That Medium page also tells (yeah, that guy was installing on Linux) about CUDA Toolkit and so on. Title: Re: c++ problem Post by: ymgve2 on February 27, 2023, 10:15:03 PM <<<a,b>>> is an extension to C++ to launch CUDA kernels, it is perfectly valid in CUDA code https://medium.com/analytics-vidhya/cuda-compute-unified-device-architecture-part-2-f3841c25375e CUDA I don't know :( So the only error is that extra space and should have been Code: hash160 <<< 3, BLOCK_SIZE >>>(dev_pattern, dev_out, dev_nonce); Or also Visual Studio doesn't handle this well or is missing something? That Medium page also tells (yeah, that guy was installing on Linux) about CUDA Toolkit and so on. The space doesn't matter, Visual Studio autocorrects it to << <a, b >> > and it will still compile fine if everything's set up correctly. Title: Re: c++ problem Post by: Kostelooscoin on February 28, 2023, 09:22:41 AM hash160 << <3, BLOCK_SIZE >> >(dev_pattern, dev_out, dev_nonce);
same error |