Code Monkey home page Code Monkey logo

Comments (1)

gehadza avatar gehadza commented on August 16, 2024

I smell big trouble. Programmers should not use long anywhere in code that is intended to be portable across platforms. On 64-bit Linux platforms, long resolves to long long (a 64-bit type), while on 64-bit Windows platforms, long resolves to int (a 32-bit type). CUDA maintains type size compatibility between host and device code, so this difference also applies to device code on those two platforms.

QEBAPEAJXZ is presumably just C++ name decoration resulting from data_ptr(void)const. As C++ name mangling is toolchain specific, I don’t think you would want to chase that down.

I suspect the real reason this doesn’t resolve during linking is that the long here is matched up with either int or long long elsewhere, which makes the code link fine on one platform but not another. Can you make the code base “long clean”, i.e. replace all occurrences of long with more appropriate types? Guessing at the intentions, when the programmers used long they likely meant “signed integer type wider than int”, so as an initial attempt one could try replacing all instances of long with long long. You would still need to review whether those changes are in fact appropriate.

If the object being referred to is an actual pointer, a portable way of expressing that as an integer is to use uintptr_t, a type that is guaranteed by C and C++ language standards to be able to hold a pointer of any kind, e.g. for the purpose of performing bit manipulations on pointers.

from pointrcnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.