Skip to content

Conversation

@tpoterba
Copy link
Contributor

@tpoterba tpoterba commented Feb 8, 2022

No description provided.

@tpoterba tpoterba changed the title [query] Fix encoder correctness bug; I2B is a byte [compiler] explicitly provide type infos for array loads Feb 8, 2022
class CodeArray[T](val lhs: Code[Array[T]])(implicit tti: TypeInfo[T]) {
def apply(i: Code[Int]): Code[T] =
Code(lhs, i, lir.insn2(tti.aloadOp))
Code(lhs, i, { case (v1: ValueX, v2: ValueX) => lir.insn(tti.aloadOp, tti, FastIndexedSeq(v1, v2)) })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add some typechecking here that tti == v1.tti.tti? (I think that is the right check...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add this on the CodeArray constructor if anywhere, not in the body here. I'll do that.

@johnc1231 johnc1231 mentioned this pull request Feb 9, 2022
@johnc1231
Copy link
Contributor

Seems like review can be dismissed?

@tpoterba
Copy link
Contributor Author

tpoterba commented Feb 9, 2022

yes, thanks.

@danking danking merged commit 34eff58 into hail-is:main Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants