MCPcopy
hub / github.com/tinygrad/tinygrad / cast

Method cast

test/mockgpu/mockgpu.py:32–34  ·  view source on GitHub ↗
(self, new_type, **kwargs)

Source from the content-addressed store, hash-verified

30 self.wcb(self.mv, index)
31
32 def cast(self, new_type, **kwargs):
33 self.mv = self.mv.cast('B').cast(new_type, **kwargs)
34 return self
35
36 @property
37 def nbytes(self): return self.mv.nbytes

Callers 15

eval_uopFunction · 0.45
test_cast_boolMethod · 0.45
test_where_castMethod · 0.45
test_do_math_in_int32Method · 0.45
test_floordiv_boolMethod · 0.45
test_mod_boolMethod · 0.45
test_fmod_boolMethod · 0.45
test_load_in_validMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_cast_boolMethod · 0.36
test_where_castMethod · 0.36
test_do_math_in_int32Method · 0.36
test_floordiv_boolMethod · 0.36
test_mod_boolMethod · 0.36
test_fmod_boolMethod · 0.36
test_load_in_validMethod · 0.36