User Profile

Collapse

Profile Sidebar

Collapse
Tassos Souris
Tassos Souris
Last Activity: Jan 5 '15, 06:51 PM
Joined: Aug 12 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Tassos Souris
    started a topic A Question about C++11 relaxed atomics
    in C

    A Question about C++11 relaxed atomics

    Hello there...

    Let's say i have some threads that want to give each other some non-zero values. Repeatedly in turns; that is, thread A gives thread B some non-zero value and then A responds with some non-zero value as well and this continues indefenitely. (but with more threads in chain). I use a variant of the static tree barrier for this purpose, but instead of a boolean sense value (where thread spin waiting for it to change), i...
    See more | Go to post

  • Tassos Souris
    started a topic gcc equivalent to icc's -debug inline_debug_info
    in C

    gcc equivalent to icc's -debug inline_debug_info

    Hi to everyone!

    In icc (intel's c compiler) i can do : -g -debug inline_debug_in fo for line map information in the object code.

    With gcc am i ok with only -g or do i need something more?

    Thanks in advance for any response!
    See more | Go to post

  • Tassos Souris
    replied to C++ see template instantiations
    in C
    See it as a general question about IDEs.. for example i make a simple main function where i use a std::vector<int > and maybe a std::list<std:: string>.. where can i see that the compiler has generated those instantiations (not necessary see their code but e.g. symbols for their names, functions instantiated etc)... the only reason that it might be helpful to me is to see "in action" all the instantiation rules and specializations...
    See more | Go to post

    Leave a comment:


  • Tassos Souris
    started a topic C++ see template instantiations
    in C

    C++ see template instantiations

    Hi!

    Is there a way in either Visual Studio 2010 or g++ (any version) to see what classes it instantiates and their code? For example to see if i avoid code bloat when i explicitly instantiate a template for certain types.

    Thanks!
    See more | Go to post

  • specialisation for templates that have template arguments

    we have a class template that has a template argument and want to specialize it..
    anyone has any examples for this? (haven't any particular case in mind just want to see how this is done to get it working)

    e.g:
    Code:
    template<bool> class BoolClass{};
    
    template< template<bool> class C> struct dummy;
    
    template<> struct dummy< ... for BoolClass<true> >{};
    See more | Go to post

  • Tassos Souris
    started a topic Take address of non-member operator
    in C

    Take address of non-member operator

    hi

    can i take the address of a non-member in C++ to use it e.g. in ptr_fun() ?

    Code:
    ostream& operator<<(ostream& out, const X& x){
            ....
    }
    then:
    Code:
    list<X> xs;
    
    for_each(xs.begin(), xs.end(), bind1st(ptr_fun(what_here??),cout));
    See more | Go to post

  • Tassos Souris
    started a topic immutable object from mutable object
    in Java

    immutable object from mutable object

    hi!

    is there any way in java that i can create a immutable object from a mutable one? like the const in C/C++ and the Collections.unm odifiableXXX functionality from the Collections class. I know that this doesn't exist in java (as far as i know) but if anyone knew any trick (reflection, at byte level etc.. any weird stuff) to do that?????

    thanks in advance :)
    See more | Go to post

  • Tassos Souris
    started a topic C++ templates
    in C

    C++ templates

    hi..

    i am learning C++ and i made a complex<T> class.
    I made a copy constructor from complex<T2> to complex<T1>,

    I have also made a:
    template< class T > operator+(const complex<T>& a, const complex<T>& b)

    if a write:
    Code:
    complex<float> f;
    complex<double> d;
    
    f + d;
    i get an error... even though...
    See more | Go to post

  • Tassos Souris
    replied to Writing data into >xlsm file
    in Java
    have you looked at http://jexcelapi.sourceforge.net/ ?
    See more | Go to post

    Leave a comment:


  • Tassos Souris
    replied to C programming IN command line arguments
    in C
    actuyally if there is only one statement {} are not necessary :)
    See more | Go to post

    Leave a comment:


  • Tassos Souris
    started a topic set of "differenet" enums
    in Java

    set of "differenet" enums

    Hi!

    in Effective Java (don't rememember item number) i read that
    a enum set can be used to group together "flags" that are to be set somewhere, example:

    Code:
    public class Text{
        public enum Style{ BOLD, ITALIC, ... }
    
        public void applyStyles(Set<Style> styles) { ... }
    }
    
    ... and we apply the styles in user code as: ...
    
    text.applyStyles(EnumSet.of(Style.BOLD));
    ...
    See more | Go to post

  • Tassos Souris
    replied to C programming IN command line arguments
    in C
    have you included string.h ?
    See more | Go to post

    Leave a comment:


  • Tassos Souris
    replied to std::max() vs (std::max)()
    in C
    actually i thought that i answered back in this question..

    i found the answer the other day in another thread in bytes... http://stackoverflow.com/questions/2...calling-stdmax

    the reason is that min and max are usually defined as macros in other header files and the max must be put in parethneses [as in (std::max)] to prevent
    macro substitution...
    See more | Go to post

    Leave a comment:


  • Tassos Souris
    started a topic std::max() vs (std::max)()
    in C

    std::max() vs (std::max)()

    hi!

    i was reading the Boost Library Requirements and Quidelines document and in encountered the following guideline (among similar others):
    use (std::max)() and not std::max()

    anyone knows why that?

    thanks
    See more | Go to post

  • Effect of integer type in bitwise operations performance

    hi!

    when using the bitwise operations such as in:

    Code:
    int a = ...;
    int b = ... ;
    
    a & b;
    a | b;
    ...
    does it matter which type we use for performance?? (int vs long vs ..)

    thanks!
    See more | Go to post

  • Tassos Souris
    started a topic Collections new unmodifiable
    in Java

    Collections new unmodifiable

    Hi!

    The methods from the Collections class that return a unmodifiable version of the passed Collection create a new class that have a copy of the passed parameters or a wrapper that delegate to the methods of the passed collection?

    Thanks in advance
    See more | Go to post

  • Tassos Souris
    started a topic IO data sources adapter
    in Java

    IO data sources adapter

    Hi a need a framework so that i can get input from various input sources (and get a object each time from it) and write objects to various output sources...

    Anything in mind?
    See more | Go to post

  • i am searching mostly for some ready solutions, either in the form of design patterns or in frameworks that take care of version matching etc etc... is there anything for that?
    See more | Go to post

    Leave a comment:


  • How to code for different versions of frameworks/services/etc ....

    Hi! Think that this is the right thread for this question...

    Let's say that i write a client library for a server. The server of course gets updated and new versions of that server are released.

    How to code the client library in order to do stuff such as:
    1) If the client library is for version 2 but the
    user connects to version 1 of the server using that
    library, how to guard...
    See more | Go to post

  • Tassos Souris
    started a topic Is this hashCode() thread-safe from String??
    in Java

    Is this hashCode() thread-safe from String??

    This is the hashCode() from the openjdk String class:

    Code:
    public int hashCode() {
            int h = hash;
            if (h == 0) {
                int off = offset;
                char val[] = value;
                int len = count;
    
                for (int i = 0; i < len; i++) {
                    h = 31*h + val[off++];
                }
                hash = h;
            }
            return h;
    ...
    See more | Go to post
No activity results to display
Show More
Working...