Comments (5)
@laszlokindrat Another problem related to #2860.
In this function, Mojo is trying construct a SIMD[DType.uint64, n]
from a Boolable
value self.mem
.
fn test[n: Int](self) -> SIMD[DType.uint64, n]:
return self.mem
You should write it as
fn test[n: Int](self) -> SIMD[DType.uint64, n]:
return rebind[SIMD[DType.uint64, n]](self.mem)
That said, if n != m
, it won't compile anyway.
from mojo.
I think this shows as well the same issue:
def main():
var mask=SIMD[DType.bool,8](True, False, False, True, True, True, True, True)
var mask2=SIMD[DType.bool,8](False, False, False, True, True, True, True, True)
#works
print (mask.__and__( mask2))
#does not work
#print (mask and mask2)
from mojo.
It's intentional that m1 and m2
won't work if their size are larger than 1. Should have written
print(all(mask) and all(mask2))
from mojo.
No if you want a vectorized AND. In fact, this works vectorized (ie size > 1):
print (mask.and( mask2))
from mojo.
Exactly, the vectorized and is a different thing from and
, the operator form is mask & mask2
. and
doesn't work by design.
from mojo.
Related Issues (20)
- [BUG] errors on install HOT 2
- [Feature Request] [proposal] Fast but unsafe version of atol
- [BUG] Install Issue--Infected file warning (from Intego/Virusbarrier) HOT 2
- [BUG] Install Issue: Failed to run Script (mojo format) HOT 4
- [BUG] crash when attempting to use MAC mps when wrapping PyTorch
- [BUG] Parser crash when a overload for a trait method is added
- [BUG] `Tensor` initialised from a list with wrong type shows weird behaviour
- [BUG] Parser crash when `moveinit` with wrong argument convention is defined while using `@value`
- [BUG] LSP & Mojo crashes when using Python.evaluate in a certain way HOT 4
- [Feature Request] [stdlib] [proposal] Add comp time `SIMD` range constructor
- [Feature Request] [stdlib] Add `assert_aborts()` HOT 2
- Beğenilen HOT 1
- [Modular CLI] Include mojo version in Max --version
- [BUG] Error output when using AOT mode but not JIT mode to run `llama3.mojo` HOT 1
- [BUG] Error output when using AOT mode but not JIT mode to run llama3.mojo
- [BUG] Error output when using AOT mode but not JIT mode to run `llama3.mojo`
- [BUG] Functions cannot be parsed during debugging. HOT 1
- [Docs] Vectorize docs are outdated HOT 1
- [BUG] `String.removesuffix("")` removes entire string
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mojo.