46 |
|
if (!emap -> partitions) |
47 |
|
error(USER, "can't allocate source partitions"); |
48 |
|
|
49 |
< |
bzero(emap -> partitions + (emap -> maxPartitions >> 2), |
50 |
< |
emap -> maxPartitions >> 2); |
49 |
> |
memset(emap -> partitions + (emap -> maxPartitions >> 2), 0, |
50 |
> |
emap -> maxPartitions >> 2); |
51 |
|
} |
52 |
|
|
53 |
|
if (du2 * dv2 <= 1) { /* hit limit? */ |
100 |
|
RREAL *vp; |
101 |
|
double du2, dv2; |
102 |
|
|
103 |
< |
bzero(emap -> partitions, emap -> maxPartitions >> 1); |
103 |
> |
memset(emap -> partitions, 0, emap -> maxPartitions >> 1); |
104 |
|
emap -> partArea = srcsizerat * thescene.cusize; |
105 |
|
emap -> partArea *= emap -> partArea; |
106 |
|
vp = emap -> src -> ss [SU]; |
132 |
|
|
133 |
|
else { |
134 |
|
/* No photon ports defined, so partition scene cube faces */ |
135 |
< |
bzero(emap -> partitions, emap -> maxPartitions >> 1); |
135 |
> |
memset(emap -> partitions, 0, emap -> maxPartitions >> 1); |
136 |
|
setpart(emap -> partitions, 0, S0); |
137 |
|
emap -> partitionCnt = 0; |
138 |
|
emap -> numPartitions = 1 / srcsizerat; |
150 |
|
{ |
151 |
|
unsigned numTheta, numPhi; |
152 |
|
|
153 |
< |
bzero(emap -> partitions, emap -> maxPartitions >> 1); |
153 |
> |
memset(emap -> partitions, 0, emap -> maxPartitions >> 1); |
154 |
|
setpart(emap -> partitions, 0, S0); |
155 |
|
emap -> partArea = 4 * PI * sqr(emap -> src -> srad); |
156 |
|
emap -> numPartitions = emap -> partArea / |
180 |
|
emap -> maxPartitions >> 1); |
181 |
|
if (!emap -> partitions) |
182 |
|
error(USER, "can't allocate source partitions"); |
183 |
< |
bzero(emap -> partitions + (emap -> maxPartitions >> 2), |
183 |
> |
|
184 |
> |
memset(emap -> partitions + (emap -> maxPartitions >> 2), 0, |
185 |
|
emap -> maxPartitions >> 2); |
186 |
|
} |
187 |
|
|
223 |
|
{ |
224 |
|
double d2; |
225 |
|
|
226 |
< |
bzero(emap -> partitions, emap -> maxPartitions >> 1); |
226 |
> |
memset(emap -> partitions, 0, emap -> maxPartitions >> 1); |
227 |
|
d2 = srcsizerat * thescene.cusize; |
228 |
|
d2 = PI * emap -> src -> ss2 / (2 * emap -> src -> srad * sqr(d2)); |
229 |
|
d2 *= d2 * DOT(emap -> src -> ss [SU], emap -> src -> ss [SU]); |