Skip to content

Commit e2a592f

Browse files
committed
support NumOps API
1 parent 4f99d66 commit e2a592f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

creator32.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cudavec
22

33
import (
44
"github.com/unixpickle/anyvec"
5+
"github.com/unixpickle/anyvec/anyvec32"
56
"github.com/unixpickle/cuda"
67
)
78

@@ -98,6 +99,11 @@ func (c *Creator32) MakeMapper(inSize int, table []int) anyvec.Mapper {
9899
return newMapper32(c, inSize, table)
99100
}
100101

102+
// NumOps returns a NumOps for float32 numerics.
103+
func (c *Creator32) NumOps() anyvec.NumOps {
104+
return anyvec32.NumOps{}
105+
}
106+
101107
func (c *Creator32) run(f func() error) <-chan error {
102108
return c.Handle.context.Run(func() error {
103109
if err := f(); err != nil {

0 commit comments

Comments
 (0)