Skip to content

Commit

Permalink
rename GDS_DISABLE_INLINECOPY to GDS_DISABLE_WRITEMEMORY
Browse files Browse the repository at this point in the history
  • Loading branch information
drossetti committed Jun 20, 2017
1 parent f65f228 commit 13b57f1
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/gdsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,18 @@ const size_t GDS_GPU_MAX_INLINE_SIZE = 256;
//bool gds_has_weak_consistency = GDS_HAS_WEAK_API;
//bool gds_has_membar = GDS_HAS_MEMBAR;

static bool gpu_does_support_nor(gds_peer *peer) { return false; }

//-----------------------------------------------------------------------------

static bool gpu_does_support_nor(gds_peer *peer)
{
return false;
}

static bool gds_memop_enabled(gds_peer *peer)
{
return true;
}

// BUG: this feature is GPU device dependent
static bool gds_enable_write64()
{
Expand All @@ -129,12 +137,12 @@ static bool gds_enable_inlcpy()
{
static int gds_disable_inlcpy = -1;
if (-1 == gds_disable_inlcpy) {
const char *env = getenv("GDS_DISABLE_INLINECOPY");
const char *env = getenv("GDS_DISABLE_WRITEMEMORY");
if (env)
gds_disable_inlcpy = !!atoi(env);
else
gds_disable_inlcpy = 0;
gds_dbg("GDS_DISABLE_INLINECOPY=%d\n", gds_disable_inlcpy);
gds_dbg("GDS_DISABLE_WRITEMEMORY=%d\n", gds_disable_inlcpy);
}
return GDS_HAS_INLINE_COPY && !gds_disable_inlcpy;
}
Expand All @@ -151,7 +159,7 @@ static bool gds_simulate_write64()
gds_dbg("GDS_SIMULATE_WRITE64=%d\n", gds_simulate_write64);

if (gds_simulate_write64 && gds_enable_inlcpy()) {
gds_warn("INLINECOPY has priority over SIMULATE_WRITE64, using the former\n");
gds_warn("WRITEMEMORY has priority over SIMULATE_WRITE64, using the former\n");
gds_simulate_write64 = 0;
}
}
Expand Down

0 comments on commit 13b57f1

Please sign in to comment.