Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix linter/compiler errors #1351

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions include/daScript/simulate/runtime_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,23 +318,23 @@ namespace das
Array * __restrict pha[totalCount];
char * __restrict ph[totalCount];
for ( int t=0; t!=totalCount; ++t ) {
pha[t] = cast<Array *>::to(sources[t]->eval(context));
pha[t] = cast<Array *>::to(this->sources[t]->eval(context));
array_lock(context, *pha[t], &this->debugInfo);
ph[t] = pha[t]->data;
}
char ** __restrict pi[totalCount];
int szz = INT_MAX;
for ( int t=0; t!=totalCount; ++t ) {
pi[t] = (char **)(context.stack.sp() + stackTop[t]);
pi[t] = (char **)(context.stack.sp() + this->stackTop[t]);
szz = das::min(szz, int(pha[t]->size));
}
SimNode ** __restrict tail = list + total;
SimNode ** __restrict tail = this->list + this->total;
for (int i = 0; i!=szz; ++i) {
for (int t = 0; t != totalCount; ++t) {
*pi[t] = ph[t];
ph[t] += strides[t];
ph[t] += this->strides[t];
}
SimNode ** __restrict body = list;
SimNode ** __restrict body = this->list;
loopbegin:;
DAS_KEEPALIVE_LOOP(&context);
for (; body!=tail; ++body) {
Expand All @@ -346,7 +346,7 @@ namespace das
for ( int t=0; t!=totalCount; ++t ) {
array_unlock(context, *pha[t], &this->debugInfo);
}
evalFinal(context);
this->evalFinal(context);
context.stopFlags &= ~EvalFlags::stopForBreak;
return v_zero();
}
Expand Down Expand Up @@ -399,27 +399,27 @@ namespace das
Array * __restrict pha[totalCount];
char * __restrict ph[totalCount];
for ( int t=0; t!=totalCount; ++t ) {
pha[t] = cast<Array *>::to(sources[t]->eval(context));
pha[t] = cast<Array *>::to(this->sources[t]->eval(context));
array_lock(context, *pha[t], &this->debugInfo);
ph[t] = pha[t]->data;
}
char ** __restrict pi[totalCount];
int szz = INT_MAX;
for ( int t=0; t!=totalCount; ++t ) {
pi[t] = (char **)(context.stack.sp() + stackTop[t]);
pi[t] = (char **)(context.stack.sp() + this->stackTop[t]);
szz = das::min(szz, int(pha[t]->size));
}
SimNode * __restrict body = list[0];
SimNode * __restrict body = this->list[0];
for (int i = 0; i!=szz && !context.stopFlags; ++i) {
for (int t = 0; t != totalCount; ++t) {
*pi[t] = ph[t];
ph[t] += strides[t];
ph[t] += this->strides[t];
}
body->eval(context);
DAS_PROCESS_KEEPALIVE_LOOP1_FLAGS(continue);
}
loopend:;
evalFinal(context);
this->evalFinal(context);
for ( int t=0; t!=totalCount; ++t ) {
array_unlock(context, *pha[t], &this->debugInfo);
}
Expand Down Expand Up @@ -800,19 +800,19 @@ namespace das
DAS_PROFILE_NODE
char * __restrict ph[totalCount];
for ( int t=0; t!=totalCount; ++t ) {
ph[t] = cast<char *>::to(sources[t]->eval(context));
ph[t] = cast<char *>::to(this->sources[t]->eval(context));
}
char ** __restrict pi[totalCount];
for ( int t=0; t!=totalCount; ++t ) {
pi[t] = (char **)(context.stack.sp() + stackTop[t]);
pi[t] = (char **)(context.stack.sp() + this->stackTop[t]);
}
SimNode ** __restrict tail = list + total;
for (uint32_t i=0, is=size; i!=is; ++i) {
SimNode ** __restrict tail = this->list + this->total;
for (uint32_t i=0, is=this->size; i!=is; ++i) {
for (int t = 0; t != totalCount; ++t) {
*pi[t] = ph[t];
ph[t] += strides[t];
ph[t] += this->strides[t];
}
SimNode ** __restrict body = list;
SimNode ** __restrict body = this->list;
loopbegin:;
DAS_KEEPALIVE_LOOP(&context);
for (; body!=tail; ++body) {
Expand All @@ -821,7 +821,7 @@ namespace das
}
}
loopend:;
evalFinal(context);
this->evalFinal(context);
context.stopFlags &= ~EvalFlags::stopForBreak;
return v_zero();
}
Expand Down Expand Up @@ -864,29 +864,29 @@ namespace das
struct SimNodeKeepAlive_ForFixedArray1 : SimNode_ForFixedArray1<totalCount> {
SimNodeKeepAlive_ForFixedArray1 ( const LineInfo & at ) : SimNode_ForFixedArray1<totalCount>(at) {}
virtual SimNode * visit ( SimVisitor & vis ) override {
return visitFor(vis, totalCount, "ForFixedArray1");
return this->visitFor(vis, totalCount, "ForFixedArray1");
}
DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override {
DAS_PROFILE_NODE
char * __restrict ph[totalCount];
for ( int t=0; t!=totalCount; ++t ) {
ph[t] = cast<char *>::to(sources[t]->eval(context));
ph[t] = cast<char *>::to(this->sources[t]->eval(context));
}
char ** __restrict pi[totalCount];
for ( int t=0; t!=totalCount; ++t ) {
pi[t] = (char **)(context.stack.sp() + stackTop[t]);
pi[t] = (char **)(context.stack.sp() + this->stackTop[t]);
}
SimNode * __restrict body = list[0];
for (uint32_t i=0, is=size; i!=is && !context.stopFlags; ++i) {
SimNode * __restrict body = this->list[0];
for (uint32_t i=0, is=this->size; i!=is && !context.stopFlags; ++i) {
for (int t = 0; t != totalCount; ++t) {
*pi[t] = ph[t];
ph[t] += strides[t];
ph[t] += this->strides[t];
}
body->eval(context);
DAS_PROCESS_KEEPALIVE_LOOP1_FLAGS(continue);
}
loopend:;
evalFinal(context);
this->evalFinal(context);
context.stopFlags &= ~EvalFlags::stopForBreak;
return v_zero();
}
Expand Down
10 changes: 5 additions & 5 deletions include/daScript/simulate/simulate_nodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -3598,23 +3598,23 @@ SIM_NODE_AT_VECTOR(Float, float)
DAS_PROFILE_NODE
char * pi[totalCount];
for ( int t=0; t!=totalCount; ++t ) {
pi[t] = context.stack.sp() + stackTop[t];
pi[t] = context.stack.sp() + this->stackTop[t];
}
Iterator * sources[totalCount] = {};
for ( int t=0; t!=totalCount; ++t ) {
vec4f ll = source_iterators[t]->eval(context);
vec4f ll = this->source_iterators[t]->eval(context);
sources[t] = cast<Iterator *>::to(ll);
}
bool needLoop = true;
SimNode ** __restrict tail = list + total;
SimNode ** __restrict tail = this->list + this->total;
for ( int t=0; t!=totalCount; ++t ) {
sources[t]->isOpen = true;
needLoop = sources[t]->first(context, pi[t]) && needLoop;
if ( context.stopFlags ) goto loopend;
}
if ( !needLoop ) goto loopend;
while ( !context.stopFlags ) {
SimNode ** __restrict body = list;
SimNode ** __restrict body = this->list;
loopbegin:;
DAS_KEEPALIVE_LOOP(&context);
for (; body!=tail; ++body) {
Expand All @@ -3627,7 +3627,7 @@ SIM_NODE_AT_VECTOR(Float, float)
}
}
loopend:
evalFinal(context);
this->evalFinal(context);
for ( int t=0; t!=totalCount; ++t ) {
sources[t]->close(context, pi[t]);
}
Expand Down
6 changes: 2 additions & 4 deletions src/builtin/module_builtin_runtime_lockcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ namespace das
break;
}
case PathType::array_element:
pathStr += "[";
pathStr += to_string(pc.index);
pathStr += "]";
break;
case PathType::table_element:
pathStr += "[";
pathStr += to_string(pc.index);
Expand All @@ -176,6 +172,8 @@ namespace das
}
break;
}
default:
break;
}
}
}
Expand Down
Loading