Comments (1)
Woops, I had a brainwave and solved it! My cuDoubleComplex
operator overloads were implicitly host-only. Changing them to include __device__
, i.e.
__device__ inline comp operator * (const comp& a, const std::size_t n) {
return make_cuDoubleComplex(n*cuCreal(a), n*cuCimag(a));
}
__device__ inline comp operator + (const comp& a, const comp& b) {
return make_cuDoubleComplex(cuCreal(a) + cuCreal(b), cuCimag(a) + cuCimag(b));
}
solved the issue, and makes the failing cuComplex
code above run fine.
![](https://private-user-images.githubusercontent.com/29574749/262980467-a43cf607-28b5-4c42-a7b4-05b0118910d4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg0MDAyNjcsIm5iZiI6MTcxODM5OTk2NywicGF0aCI6Ii8yOTU3NDc0OS8yNjI5ODA0NjctYTQzY2Y2MDctMjhiNS00YzQyLWE3YjQtMDViMDExODkxMGQ0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE0VDIxMTkyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg2ZjZlMmFkZmIwZjgzMTFkNTNkYWRiZTg0YjVjZWRkODlhMThiNGVmNTI0MzhlOWZiNTU4NDQ0Y2FjYWFlNzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.fzNvbfdle6fXhVwR23O3sXLXNTwlCqU0L33ZZWoIIUA)
from thrust.
Related Issues (20)
- strided sum of a vector HOT 2
- How to initilize thrust device vector from another device vector declared by cuda HOT 5
- `thrust::device_vector` should have an `std::initializer_list` constructor HOT 1
- `thrust::complex` divided by `int` HOT 2
- Mistake
- building thrust with clang cuda fails at target_compile_features HOT 10
- Documentation behind `#if 0` HOT 3
- Godbolt examples in the README fail to compile HOT 1
- [EPIC] Thrust Documentation Improvements HOT 1
- cannot build without thread API HOT 10
- Can thrust support device segmented sort?
- thrust::reduce doesn't work with cuda::proclaim_return_type HOT 1
- Compilation error with iterator_adaptor HOT 2
- Fix failing libcxx tests
- nvcc fatal : Unsupported gpu architecture 'compute_90' for $ cmake --build . -j ${NUM_JOBS} HOT 4
- Make libcu++ compile with gcc-6
- Modify Device Value Error in Official Doc Codes HOT 1
- Shadow warning in execute_with_dependencies
- Under what conditions does the reduce function would cause core dump? HOT 1
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 thrust.