Skip to content

static variable defined in header file #3

@yoonbo

Description

@yoonbo

In the devel branch, lines 112--117 of include/cpp_dslash_parscalar.h file are defining the static variables as

     ShiftTable<Dslash<float>::HalfSpinor>* Dslash<float>::s_tab = nullptr;
     DslashTables<Dslash<float>::HalfSpinor, 4>* Dslash<float>::tab = nullptr;

     ShiftTable<Dslash<double>::HalfSpinor>* Dslash<double>::s_tab = nullptr;
     DslashTables<Dslash<double>::HalfSpinor, 4>* Dslash<double>::tab = nullptr;

Since they are defined in a header file, they are defined everywhere the cpp_dslash_parscalar.h is included, and it yields errors something like

../../other_libs/cpp_wilson_dslash/lib/libdslash.a(cpp_dslash_parscalar_32bit.o):(.bss+0x18): multiple definition of `CPlusPlusWilsonDslash::Dslash<double>::tab'
hmc.o:(.bss+0x28): first defined here

when linking the Chroma feature/mg_proto branch. They need to be moved to one of the .cc codes, and the updated commit needs to be linked to the Chroma feature/mg_proto branch submodule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions